Created attachment 1219658 [details] cmake generated files from the build directory Description of problem: I'm using icecream (distributed compilation) and ninja together with cmake to build WebKitGTK+ (webkitgtk4 package). After updating to F25 (where is cmake 3.6.x) I cannot build it successfully anymore. The thing is that even if the -fPIC is presented for every file in the generated build.ninja file, when the build is run then there is no -fPIC in the compilers (in this case gcc) arguments (observed by looking on gcc processes during the compilation) which in the end leads to bunch of the following errors: /usr/bin/ld.gold: error: Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o: requires dynamic R_X86_64_PC32 reloc against '_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeIN7testing8internal6StringEEE8allocateEmPKv' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o: requires dynamic R_X86_64_PC32 reloc against '_ZSt7forwardIRKN7testing8internal6StringEEOT_RNSt16remove_referenceIS5_E4typeE' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o: requires dynamic R_X86_64_PC32 reloc against '_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeIN7testing8internal6StringEEE8max_sizeEv' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o: requires dynamic R_X86_64_PC32 reloc against '_ZSt7forwardIRKN7testing8internal6StringEEOT_RNSt16remove_referenceIS5_E4typeE' which may overflow at runtime; recompile with -fPIC /usr/bin/ld.gold: error: Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC I also tried the 3.7 (rc2 and rc3), but the build fails in the same way. I'm attaching the generated files from the build directory (the WebKit's cmake sources could be found on trac.webkit.org). Also a note that it's not a Fedora specific as the guys from WebKit' upstream running on Debian are having the same issue. In the meantime I had to rebuild the 3.5.x from F24, where it works. How reproducible: Always with 3.6.2 and 3.7.0 (rc2 and rc3). Not reproducible with 3.5.2.
Sorry I mistake the issue.. This is still unfixed.. Orion does the upstream responded?
There was no response to my email. I think we'll need to provide a simpler test case or more information. Can you provide the cmake output files from a working run to compare with the ones you already attached?
Created attachment 1222783 [details] cmake generated files from the build directory - cmake 3.5 - working
Nothing is standing out for me, and I don't use ninja or icecream so don't really know what to look for. I guess I would start tracking down the differences in the process trees during compilation to see why the compile options aren't getting propagated.
Any news here?
No. No time to pursue this further.
Reported to upstream as https://gitlab.kitware.com/cmake/cmake/issues/16664