<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/92861>92861</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc][build]
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
SchrodingerZhu
</td>
</tr>
</table>
<pre>
Recently we introduced changes to the dependency resolution. Following these changes, the full build with scudo will no longer work out:
```bash
[build] : && /usr/bin/clang++-19 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fuse-ld=lld -Wl,--color-diagnostics -pthread projects/libc/test/integration/scudo/CMakeFiles/libc-scudo-integration-test.dir/integration_test.cpp.o -o bin/libc-scudo-integration-test projects/libc/lib/liblibc_for_scudo_integration_test.a && cd /home/yifzhu/Documents/llvm-project/build/projects/libc/test/integration/scudo && /home/yifzhu/Documents/llvm-project/build/bin/libc-scudo-integration-test
[build] ld.lld: error: undefined symbol: __llvmlibc_errno
[build] >>> referenced by flags_parser.cpp:147 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/flags_parser.cpp:147)
[build] >>> flags_parser.cpp.o:(scudo::FlagParser::runHandler(char const*, char const*, char)) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by mem_map_linux.cpp:67 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/mem_map_linux.cpp:67)
[build] >>> mem_map_linux.cpp.o:(scudo::MemMapLinux::mapImpl(unsigned long, unsigned long, char const*, unsigned long)) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by mem_map_linux.cpp:67 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/mem_map_linux.cpp:67)
[build] >>> mem_map_linux.cpp.o:(scudo::MemMapLinux::remapImpl(unsigned long, unsigned long, char const*, unsigned long)) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced 13 more times
[build]
[build] ld.lld: error: undefined symbol: __llvm_libc_syscall
[build] >>> referenced by linux.cpp:125 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:125)
[build] >>> linux.cpp.o:(scudo::HybridMutex::lockSlow()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by linux.cpp:134 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:134)
[build] >>> linux.cpp.o:(scudo::HybridMutex::unlock()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by linux.cpp:174 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:174)
[build] >>> linux.cpp.o:(scudo::getThreadID()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced 1 more times
[build]
[build] ld.lld: error: undefined symbol: __sched_getcpucount
[build] >>> referenced by linux.cpp:167 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:167)
[build] >>> linux.cpp.o:(scudo::getNumberOfCPUs()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] clang++-19: error: linker command failed with exit code 1 (use -v to see invocation)
[build] [3739/5803 64% :: 389.259] Linking CXX executable bin/libc-gwp-asan-uaf-should-crash
[build] FAILED: bin/libc-gwp-asan-uaf-should-crash
[build] : && /usr/bin/clang++-19 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fuse-ld=lld -Wl,--color-diagnostics -pthread projects/libc/test/integration/scudo/CMakeFiles/libc-gwp-asan-uaf-should-crash.dir/gwp_asan_should_crash.cpp.o -o bin/libc-gwp-asan-uaf-should-crash projects/libc/lib/liblibc_for_scudo_integration_test.a && :
[build] ld.lld: error: undefined symbol: __llvmlibc_errno
[build] >>> referenced by flags_parser.cpp:147 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/flags_parser.cpp:147)
[build] >>> flags_parser.cpp.o:(scudo::FlagParser::runHandler(char const*, char const*, char)) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by mem_map_linux.cpp:67 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/mem_map_linux.cpp:67)
[build] >>> mem_map_linux.cpp.o:(scudo::MemMapLinux::mapImpl(unsigned long, unsigned long, char const*, unsigned long)) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by mem_map_linux.cpp:67 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/mem_map_linux.cpp:67)
[build] >>> mem_map_linux.cpp.o:(scudo::MemMapLinux::remapImpl(unsigned long, unsigned long, char const*, unsigned long)) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced 13 more times
[build]
[build] ld.lld: error: undefined symbol: __llvm_libc_syscall
[build] >>> referenced by linux.cpp:125 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:125)
[build] >>> linux.cpp.o:(scudo::HybridMutex::lockSlow()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by linux.cpp:134 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:134)
[build] >>> linux.cpp.o:(scudo::HybridMutex::unlock()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced by linux.cpp:174 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:174)
[build] >>> linux.cpp.o:(scudo::getThreadID()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] >>> referenced 1 more times
[build]
[build] ld.lld: error: undefined symbol: __sched_getcpucount
[build] >>> referenced by linux.cpp:167 (/home/yifzhu/Documents/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:167)
[build] >>> linux.cpp.o:(scudo::getNumberOfCPUs()) in archive projects/libc/lib/liblibc_for_scudo_integration_test.a
[build] clang++-19: error: linker command failed with exit code 1 (use -v to see invocation)
[build] [3739/5803 64% :: 389.274] Building CXX object projects/compiler-rt/lib/memprof/CMakeFiles/RTMemprof_dynamic.x86_64.dir/memprof_interceptors_memintrinsics.cpp.o
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWl9v4zYS_zT0C0HDpizHfvCDE1foApu7RdtDinsRKHIkzYUidfxjx_30B0rOXf64e7vtZrtFHQQCTHJmOPObITU_SHiPjQHYkPya5LuJiKG1bvOjbJ1VaBpw_2zjpLLquPkBJJigj_QAFE1wVkUJispWmAY8DZaGFqiCHowCI4_Ugbc6BrRmSgurtT2gadIiD49ShN8MUnXUmlYRtaIHDC31MipLD6g1NZZqmzZCD9bdUxsDybaUzHZktj09l7PxvxK-PQ3l14M2ku_osJwvCV9SwovoHeFFhYbwQmphGsKvCb9m8zVl9Yd3N5TVxjIPnTABJUMTwPXWY3KDsnqPHivUGI4MjUYDnrWoFBjK7sA560i2UyIAC9jBk7FomiicAsXEXqAWJx0GDpTdCa3T0ofgBGV3xrJoogfFeuFEBwEcZXcHhwGYDw5N4ym7k8IH9u8okmSH3qNpWI2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