Description of problem: ld.gold is broken in rawhide Version-Release number of selected component (if applicable): binutils-gold-2.37-22.fc36 How reproducible: Always Steps to Reproduce: 1. git clone https://src.fedoraproject.org/rpms/webkit2gtk3.git 2. fedpkg mockbuild --no-clean-all (--no-clean-all is to preserve the buildroot under /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/) Actual results: Build fails with "Looking for pthread.h - not found" -- Looking for pthread.h -- Looking for pthread.h - not found CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindThreads.cmake:238 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) Source/cmake/WebKitFindPackage.cmake:105 (_find_package) Source/cmake/OptionsGTK.cmake:22 (find_package) Source/cmake/WebKitCommon.cmake:220 (include) CMakeLists.txt:20 (include) It turns out all configure tests are failing. Look at this from CMakeError.log: Determining if the include file pthread.h exists failed with the following output: Change Dir: /builddir/build/BUILD/webkitgtk-2.35.1/redhat-linux-build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/ninja-build cmTC_48f9e && [1/2] Building C object CMakeFiles/cmTC_48f9e.dir/CheckIncludeFile.c.o [2/2] Linking C executable cmTC_48f9e FAILED: cmTC_48f9e : && /usr/bin/gcc -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-strict-aliasing -fno-exceptions -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/.package_note-webkit2gtk3-2.35.1-4.fc36.x86_64.ld -fuse-ld=gold -Wl,--disable-new-dtags CMakeFiles/cmTC_48f9e.dir/CheckIncludeFile.c.o -o cmTC_48f9e && : /usr/bin/ld.gold: error: /builddir/build/BUILD/.package_note-webkit2gtk3-2.35.1-4.fc36.x86_64.ld:43:8: syntax error, unexpected STRING /usr/bin/ld.gold: fatal error: unable to parse script file /builddir/build/BUILD/.package_note-webkit2gtk3-2.35.1-4.fc36.x86_64.ld collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Note in particular: /usr/bin/ld.gold: error: /builddir/build/BUILD/.package_note-webkit2gtk3-2.35.1-4.fc36.x86_64.ld:43:8: syntax error, unexpected STRING /usr/bin/ld.gold: fatal error: unable to parse script file But that file does not contain STRING anywhere: SECTIONS { .note.package (READONLY) : ALIGN(4) { BYTE(0x04) BYTE(0x00) BYTE(0x00) BYTE(0x00) /* Length of Owner including NUL */ BYTE(0x80) BYTE(0x00) BYTE(0x00) BYTE(0x00) /* Length of Value including NUL */ BYTE(0x7e) BYTE(0x1a) BYTE(0xfe) BYTE(0xca) /* Note ID */ BYTE(0x46) BYTE(0x44) BYTE(0x4f) BYTE(0x00) /* Owner: 'FDO' */ /* Value: '{"type":"rpm","name":"webkit2gtk3","version":"2.35.1-4.fc36","architecture":"x86_64","osCpe":"cpe:/o:fedoraproject:fedora:36"}' */ BYTE(0x7b) BYTE(0x22) BYTE(0x74) BYTE(0x79) BYTE(0x70) BYTE(0x65) BYTE(0x22) BYTE(0x3a) BYTE(0x22) BYTE(0x72) BYTE(0x70) BYTE(0x6d) BYTE(0x22) BYTE(0x2c) BYTE(0x22) BYTE(0x6e) BYTE(0x61) BYTE(0x6d) BYTE(0x65) BYTE(0x22) BYTE(0x3a) BYTE(0x22) BYTE(0x77) BYTE(0x65) BYTE(0x62) BYTE(0x6b) BYTE(0x69) BYTE(0x74) BYTE(0x32) BYTE(0x67) BYTE(0x74) BYTE(0x6b) BYTE(0x33) BYTE(0x22) BYTE(0x2c) BYTE(0x22) BYTE(0x76) BYTE(0x65) BYTE(0x72) BYTE(0x73) BYTE(0x69) BYTE(0x6f) BYTE(0x6e) BYTE(0x22) BYTE(0x3a) BYTE(0x22) BYTE(0x32) BYTE(0x2e) BYTE(0x33) BYTE(0x35) BYTE(0x2e) BYTE(0x31) BYTE(0x2d) BYTE(0x34) BYTE(0x2e) BYTE(0x66) BYTE(0x63) BYTE(0x33) BYTE(0x36) BYTE(0x22) BYTE(0x2c) BYTE(0x22) BYTE(0x61) BYTE(0x72) BYTE(0x63) BYTE(0x68) BYTE(0x69) BYTE(0x74) BYTE(0x65) BYTE(0x63) BYTE(0x74) BYTE(0x75) BYTE(0x72) BYTE(0x65) BYTE(0x22) BYTE(0x3a) BYTE(0x22) BYTE(0x78) BYTE(0x38) BYTE(0x36) BYTE(0x5f) BYTE(0x36) BYTE(0x34) BYTE(0x22) BYTE(0x2c) BYTE(0x22) BYTE(0x6f) BYTE(0x73) BYTE(0x43) BYTE(0x70) BYTE(0x65) BYTE(0x22) BYTE(0x3a) BYTE(0x22) BYTE(0x63) BYTE(0x70) BYTE(0x65) BYTE(0x3a) BYTE(0x2f) BYTE(0x6f) BYTE(0x3a) BYTE(0x66) BYTE(0x65) BYTE(0x64) BYTE(0x6f) BYTE(0x72) BYTE(0x61) BYTE(0x70) BYTE(0x72) BYTE(0x6f) BYTE(0x6a) BYTE(0x65) BYTE(0x63) BYTE(0x74) BYTE(0x3a) BYTE(0x66) BYTE(0x65) BYTE(0x64) BYTE(0x6f) BYTE(0x72) BYTE(0x61) BYTE(0x3a) BYTE(0x33) BYTE(0x36) BYTE(0x22) BYTE(0x7d) BYTE(0x00) BYTE(0x00) } } INSERT AFTER .note.gnu.build-id; That's all I know. No clue what's going on. Expected results: Configure tests should pass, CMake should finish successfully. Additional info: I like Wheat Chex.
This is a duplicate of this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2043178 The issue is that the build system is automatically inserting a linker script fragment which works with ld.bfd but not with ld.gold. This should now be fixed (at least according to that BZ, I have not actually tested it myself), so rebuilding should resolve this problem.
*** This bug has been marked as a duplicate of bug 2043178 ***
As I understand it, the "fix" requires defining a specfile variable to make the tool's output compatible with gold.