cmake -B builddir -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_LIBRARY_PATH=/usr/local/lib64 -DCMAKE_C_FLAGS='-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto=auto' -DCMAKE_CXX_FLAGS='-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto=auto' -DCMAKE_EXE_LINKER_FLAGS='-flto=auto ' -DCMAKE_SHARED_LINKER_FLAGS='-flto=auto ' -DCMAKE_STATIC_LINKER_FLAGS='-flto=auto ' -DCMAKE_MODULE_LINKER_FLAGS='-flto=auto ' -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_BUILD_TYPE=Release"
Build log:
wxwidgets-3.2.2.1-x86_64.log
[497/795] Linking CXX executable lib/wxrc-3.2
[498/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/gtk/checklst.cpp.o
[499/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/gtk/checkbox.cpp.o
[500/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/gtk/button.cpp.o
[501/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/gtk/bmpbuttn.cpp.o
[502/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/gtk/artgtk.cpp.o
[503/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/gtk/anybutton.cpp.o
[504/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/generic/statusbr.cpp.o
[505/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/generic/prntdlgg.cpp.o
[506/795] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/generic/listctrl.cpp.o
samu: job failed: : && /usr/local/bin/c++ -O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto=auto -O3 -DNDEBUG -flto=auto -s -rdynamic -pthread utils/CMakeFiles/wxrc.dir/__/__/__/utils/wxrc/wxrc.cpp.o -o lib/wxrc-3.2 -Wl,-rpath,/usr/local/tmp/crew/wxwidgets.20230320154608.dir/builddir/lib: lib/libwx_baseu_xml-3.2.so.0.2.1 lib/libwx_baseu-3.2.so.0.2.1 && :
/usr/local/tmp/crew/wxwidgets.20230320154608.dir/include/wx/event.h: In member function ‘__ct_base ’:
/usr/local/tmp/crew/wxwidgets.20230320154608.dir/include/wx/event.h:2909:41: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
2909 | m_files = new wxString[m_noFiles];
| ^
/usr/local/include/c++/12/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
In member function ‘__ct ’,
inlined from ‘Clone’ at /usr/local/tmp/crew/wxwidgets.20230320154608.dir/include/wx/event.h:2925:82:
/usr/local/tmp/crew/wxwidgets.20230320154608.dir/include/wx/event.h:2909:41: warning: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
2909 | m_files = new wxString[m_noFiles];
| ^
/usr/local/include/c++/12/new: In member function ‘Clone’:
/usr/local/include/c++/12/new:128:26: note: in a call to allocation function ‘operator new []’ declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
mold: error: undefined symbol: vtable for wxEraseEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxEraseEvent::Clone() const)
mold: error: undefined symbol: vtable for wxCommandEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxCommandEvent::wxCommandEvent(wxCommandEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxUpdateUIEvent::wxUpdateUIEvent(wxUpdateUIEvent const&) [clone .cold])>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxUpdateUIEvent::Clone() const [clone .cold])>>> referenced 2 more times
mold: error: undefined symbol: vtable for wxUpdateUIEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxUpdateUIEvent::wxUpdateUIEvent(wxUpdateUIEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxUpdateUIEvent::Clone() const)
mold: error: undefined symbol: vtable for wxSetCursorEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxSetCursorEvent::wxSetCursorEvent(wxSetCursorEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxSetCursorEvent::Clone() const)
mold: error: undefined symbol: vtable for wxMouseEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMouseEvent::wxMouseEvent(wxMouseEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMouseEvent::Clone() const)
mold: error: undefined symbol: vtable for wxPaintEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxPaintEvent::Clone() const)
mold: error: undefined symbol: wxCommandEvent::GetString() const
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxCommandEvent::wxCommandEvent(wxCommandEvent const&))
mold: error: undefined symbol: vtable for wxGestureEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxGestureEvent::Clone() const)
mold: error: undefined symbol: vtable for wxPanGestureEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxPanGestureEvent::Clone() const)
mold: error: undefined symbol: vtable for wxWindowDestroyEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxWindowDestroyEvent::Clone() const)
mold: error: undefined symbol: vtable for wxJoystickEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxJoystickEvent::Clone() const)
mold: error: undefined symbol: vtable for wxNavigationKeyEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxNavigationKeyEvent::Clone() const)
mold: error: undefined symbol: vtable for wxCursor
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxSetCursorEvent::wxSetCursorEvent(wxSetCursorEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxSetCursorEvent::Clone() const)
mold: error: undefined symbol: vtable for wxContextMenuEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxContextMenuEvent::Clone() const)
mold: error: undefined symbol: vtable for wxMaximizeEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMaximizeEvent::Clone() const)
mold: error: undefined symbol: vtable for wxNotifyEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxNotifyEvent::Clone() const)
mold: error: undefined symbol: vtable for wxRotateGestureEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxRotateGestureEvent::Clone() const)
mold: error: undefined symbol: vtable for wxChildFocusEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxChildFocusEvent::Clone() const)
mold: error: undefined symbol: vtable for wxDropFilesEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxDropFilesEvent::wxDropFilesEvent(wxDropFilesEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxDropFilesEvent::Clone() const)
mold: error: undefined symbol: vtable for wxMenuEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMenuEvent::Clone() const)
mold: error: undefined symbol: vtable for wxCloseEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxCloseEvent::Clone() const)
mold: error: undefined symbol: vtable for wxLongPressEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxLongPressEvent::Clone() const)
mold: error: undefined symbol: vtable for wxActivateEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxActivateEvent::Clone() const)
mold: error: undefined symbol: vtable for wxHelpEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxHelpEvent::wxHelpEvent(wxHelpEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxHelpEvent::Clone() const)
mold: error: undefined symbol: vtable for wxSysColourChangedEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxSysColourChangedEvent::Clone() const)
mold: error: undefined symbol: vtable for wxScrollWinEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxScrollWinEvent::Clone() const)
mold: error: undefined symbol: vtable for wxPaletteChangedEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxPaletteChangedEvent::Clone() const)
mold: error: undefined symbol: vtable for wxDisplayChangedEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxDisplayChangedEvent::Clone() const)
mold: error: undefined symbol: vtable for wxZoomGestureEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxZoomGestureEvent::Clone() const)
mold: error: undefined symbol: vtable for wxFullScreenEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxFullScreenEvent::Clone() const)
mold: error: undefined symbol: vtable for wxPressAndTapEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxPressAndTapEvent::Clone() const)
mold: error: undefined symbol: wxKeyEvent::wxKeyEvent(wxKeyEvent const&)
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxKeyEvent::Clone() const)
mold: error: undefined symbol: wxMouseEvent::Assign(wxMouseEvent const&)
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMouseEvent::wxMouseEvent(wxMouseEvent const&))>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMouseEvent::Clone() const)
mold: error: undefined symbol: vtable for wxTwoFingerTapEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxTwoFingerTapEvent::Clone() const)
mold: error: undefined symbol: vtable for wxNcPaintEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxNcPaintEvent::Clone() const)
mold: error: undefined symbol: vtable for wxIconizeEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxIconizeEvent::Clone() const)
mold: error: undefined symbol: vtable for wxScrollEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxScrollEvent::Clone() const)
mold: error: undefined symbol: vtable for wxQueryNewPaletteEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxQueryNewPaletteEvent::Clone() const)
mold: error: undefined symbol: vtable for wxShowEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxShowEvent::Clone() const)
mold: error: undefined symbol: vtable for wxInitDialogEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxInitDialogEvent::Clone() const)
mold: error: undefined symbol: vtable for wxFocusEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxFocusEvent::Clone() const)
mold: error: undefined symbol: vtable for wxMouseCaptureLostEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMouseCaptureLostEvent::Clone() const)
mold: error: undefined symbol: vtable for wxMouseCaptureChangedEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMouseCaptureChangedEvent::Clone() const)
mold: error: undefined symbol: vtable for wxClipboardTextEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxClipboardTextEvent::Clone() const)
mold: error: undefined symbol: vtable for wxSizeEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxSizeEvent::Clone() const)
mold: error: undefined symbol: vtable for wxDPIChangedEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxDPIChangedEvent::Clone() const)
mold: error: undefined symbol: vtable for wxMoveEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxMoveEvent::Clone() const)
mold: error: undefined symbol: vtable for wxWindowCreateEvent
>>> referenced by <artificial>
>>> /usr/local/tmp/ccWybWnS.ltrans0.ltrans.o:(wxWindowCreateEvent::Clone() const)
collect2: error: ld returned 1 exit status
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Is it due to using -ffat-lto-objects? I've never used this option, so I don't really understand why do you need it, but it clearly doesn't work, at least in combination with mold.
In any case, I don't think there is anything we can possibly do about it, so the obvious advice would be to not use one or the other.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I will try the build without -ffat-lto-objects. ('-ffat-lto-objects' was not an issue building wxwidgets 3.0.x)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Did you already use mold for 3.0? Considering how new mold is, I'd have thought you still used GNU ld or maybe lld for it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
At Chromebrew we are using mold for all of our packages, except where it fails. It very rarely fails.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
(Wxwidgets 3.1 also appears to build just fine with mold.)
I'd note that we are using the autotools/configure/make build setup for wxwidgets 3.0 and 3.1, whereas we are using cmake for 3.2.x...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is a cmake build issue. We're using cmake 3.26.0.
It builds fine using:
./configure --prefix=/usr/local --libdir=/usr/local/lib64 --mandir=/usr/local/share/man --build=x86_64-cros-linux-gnu --host=x86_64-cros-linux-gnu --target=x86_64-cros-linux-gnu --program-prefix='' --program-suffix='' \
--with-gtk=3 \
--with-opengl \
--enable-unicode \
--enable-graphics_ctx \
--enable-mediactrl \
--enable-webview \
--with-regex=builtin \
--with-libpng=builtin \
--with-libjpeg=sys \
--with-libtiff=sys \
--without-gnomevfs \
--disable-universal \
--disable-precomp-headers
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I tried building wx3.2.2.1 on Ubuntu 22.10 x64 with default packages (cmake 3.24.2, gcc 12.2.0, mold 1.4.2) and it builds and links fine.
I used:
cmake -G Ninja -DCMAKE_C_FLAGS="-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto=auto" -DCMAKE_CXX_FLAGS="-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto=auto" -DCMAKE_EXE_LINKER_FLAGS="-flto=auto" -DCMAKE_SHARED_LINKER_FLAGS="-flto=auto" -DCMAKE_STATIC_LINKER_FLAGS="-flto=auto" -DCMAKE_MODULE_LINKER_FLAGS="-flto=auto" -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_BUILD_TYPE="Release" ../wxWidgets/
cmake --build . --target wxrc -- -j4
You think it is CMake 3.26 specific?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Well, the previous version is cmake 3.25.3... I can also try with that version...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Sorry, I don't understand: your configure command doesn't seem to use neither LTO nor mold at all, so it doesn't test the same thing?
Could you please check the full link command used by CMake (I admit I don't see how to do it without searching, but it should be possible) and compare it with the link command used when using configure+make?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I've gotten this to build with some tweaks to the build config and using cmake 2.25.3, so I'm going to close this as this looks like an issue with either a newer version of cmake or our build options. Sorry to bother you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #23363 as completed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Glad to hear that this was fixed, but it would be still nice to know what exactly did you do in order to fix it, just in case anybody else runs into the same issue and finds this bug report by searching the web.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Switching from mold to gold fixed the build... I will open a ticket upstream with mold...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()