[libcxx-commits] [libcxx] [libc++] Fix module builds for `<__algorithm/unwrap_range.h>` (PR #179887)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 5 01:04:41 PST 2026


frederick-vs-ja wrote:

> What CI caught this?

- https://github.com/llvm/llvm-project/actions/runs/21688101056/job/62546072264

It took very long time to load the message to the web UI. I downloaded the raw log and found stuffs like the following (occurred thousands of times).
```
2026-02-04T21:52:17.1343410Z Testing: 
2026-02-04T21:52:17.1351393Z FAIL: llvm-libc++-shared.cfg.in :: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/extensions/clang/clang_modules_include.gen.py/bitset.compile.pass.cpp (6 of 11181)
2026-02-04T21:52:17.1354201Z ******************** TEST 'llvm-libc++-shared.cfg.in :: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/extensions/clang/clang_modules_include.gen.py/bitset.compile.pass.cpp' FAILED ********************
2026-02-04T21:52:17.1355823Z Exit Code: 1
2026-02-04T21:52:17.1355991Z 
2026-02-04T21:52:17.1356114Z Command Output (stdout):
2026-02-04T21:52:17.1356422Z --
2026-02-04T21:52:17.1356667Z # COMPILED WITH
2026-02-04T21:52:17.1364838Z /usr/bin/clang++-22 /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/extensions/clang/clang_modules_include.gen.py/bitset.compile.pass.cpp -pthread --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/test/support -std=c++17 -fmodules -fcxx-modules -fmodules-cache-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/ModuleCache -Xclang -fmodules-local-submodule-visibility -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -flax-vector-conversions=none -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -Wuser-defined-warnings  -fsyntax-only
2026-02-04T21:52:17.1378442Z # executed command: /usr/bin/clang++-22 /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/extensions/clang/clang_modules_include.gen.py/bitset.compile.pass.cpp -pthread --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1 -I /home/gha/actions-runner/_work/llvm-project/llvm-project/libcxx/test/support -std=c++17 -fmodules -fcxx-modules -fmodules-cache-path=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/ModuleCache -Xclang -fmodules-local-submodule-visibility -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wshift-negative-value -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Wno-nullability-completeness -flax-vector-conversions=none -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -Wuser-defined-warnings -fsyntax-only
2026-02-04T21:52:17.1384426Z # .---command stderr------------
2026-02-04T21:52:17.1385272Z # | While building module 'std' imported from /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/extensions/clang/clang_modules_include.gen.py/bitset.compile.pass.cpp:7:
2026-02-04T21:52:17.1386163Z # | In file included from <module-includes>:1:
2026-02-04T21:52:17.1386876Z # | In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1/algorithm:1853:
2026-02-04T21:52:17.1388136Z # | In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1/__algorithm/copy.h:12:
2026-02-04T21:52:17.1389334Z # | In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1/__algorithm/copy_move_common.h:13:
2026-02-04T21:52:17.1390853Z # | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1/__algorithm/unwrap_range.h:54:76: error: missing '#include "__utility/declval.h"'; 'declval' must be declared before it is used
2026-02-04T21:52:17.1392066Z # |    54 | template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
2026-02-04T21:52:17.1392553Z # |       |                                                                            ^
2026-02-04T21:52:17.1393370Z # | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test-suite-install/include/c++/v1/__utility/declval.h:30:56: note: declaration here is not visible
2026-02-04T21:52:17.1394289Z # |    30 | _LIBCPP_HIDE_FROM_ABI decltype(std::__declval<_Tp>(0)) declval() _NOEXCEPT {
2026-02-04T21:52:17.1394682Z # |       |                                                        ^
2026-02-04T21:52:17.1395565Z # | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/generic-modules-cxx17-lsv/libcxx/test/extensions/clang/clang_modules_include.gen.py/bitset.compile.pass.cpp:7:10: fatal error: could not build module 'std'
2026-02-04T21:52:17.1396429Z # |     7 | #include <bitset>
2026-02-04T21:52:17.1396773Z # |       |  ~~~~~~~~^
2026-02-04T21:52:17.1397084Z # | 2 errors generated.
2026-02-04T21:52:17.1397405Z # `-----------------------------
2026-02-04T21:52:17.1397649Z # error: command failed with exit status: 1
2026-02-04T21:52:17.1397827Z 
2026-02-04T21:52:17.1397898Z --
2026-02-04T21:52:17.1397985Z 
2026-02-04T21:52:17.1398048Z ********************
```

https://github.com/llvm/llvm-project/pull/179887


More information about the libcxx-commits mailing list