Bug 223596 - www/qt5-webkit: compiler failure due to ld.gold usage
Summary: www/qt5-webkit: compiler failure due to ld.gold usage
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: kde
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-10 16:42 UTC by O. Hartmann
Modified: 2018-04-08 15:58 UTC (History)
4 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2017-11-10 16:42:39 UTC
On recent CURRENT (FreeBSD 12.0-CURRENT #41 r325621: Fri Nov 10 00:00:55 CET 2017 amd64) compilation on most recent ports tree revision (r 453885) www/qt5-webkit fails to compile, see below.

Recomilation of ninja didn't make any differences. The ports tree is up to date and ports are also up to date according portmaster -da.

[...]
[209/4411] /usr/bin/cc -DBROTLI_BUILD_PORTABLE -DBUILDING_QT__=1 -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DQT_ASCII_CAST_WARNINGS -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_DYNAMIC_CAST -DQT_NO_EXCEPTIONS -DQT_USE_QSTRINGBUILDER -ISource/ThirdParty/brotli -I/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/ThirdParty/brotli -I/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/ThirdParty/brotli/dec -fvisibility=hidden -O2 -pipe  -fstack-protector -fno-strict-aliasing -fno-exceptions -fno-strict-aliasing -fcolor-diagnostics -Qunused-arguments -O2 -pipe  -fstack-protector -fno-strict-aliasing -ffunction-sections -fdata-sections   -Wall -Wextra -Wcast-align -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wundef -Wwrite-strings -Wno-parentheses-equality -fPIC  -Wno-cast-align -MD -MT Source/ThirdParty/brotli/CMakeFiles/brotli.dir/dec/decode.c.o -MF Source/ThirdParty/brotli/CMakeFiles/brotli.dir/dec/decode.c.o.d -o Source/ThirdParty/brotli/CMakeFiles/brotli.dir/dec/decode.c.o   -c /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/ThirdParty/brotli/dec/decode.c
[210/4411] /usr/bin/c++  -DBUILDING_QT__=1 -DBUILDING_WITH_CMAKE=1 -DGTEST_API_="__attribute__((visibility(\"default\")))" -DGTEST_CREATE_SHARED_LIBRARY=1 -DGTEST_HAS_PTHREAD=1 -DGTEST_HAS_RTTI=0 -DGTEST_HAS_TR1_TUPLE=0 -DHAVE_CONFIG_H=1 -DQT_ASCII_CAST_WARNINGS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DYNAMIC_CAST -DQT_NO_EXCEPTIONS -DQT_NO_KEYWORDS -DQT_USE_QSTRINGBUILDER -Dgtest_EXPORTS -ISource/ThirdParty/gtest -I/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/ThirdParty/gtest -I/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/ThirdParty/gtest/include -I/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore -IDerivedSources -IDerivedSources/JavaScriptCore -I/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/WTF -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -fvisibility=hidden -fvisibility-inlines-hidden -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -fcolor-diagnostics -Qunused-arguments -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -ffunction-sections -fdata-sections -fPIC   -fPIC -std=gnu++11 -MD -MT Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o -MF Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o.d -o Source/ThirdParty/gtest/CMakeFiles/gtest.dir/src/gtest-typed-test.cc.o -c /usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/ThirdParty/gtest/src/gtest-typed-test.cc

ninja: build stopped: subcommand failed.

===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 Tobias C. Berner freebsd_committer 2017-11-10 18:41:40 UTC
Hi there

Could you show me a bit more of the log, thanks.

mfg Tobias
Comment 2 olevole 2017-11-11 16:30:51 UTC
Same behavior

[184/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_templates.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_templates.py
[185/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_model.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_model.py
[186/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_separate_header.py
[187/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_generator.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generator.py
[188/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_combined_header.py
[189/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_separate_implementation.py
[190/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_implementation.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins_generate_combined_implementation.py
[191/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/builtins/builtins.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/builtins.py
[192/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/lazywriter.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/lazywriter.py
[193/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/jsmin.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/jsmin.py
[194/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/generate-combined-inspector-json.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/generate-combined-inspector-json.py
[195/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/inline-and-minify-stylesheets-and-scripts.py
[196/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/generate-js-builtins.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/generate-js-builtins.py
[197/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/cssmin.py /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/cssmin.py
[198/4411] cd /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources && /usr/local/bin/cmake -E copy_if_different /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/Scripts/xxd.pl /tmp/usr/ports/www/qt5-webkit/work/.build/DerivedSources/ForwardingHeaders/JavaScriptCore/Scripts/xxd.pl
[199/4411] /usr/local/libexec/ccache/c++  -DBUILDING_QT__=1 -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DQT_ASCII_CAST_WARNINGS -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DYNAMIC_CAST -DQT_NO_EXCEPTIONS -DQT_USE_QSTRINGBUILDER -DSTATICALLY_LINKED_WITH_WTF -ISource/JavaScriptCore -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore -I. -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/.. -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/API -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/ForwardingHeaders -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/assembler -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/b3 -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/b3/air -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/bindings -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/builtins -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/bytecode -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/bytecompiler -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/dfg -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/disassembler -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/disassembler/udis86 -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/ftl -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/heap -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/debugger -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/inspector -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/inspector/agents -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/inspector/augmentable -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/inspector/remote -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/interpreter -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/jit -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/llint -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/parser -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/profiler -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/replay -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/runtime -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/tools -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/wasm -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/yarr -IDerivedSources -IDerivedSources/ForwardingHeaders -IDerivedSources/JavaScriptCore -IDerivedSources/JavaScriptCore/inspector -I/tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/WTF -isystem /usr/local/include -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -fvisibility=hidden -fvisibility-inlines-hidden -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -fcolor-diagnostics -Qunused-arguments -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -ffunction-sections -fdata-sections   -fPIC -std=gnu++11 -MD -MT Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o -MF Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o -c /tmp/usr/ports/www/qt5-webkit/work/qtwebkit-5.212.0-alpha2/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp
[200/4411] : && /usr/local/libexec/ccache/c++  -fvisibility=hidden -fvisibility-inlines-hidden -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -fcolor-diagnostics -Qunused-arguments -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -ffunction-sections -fdata-sections  -fstack-protector -fuse-ld=gold -Wl,--disable-new-dtags Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o  -o bin/LLIntOffsetsExtractor  -Wl,-rpath,/usr/local/lib:/usr/local/lib/qt5 lib/libWTF.a lib/libbmalloc.a /usr/local/lib/libicui18n.so /usr/local/lib/libicuuc.so /usr/local/lib/qt5/libQt5Core.so.5.7.1 -pthread /usr/local/lib/libgobject-2.0.so /usr/local/lib/libglib-2.0.so && :
FAILED: bin/LLIntOffsetsExtractor 
: && /usr/local/libexec/ccache/c++  -fvisibility=hidden -fvisibility-inlines-hidden -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -std=c++11 -fcolor-diagnostics -Qunused-arguments -O2 -pipe -fstack-protector -fno-strict-aliasing  -DNDEBUG -ffunction-sections -fdata-sections  -fstack-protector -fuse-ld=gold -Wl,--disable-new-dtags Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o  -o bin/LLIntOffsetsExtractor  -Wl,-rpath,/usr/local/lib:/usr/local/lib/qt5 lib/libWTF.a lib/libbmalloc.a /usr/local/lib/libicui18n.so /usr/local/lib/libicuuc.so /usr/local/lib/qt5/libQt5Core.so.5.7.1 -pthread /usr/local/lib/libgobject-2.0.so /usr/local/lib/libglib-2.0.so && :
/usr/local/bin/ld.gold: fatal error: bin/LLIntOffsetsExtractor: Invalid argument
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/qt5-webkit
Comment 3 olevole 2017-11-11 16:33:08 UTC
as work-around: Disabling gold linker can help here:


% diff -ruN Makefile.bak Makefile
--- Makefile.bak        2017-11-11 19:21:08.658104000 +0300
+++ Makefile    2017-11-11 19:28:19.444792000 +0300
@@ -38,7 +38,8 @@
                        -DKDE_INSTALL_INCLUDEDIR:PATH="${QT_INCDIR_REL}" \
                        -DKDE_INSTALL_LIBDIR:PATH="${QT_LIBDIR_REL}" \
                        -DENABLE_OPENGL:BOOL=TRUE \
-                       -DUSE_QT_MULTIMEDIA:BOOL=FALSE
+                       -DUSE_QT_MULTIMEDIA:BOOL=FALSE \
+                       -DUSE_LD_GOLD=OFF
 
 # Add -DNDEBUG to CXXFLAGS which in turn gets sucked into
 # CMAKE_CXX_FLAGS_RELEASE where we actually want to have it.
Comment 4 olevole 2017-11-11 16:35:33 UTC
possibly related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218187
Comment 5 Tobias C. Berner freebsd_committer 2017-11-11 17:57:57 UTC
Thanks, 

I'll try to reproduce the ld.gold failure and then commit the fix.
Comment 6 ykla 2017-12-11 06:57:21 UTC
I met the same error today .
Comment 7 commit-hook freebsd_committer 2018-04-08 15:54:09 UTC
A commit references this bug:

Author: tcberner
Date: Sun Apr  8 15:53:23 UTC 2018
New revision: 466805
URL: https://svnweb.freebsd.org/changeset/ports/466805

Log:
  www/qt5-webkit: disable the gold linkerd

  Pass USE_LD_GOLD:BOOL=OFF to cmake, to ensure that it is not accidentally being
  picked up, used, and failing to link.

  While here, switch to CMAKE_ON/CMAKE_OFF

  PR:		223596
  Submitted by:	olevole@olevole.ru

Changes:
  head/www/qt5-webkit/Makefile