WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
205150
2.26.2: isn't LTO ready
https://bugs.webkit.org/show_bug.cgi?id=205150
Summary
2.26.2: isn't LTO ready
Tomasz Kłoczko
Reported
2019-12-11 18:12:10 PST
Looks like linking fails when LTO is used. If you wish I can attach full build log but here is last part where linking is failing. [ 36%] Building CXX object Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/__/jsc.cpp.o cd /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/Source/JavaScriptCore/shell && /usr/bin/g++ -DBUILDING_WITH_CMAKE=1 -DBUILDING_WPE__=1 -DBUILDING_jsc -DBWRAP_EXECUTABLE=\"/usr/bin/bwrap\" -DDBUS_PROXY_EXECUTABLE=\"/usr/bin/xdg-dbus-proxy\" -DGETTEXT_PACKAGE=\"WPE\" -DHAVE_CONFIG_H=1 -DJSC_COMPILATION -DJSC_GLIB_API_ENABLED -DPKGLIBDIR=\"/usr/lib64/wpe-webkit-1.0\" -DSTATICALLY_LINKED_WITH_JavaScriptCore -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/ForwardingHeaders -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/API -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/assembler -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/b3 -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/b3/air -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/bindings -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/builtins -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/bytecode -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/bytecompiler -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/dfg -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/disassembler -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/disassembler/ARM64 -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/disassembler/udis86 -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/domjit -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/ftl -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/heap -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/debugger -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/inspector -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/inspector/agents -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/inspector/augmentable -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/inspector/remote -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/jit -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/llint -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/parser -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/profiler -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/tools -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/wasm -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/wasm/js -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/yarr -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/JavaScriptCore -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/JavaScriptCore/inspector -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/JavaScriptCore/runtime -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/JavaScriptCore/yarr -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/ForwardingHeaders/JavaScriptCore/glib -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources/JavaScriptCore/javascriptcorewpe/jsc -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/API/glib -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/DerivedSources -I/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/ThirdParty -Wextra -Wall -Wno-expansion-to-defined -Wno-psabi -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -fno-strict-aliasing -fno-exceptions -fno-rtti -DNDEBUG -fPIE -std=c++17 -o CMakeFiles/jsc.dir/__/jsc.cpp.o -c /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/jsc.cpp [ 36%] Linking CXX executable ../../../bin/jsc cd /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu/Source/JavaScriptCore/shell && /usr/bin/cmake -E cmake_link_script CMakeFiles/jsc.dir/link.txt --verbose=1 /usr/bin/g++ -Wextra -Wall -Wno-expansion-to-defined -Wno-psabi -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -fno-strict-aliasing -fno-exceptions -fno-rtti -DNDEBUG -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -fuse-ld=gold -Wl,--disable-new-dtags CMakeFiles/jsc.dir/__/jsc.cpp.o -o ../../../bin/jsc -ldl /usr/lib64/libglib-2.0.so /usr/lib64/libgmodule-2.0.so ../../../lib/libJavaScriptCore.a /usr/lib64/libgmodule-2.0.so ../../../lib/libWTF.a ../../../lib/libbmalloc.a /usr/lib64/libicudata.so /usr/lib64/libicui18n.so /usr/lib64/libicuuc.so -ldl -lpthread /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libglib-2.0.so /usr/lib64/libz.so /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/VMTraps.cpp:57: warning: type 'struct SignalContext' violates the C++ One Definition Rule [-Wodr] 57 | struct SignalContext { | /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/tools/SigillCrashAnalyzer.cpp:181: note: a different type is defined in another translation unit 181 | struct SignalContext { | /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/VMTraps.cpp:75: note: the first difference of corresponding definitions is field 'registers' 75 | PlatformRegisters& registers; | /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/tools/SigillCrashAnalyzer.cpp:186: note: a field with different name is defined in another translation unit 186 | MacroAssemblerCodePtr<PlatformRegistersPCPtrTag> machinePC; | /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter/CallFrame.cpp:219: error: undefined reference to 'vmEntryRecord' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter/CallFrame.cpp:351: error: undefined reference to 'vmEntryRecord' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/llint/LLIntData.cpp:65: error: undefined reference to 'llint_entry' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/VMTraps.cpp:107: error: undefined reference to 'llintPCRangeStart' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/VMTraps.cpp:107: error: undefined reference to 'llintPCRangeEnd' /usr/include/bits/string_fortified.h:34: error: undefined reference to 'llintPCRangeStart' /usr/include/bits/string_fortified.h:34: error: undefined reference to 'llintPCRangeEnd' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/SamplingProfiler.cpp:246: error: undefined reference to 'llintPCRangeStart' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/SamplingProfiler.cpp:246: error: undefined reference to 'llintPCRangeEnd' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter/EntryFrame.h:38: error: undefined reference to 'vmEntryRecord' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter/EntryFrame.h:38: error: undefined reference to 'vmEntryRecord' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/runtime/VM.cpp:1157: error: undefined reference to 'sanitizeStackForVMImpl' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/jit/JITCodeInlines.h:38: error: undefined reference to 'vmEntryToJavaScript' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter/Interpreter.cpp:976: error: undefined reference to 'vmEntryToNative' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/jit/JITCodeInlines.h:38: error: undefined reference to 'vmEntryToJavaScript' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/interpreter/Interpreter.cpp:906: error: undefined reference to 'vmEntryToNative' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/jit/JITCodeInlines.h:38: error: undefined reference to 'vmEntryToJavaScript' /home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1307: error: undefined reference to 'vmEntryToJavaScript' collect2: error: ld returned 1 exit status make[2]: *** [Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/build.make:100: bin/jsc] Error 1 make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu' make[1]: *** [CMakeFiles/Makefile2:774: Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/all] Error 2 make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu' make: *** [Makefile:155: all] Error 2 make: Leaving directory '/home/tkloczko/rpmbuild/BUILD/wpewebkit-2.26.2/x86_64-redhat-linux-gnu' error: Bad exit status from /var/tmp/rpm-tmp.KGsfZR (%build) I'm building everything with: + cd wpewebkit-2.26.2 + export 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none' + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none' + export 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none' + CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none' + export 'FFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none' + FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none' + export 'FCFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none' + FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -flto=auto -flto-partition=none' + export 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin' + export AR=/usr/bin/gcc-ar RANLIB=/usr/bin/gcc-ranlib NM=/usr/bin/gcc-nm + AR=/usr/bin/gcc-ar + RANLIB=/usr/bin/gcc-ranlib + NM=/usr/bin/gcc-nm + export CC=gcc CXX=g++ + CC=gcc + CXX=g++ + /usr/bin/cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_AR=/usr/bin/gcc-ar -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_NM=/usr/bin/gcc-nm -DCMAKE_RANLIB=/usr/bin/gcc-ranlib -DCMAKE_VERBOSE_MAKEFILE=ON -DINCLUDE_INSTALL_DIR=/usr/include -DLIB_INSTALL_DIR=/usr/lib64 -DLIB_SUFFIX=64 -DSHARE_INSTALL_PREFIX=/usr/share -DSYSCONF_INSTALL_DIR=/etc . -Bx86_64-redhat-linux-gnu -DPORT=WPE -DCMAKE_BUILD_TYPE=Release -DENABLE_MINIBROWSER=ON
Attachments
Add attachment
proposed patch, testcase, etc.
Tomasz Kłoczko
Comment 1
2019-12-11 18:29:39 PST
Just for the test successfully finished building wpewebkit with disabled LTO.
Michael Catanzaro
Comment 2
2022-07-06 06:29:09 PDT
Should be fixed nowadays.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug