-
Notifications
You must be signed in to change notification settings - Fork 831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: Link OSDependent with Threads::Threads #1624
CMake: Link OSDependent with Threads::Threads #1624
Conversation
Would typically be pthreads. Without this, '-Wl,--no-undefined' would output these errors: /usr/bin/ld: OSDependent/Unix/libOSDependent.a(ossource.cpp.o): in function `glslang::OS_CleanupThreadData()': /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:83: undefined reference to `__pthread_register_cancel' /usr/bin/ld: /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:93: undefined reference to `__pthread_unregister_cancel' /usr/bin/ld: OSDependent/Unix/libOSDependent.a(ossource.cpp.o): in function `glslang::OS_AllocTLSIndex()': /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:122: undefined reference to `pthread_key_create' /usr/bin/ld: OSDependent/Unix/libOSDependent.a(ossource.cpp.o): in function `glslang::OS_SetTLSValue(void*, void*)': /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:137: undefined reference to `pthread_setspecific' /usr/bin/ld: OSDependent/Unix/libOSDependent.a(ossource.cpp.o): in function `glslang::OS_FreeTLSIndex(void*)': /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:162: undefined reference to `pthread_key_delete' /usr/bin/ld: OSDependent/Unix/libOSDependent.a(ossource.cpp.o): in function `glslang::InitGlobalLock()': /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:175: undefined reference to `pthread_mutexattr_init' /usr/bin/ld: /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:176: undefined reference to `pthread_mutexattr_settype' /usr/bin/ld: OSDependent/Unix/libOSDependent.a(ossource.cpp.o): in function `glslang::OS_GetTLSValue(void*)': /home/akien/Mageia/Sandbox/_rpm/BUILD/glslang-7.10.2984/glslang/OSDependent/Unix/ossource.cpp:149: undefined reference to `pthread_getspecific'
This change leads Vulkan CTS to fail under Ubuntu 14.04 like:
Any ideas? |
Looking at CMake git history, If this is not wanted, I could have a look at linking |
I suppose it would be a good way out, though I suppose I need @johnkslang opinion. |
CTS still supports Ubuntu 14 which uses cmake 2.8.12 by default. I'd prefer to not raise the version |
I meant that a good way out would be:
Thank you for details. |
I'll prepare a PR to fix the compat breakage then. |
As reported in KhronosGroup#1624, Ubuntu 14.04 LTS still uses CMake 2.8.12 which does not support the Threads::Threads target (added in CMake 3.1). This could be reverted once the required CMake version is bumped to 3.1+.
As reported in KhronosGroup#1624, Ubuntu 14.04 LTS still uses CMake 2.8.12 which does not support the Threads::Threads target (added in CMake 3.1). This could be reverted once the required CMake version is bumped to 3.1+.
As reported in KhronosGroup#1624, Ubuntu 14.04 LTS still uses CMake 2.8.12 which does not support the Threads::Threads target (added in CMake 3.1). This could be reverted once the required CMake version is bumped to 3.1+.
As reported in KhronosGroup#1624, Ubuntu 14.04 LTS still uses CMake 2.8.12 which does not support the Threads::Threads target (added in CMake 3.1). This could be reverted once the required CMake version is bumped to 3.1+.
Looks good to me. |
As reported in KhronosGroup#1624, Ubuntu 14.04 LTS still uses CMake 2.8.12 which does not support the Threads::Threads target (added in CMake 3.1). This could be reverted once the required CMake version is bumped to 3.1+.
Would typically be pthreads.
Without this, '-Wl,--no-undefined' would output these errors:
Ref. #1484.