Skip to content

Conversation

@huixie90
Copy link
Member

@huixie90 huixie90 commented Jun 22, 2025

There are lots of errors in the CI no-localisation build

# .---command stderr------------
# | While building module 'std' imported from /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test/libcxx/double_include.gen.py/csignal.sh.cpp:10:
# | In file included from <module-includes>:309:
# | /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test-suite-install/include/c++/v1/complex:381:13: error: declaration of 'size_t' must be imported from module 'std_core.cstddef.size_t' before it is required
# |   381 |   template <size_t _Ip, class _Xp>
# |       |             ^
# | /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test-suite-install/include/c++/v1/__cstddef/size_t.h:20:7: note: declaration here is not visible
# |    20 | using size_t = decltype(sizeof(int));
# |       |       ^
# | /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test/libcxx/double_include.gen.py/csignal.sh.cpp:10:10: fatal error: could not build module 'std'
# |    10 | #include <csignal>
# |       |  ~~~~~~~~^
# | 2 errors generated.

@huixie90 huixie90 changed the title [libc++] try fix localisation ci [libc++] fix no-localisation ci failure on <complex> Jun 22, 2025
@huixie90 huixie90 marked this pull request as ready for review June 22, 2025 17:52
@huixie90 huixie90 requested a review from a team as a code owner June 22, 2025 17:52
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jun 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 22, 2025

@llvm/pr-subscribers-libcxx

Author: Hui (huixie90)

Changes

There are lots of errors in the CI no-localisation build

# .---command stderr------------
# | While building module 'std' imported from /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test/libcxx/double_include.gen.py/csignal.sh.cpp:10:
# | In file included from &lt;module-includes&gt;:309:
# | /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test-suite-install/include/c++/v1/complex:381:13: error: declaration of 'size_t' must be imported from module 'std_core.cstddef.size_t' before it is required
# |   381 |   template &lt;size_t _Ip, class _Xp&gt;
# |       |             ^
# | /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test-suite-install/include/c++/v1/__cstddef/size_t.h:20:7: note: declaration here is not visible
# |    20 | using size_t = decltype(sizeof(int));
# |       |       ^
# | /__w/llvm-project/llvm-project/build/generic-no-localization/libcxx/test/libcxx/double_include.gen.py/csignal.sh.cpp:10:10: fatal error: could not build module 'std'
# |    10 | #include &lt;csignal&gt;
# |       |  ~~~~~~~~^
# | 2 errors generated.

Full diff: https://github.com/llvm/llvm-project/pull/145213.diff

3 Files Affected:

  • (modified) libcxx/include/complex (+1)
  • (modified) libcxx/test/std/numerics/complex.number/complex.tuple/tuple_element.compile.pass.cpp (+1-1)
  • (modified) libcxx/test/std/numerics/complex.number/complex.tuple/tuple_size.compile.pass.cpp (+1-1)
diff --git a/libcxx/include/complex b/libcxx/include/complex
index e9baec04d9465..d8ec3d95c10ed 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -260,6 +260,7 @@ template<class T> complex<T> tanh (const complex<T>&);
 #  include <__cxx03/complex>
 #else
 #  include <__config>
+#  include <__cstddef/size_t.h>
 #  include <__fwd/complex.h>
 #  include <__fwd/tuple.h>
 #  include <__tuple/tuple_element.h>
diff --git a/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_element.compile.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_element.compile.pass.cpp
index 50c0e0eff1eda..3a220578a074c 100644
--- a/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_element.compile.pass.cpp
+++ b/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_element.compile.pass.cpp
@@ -16,7 +16,7 @@
 #include <complex>
 #include <concepts>
 
-template <size_t I, typename C>
+template <std::size_t I, typename C>
 concept HasTupleElement = requires { std::tuple_element<I, C>{}; };
 
 struct SomeObject {};
diff --git a/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_size.compile.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_size.compile.pass.cpp
index 28dcbe3fc5ecd..1091c6345598e 100644
--- a/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_size.compile.pass.cpp
+++ b/libcxx/test/std/numerics/complex.number/complex.tuple/tuple_size.compile.pass.cpp
@@ -28,7 +28,7 @@ void test() {
   using C = std::complex<T>;
 
   static_assert(HasTupleSize<C>);
-  static_assert(std::same_as<typename std::tuple_size<C>::value_type, size_t>);
+  static_assert(std::same_as<typename std::tuple_size<C>::value_type, std::size_t>);
   static_assert(std::tuple_size<C>() == 2);
 }
 

@ldionne ldionne changed the title [libc++] fix no-localisation ci failure on <complex> [libc++] Fix no-localisation CI failure on <complex> Jun 24, 2025
@ldionne ldionne merged commit 0b8f3cc into llvm:main Jun 24, 2025
324 of 336 checks passed
DrSergei pushed a commit to DrSergei/llvm-project that referenced this pull request Jun 24, 2025
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants