On Sat, Dec 14, 2019 at 6:28 AM Richard Shaw <hobbes1069@xxxxxxxxx> wrote: > This error only happens on s390x... > > -- Looking for pthread.h > -- Looking for pthread.h - found > -- Performing Test CMAKE_HAVE_LIBC_PTHREAD > -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed > -- Looking for pthread_create in pthreads > -- Looking for pthread_create in pthreads - not found > -- Looking for pthread_create in pthread > -- Looking for pthread_create in pthread - not found > -- Check if compiler accepts -pthread > -- Check if compiler accepts -pthread - no > CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:146 (message): > Could NOT find Threads (missing: Threads_FOUND) > Call Stack (most recent call first): > /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) > /usr/share/cmake/Modules/FindThreads.cmake:220 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > /usr/lib64/cmake/Qt5UiTools/Qt5UiToolsConfig.cmake:73 (find_package) > /usr/lib64/cmake/Qt5UiTools/Qt5UiToolsConfig.cmake:233 (_qt5_UiTools_process_prl_file) > sources/cmake_helpers/helpers.cmake:21 (find_package) > sources/pyside2/CMakeLists.txt:159 (collect_optional_modules) > -- Configuring incomplete, errors occurred! > > https://koji.fedoraproject.org/koji/taskinfo?taskID=39567395 > > On other platforms the last check succeeds. I've never run into this before. > > Ideas? The cmake log says: Determining if the function pthread_create exists in the pthread failed with the following output: Change Dir: /builddir/build/BUILD/pyside-setup-opensource-src-5.13.2/s390x-linux/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_a4bb3/fast && /usr/bin/gmake -f CMakeFiles/cmTC_a4bb3.dir/build.make CMakeFiles/cmTC_a4bb3.dir/build gmake[1]: Entering directory '/builddir/build/BUILD/pyside-setup-opensource-src-5.13.2/s390x-linux/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_a4bb3.dir/CheckFunctionExists.c.o /usr/bin/cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_a4bb3.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTC_a4bb3 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a4bb3.dir/link.txt --verbose=1 /usr/bin/cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -rdynamic CMakeFiles/cmTC_a4bb3.dir/CheckFunctionExists.c.o -o cmTC_a4bb3 -lpthread /usr/bin/ld: CMakeFiles/cmTC_a4bb3.dir/CheckFunctionExists.c.o: `pthread_create@@GLIBC_2.2' non-PLT reloc for symbol defined in shared library and accessed from executable (rebuild file with -fPIC ?) /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_a4bb3.dir/build.make:87: cmTC_a4bb3] Error 1 gmake[1]: Leaving directory '/builddir/build/BUILD/pyside-setup-opensource-src-5.13.2/s390x-linux/CMakeFiles/CMakeTmp' gmake: *** [Makefile:121: cmTC_a4bb3/fast] Error 2 Indeed, something is seriously borked on s390x Rawhide. Try compiling this simple C program: #include <pthread.h> void* test_func(void* data) { return data; } int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); return 0; } like this: $ gcc -specs=/usr/lib/rpm/redhat/redhat-hardened-ld test.c -o test -lpthread /usr/bin/ld: /tmp/ccWdPlbg.o: `pthread_create@@GLIBC_2.2' non-PLT reloc for symbol defined in shared library and accessed from executable (rebuild file with -fPIC ?) /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status The -spec flag seems to be triggering the issue. The contents of /usr/lib/rpm/redhat/redhat-hardened-ld are: *self_spec: + %{!static:%{!shared:%{!r:-pie}}} which indicates that executables (which are neither static nor shared) are to be linked with -pie. Sure enough: $ gcc -pie test.c -o test -lpthread /usr/bin/ld: /tmp/ccUbJfXW.o: `pthread_create@@GLIBC_2.2' non-PLT reloc for symbol defined in shared library and accessed from executable (rebuild file with -fPIC ?) /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status None of this happens in F31. -- Jerry James http://www.jamezone.org/ _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx