FS#40497 - [wxgtk] [gcc] --disable-visibility required for wxgtk with GCC 4.9
Attached to Project:
Arch Linux
Opened by Pierre Bourdon (delroth) - Thursday, 22 May 2014, 21:48 GMT
Last edited by Allan McRae (Allan) - Tuesday, 11 November 2014, 07:28 GMT
Opened by Pierre Bourdon (delroth) - Thursday, 22 May 2014, 21:48 GMT
Last edited by Allan McRae (Allan) - Tuesday, 11 November 2014, 07:28 GMT
|
Details
Description:
Since GCC was updated to 4.9, some programs that use the wxgtk library cannot be built anymore on ArchLinux. The main example I can give is aur/dolphin-emu-git. I'm part of the dolphin-emu development team, our current understanding of the issue is that this is a GCC regression, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61214 that we reported. Basically, GCC is not instantiating some inline functions when it should, and since the definitions in the wxgtk .so are hidden by -fvisibility-inlines-hidden, building programs that use wxgtk might fail at the link stage. Rebuilding wxgtk from ABS with --disable-visibility passed to the ./configure script fixes the issue. Additional info: * wxgtk 3.0.0-3 Steps to reproduce: $ cat >testcase.cpp <<EOF #include <wx/event.h> int main() { wxEvent* evt = new wxNotifyEvent(); evt->Clone(); return 0; } EOF $ g++ -std=c++11 -O3 $(wx-config --cxxflags --libs) testcase.cpp This fails with the current extra/wxgtk package, succeeds with my custom version built with --disable-visibility. |
This task depends upon
Closed by Allan McRae (Allan)
Tuesday, 11 November 2014, 07:28 GMT
Reason for closing: Fixed
Additional comments about closing: gcc-4.9.2
Tuesday, 11 November 2014, 07:28 GMT
Reason for closing: Fixed
Additional comments about closing: gcc-4.9.2
to resolve this compilation problem on GCC 4.9 you need to pass -fno-devirtualize to CXX_FLAGS and C_FLAGS. The compilation will proper works (tested myself, i use dolphin github directly.