Skip to content

[libc][test] link error running pthreads tests on linux, x86_64 #89261

Closed
@Flandini

Description

@Flandini

getting the follow error running ninja check-libc on latest. think some LINK_LIBRARIES just needs to be added to the pthreads test cmake file? will make a PR for this

/usr/bin/clang++ -fPIC -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  projects/libc/test/src/pthread/CMakeFiles/libc.test.src.pthread.pthread_condattr_test.__build__.dir/pthread_condattr_test.cpp.o -o projects/libc/test/src/pthread/libc.test.src.pthread.pthread_condattr_test.__build__  projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_condattr_destroy.__internal__.dir/./pthread_condattr_destroy.cpp.o  projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_condattr_getclock.__internal__.dir/./pthread_condattr_getclock.cpp.o  projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_condattr_getpshared.__internal__.dir/./pthread_condattr_getpshared.cpp.o  projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_condattr_init.__internal__.dir/./pthread_condattr_init.cpp.o  projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_condattr_setclock.__internal__.dir/./pthread_condattr_setclock.cpp.o  projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_condattr_setpshared.__internal__.dir/./pthread_condattr_setpshared.cpp.o  projects/libc/src/__support/StringUtil/CMakeFiles/libc.src.__support.StringUtil.error_to_string.dir/./error_to_string.cpp.o  projects/libc/src/__support/OSUtil/linux/CMakeFiles/libc.src.__support.OSUtil.linux.linux_util.dir/./quick_exit.cpp.o  projects/libc/src/errno/CMakeFiles/libc.src.errno.errno.__internal__.dir/./libc_errno.cpp.o  lib/libLibcDeathTestExecutors.unit.a  lib/libLibcTest.unit.a
/usr/bin/ld: projects/libc/test/src/pthread/CMakeFiles/libc.test.src.pthread.pthread_condattr_test.__build__.dir/pthread_condattr_test.cpp.o: in function `LlvmLibcPThreadCondAttrTest_GetDefaultValues::Run()':
/home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:30: undefined reference to `pthread_condattr_getclock'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:32: undefined reference to `pthread_condattr_getpshared'
/usr/bin/ld: projects/libc/test/src/pthread/CMakeFiles/libc.test.src.pthread.pthread_condattr_test.__build__.dir/pthread_condattr_test.cpp.o: in function `LlvmLibcPThreadCondAttrTest_SetGoodValues::Run()':
/home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:46: undefined reference to `pthread_condattr_setclock'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:47: undefined reference to `pthread_condattr_getclock'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:49: undefined reference to `pthread_condattr_setpshared'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:50: undefined reference to `pthread_condattr_getpshared'
/usr/bin/ld: projects/libc/test/src/pthread/CMakeFiles/libc.test.src.pthread.pthread_condattr_test.__build__.dir/pthread_condattr_test.cpp.o: in function `LlvmLibcPThreadCondAttrTest_SetBadValues::Run()':
/home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:64: undefined reference to `pthread_condattr_setclock'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:65: undefined reference to `pthread_condattr_getclock'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:67: undefined reference to `pthread_condattr_setpshared'
/usr/bin/ld: /home/seclab/repos/llvm-project/libc/test/src/pthread/pthread_condattr_test.cpp:68: undefined reference to `pthread_condattr_getpshared'

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions