Project

General

Profile

Actions

Emulator Issues #1946

closed

wxWidgets link fails in ArchLinux (possible fix included)

Added by johan.az over 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?
1.Install needed dependencies and checkout the latest revisions (yaourt
handles it all automatically)
2.Try to compile

What is the expected output? What do you see instead?
Fails when trying to link the wxWidgets library:

Linking Binary/Linux-x86_64/Dolphin
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
CRegisterView::CRegisterView(wxWindow*, int)': RegisterView.cpp:(.text+0x7e7): undefined reference to wxGridNameStr'
RegisterView.cpp:(.text+0x81e): undefined reference to
wxGrid::wxGrid(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)' RegisterView.cpp:(.text+0x87b): undefined reference to wxGrid::SetTable(wxGridTableBase*, bool, wxGrid::wxGridSelectionModes)'
RegisterView.cpp:(.text+0x88c): undefined reference to
wxGrid::SetRowLabelSize(int)' RegisterView.cpp:(.text+0x89d): undefined reference to wxGrid::SetColLabelSize(int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
CRegisterView::CRegisterView(wxWindow*, int)': RegisterView.cpp:(.text+0x8df): undefined reference to wxGridNameStr'
RegisterView.cpp:(.text+0x916): undefined reference to
wxGrid::wxGrid(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)' RegisterView.cpp:(.text+0x973): undefined reference to wxGrid::SetTable(wxGridTableBase*, bool, wxGrid::wxGridSelectionModes)'
RegisterView.cpp:(.text+0x984): undefined reference to
wxGrid::SetRowLabelSize(int)' RegisterView.cpp:(.text+0x995): undefined reference to wxGrid::SetColLabelSize(int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
CRegisterView::Update()': RegisterView.cpp:(.text+0x9d2): undefined reference to wxGrid::ForceRefresh()'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
wxGridCellAttr::wxGridCellAttr(wxGridCellAttr*)': RegisterView.cpp:(.text._ZN14wxGridCellAttrC1EPS_[wxGridCellAttr::wxGridCellAttr(wxGridCellAttr*)]+0x66): undefined reference to wxGridCellAttr::Init(wxGridCellAttr*)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
wxGrid::DisableDragRowSize()': RegisterView.cpp:(.text._ZN6wxGrid18DisableDragRowSizeEv[wxGrid::DisableDragRowSize()]+0x19): undefined reference to wxGrid::EnableDragRowSize(bool)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
wxGrid::AutoSizeColumns(bool)': RegisterView.cpp:(.text._ZN6wxGrid15AutoSizeColumnsEb[wxGrid::AutoSizeColumns(bool)]+0x22): undefined reference to wxGrid::SetOrCalcColumnSizes(bool, bool)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function
CRegTable::CRegTable()': RegisterView.cpp:(.text._ZN9CRegTableC1Ev[CRegTable::CRegTable()]+0x14): undefined reference to wxGridTableBase::wxGridTableBase()'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x10): undefined reference to wxGrid::GetClassInfo() const' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x58): undefined reference to wxGrid::GetEventTable()
const'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x60): undefined reference to
wxGrid::GetEventHashTable() const' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0xe0): undefined reference to wxGrid::Fit()'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x150): undefined reference to wxGrid::Enable(bool)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x238): undefined reference to wxGrid::Refresh(bool,
wxRect const*)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x448): undefined reference to wxGrid::DoGetBestSize() const' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x508): undefined reference to wxGrid::DrawCellHighlight(wxDC&, wxGridCellAttr const*)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x510): undefined reference to
wxGrid::DrawRowLabels(wxDC&, wxArrayInt const&)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x518): undefined reference to wxGrid::DrawRowLabel(wxDC&, int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x520): undefined reference to
wxGrid::DrawColLabels(wxDC&, wxArrayInt const&)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x528): undefined reference to wxGrid::DrawColLabel(wxDC&, int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x530): undefined reference to
wxGrid::GetDefaultGridLinePen()' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x538): undefined reference to wxGrid::GetRowGridLinePen(int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x540): undefined reference to
wxGrid::GetColGridLinePen(int)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x548): undefined reference to wxGrid::GetDefaultEditorForCell(int, int) const'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x550): undefined reference to
wxGrid::GetDefaultRendererForCell(int, int) const' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable for CRegisterView]+0x558): undefined reference to wxGrid::GetDefaultEditorForType(wxString const&) const'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV13CRegisterView[vtable
for CRegisterView]+0x560): undefined reference to
wxGrid::GetDefaultRendererForType(wxString const&) const' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x10): undefined reference to wxGridTableBase::GetClassInfo() const'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x60): undefined reference to
wxGridTableBase::GetTypeName(int, int)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x68): undefined reference to wxGridTableBase::CanGetValueAs(int, int, wxString const&)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x70): undefined reference to
wxGridTableBase::CanSetValueAs(int, int, wxString const&)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x78): undefined reference to wxGridTableBase::GetValueAsLong(int, int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x80): undefined reference to
wxGridTableBase::GetValueAsDouble(int, int)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x88): undefined reference to wxGridTableBase::GetValueAsBool(int, int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x90): undefined reference to
wxGridTableBase::SetValueAsLong(int, int, long)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x98): undefined reference to wxGridTableBase::SetValueAsDouble(int, int, double)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0xa0): undefined reference to
wxGridTableBase::SetValueAsBool(int, int, bool)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0xa8): undefined reference to wxGridTableBase::GetValueAsCustom(int, int, wxString const&)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0xb0): undefined reference to
wxGridTableBase::SetValueAsCustom(int, int, wxString const&, void*)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0xd0): undefined reference to wxGridTableBase::InsertRows(unsigned long, unsigned long)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0xd8): undefined reference to
wxGridTableBase::AppendRows(unsigned long)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0xe0): undefined reference to wxGridTableBase::DeleteRows(unsigned long, unsigned long)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0xe8): undefined reference to
wxGridTableBase::InsertCols(unsigned long, unsigned long)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0xf0): undefined reference to wxGridTableBase::AppendCols(unsigned long)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0xf8): undefined reference to
wxGridTableBase::DeleteCols(unsigned long, unsigned long)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x100): undefined reference to wxGridTableBase::GetRowLabelValue(int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x108): undefined reference to
wxGridTableBase::GetColLabelValue(int)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x120): undefined reference to wxGridTableBase::CanHaveAttributes()'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x130): undefined reference to
wxGridTableBase::SetAttr(wxGridCellAttr*, int, int)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable for CRegTable]+0x138): undefined reference to wxGridTableBase::SetRowAttr(wxGridCellAttr*, int)'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTV9CRegTable[vtable
for CRegTable]+0x140): undefined reference to
wxGridTableBase::SetColAttr(wxGridCellAttr*, int)' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTI13CRegisterView[typeinfo for CRegisterView]+0x10): undefined reference to typeinfo for wxGrid'
Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o):(.rodata._ZTI9CRegTable[typeinfo
for CRegTable]+0x10): undefined reference to typeinfo for wxGridTableBase' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function CRegisterView::~CRegisterView()':
RegisterView.cpp:(.text._ZN13CRegisterViewD1Ev[CRegisterView::~CRegisterView()]+0x38):
undefined reference to wxGrid::~wxGrid()' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function CRegisterView::~CRegisterView()':
RegisterView.cpp:(.text._ZN13CRegisterViewD0Ev[CRegisterView::~CRegisterView()]+0x38):
undefined reference to wxGrid::~wxGrid()' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function CRegTable::~CRegTable()':
RegisterView.cpp:(.text._ZN9CRegTableD1Ev[CRegTable::~CRegTable()]+0x31):
undefined reference to wxGridTableBase::~wxGridTableBase()' Build/Linux-x86_64-release/libs/libdebwx.a(RegisterView.o): In function CRegTable::~CRegTable()':
RegisterView.cpp:(.text._ZN9CRegTableD0Ev[CRegTable::~CRegTable()]+0x31):
undefined reference to `wxGridTableBase::~wxGridTableBase()'
collect2: ld returned 1 exit status
scons: *** [Binary/Linux-x86_64/Dolphin] Error 1
scons: building terminated because of errors.

What version of the product are you using? On what operating system?
Revision 4783 in ArchLinux x86_64

Please provide any additional information below.
As explained in AUR:
http://aur.archlinux.org/packages.php?ID=21990

"Adding '-Wl,--no-as-needed' to the LINKFLAGS variable in
Source/Core/DolphinWX/Src/SConscript fix the linking problem."

Actions #1

Updated by hyperiris over 14 years ago

nakee~~

Actions #2

Updated by nakeee over 14 years ago

  • Status changed from New to Accepted

seems I neglected 64bit compile for too long:)
I don't like that specific solution, I'll check it out on Sunday when I'll be next to
64bit machine.
BTW please tell the arch package maintainer that if there is something he think can
be done to make packaging easier he is more than welcome to contact me (that thread
is a bit too long/messy).

Actions #3

Updated by johan.az over 14 years ago

I don't think the maintainer will be able to give much help. As he states in his last
comment:

"I don't know enough C/C++ to help without spending hours trying to fix it :p"

I'm not an expert either, but feel free to ask me any information you may need, as
well as to try any patch.

Actions #4

Updated by nakeee over 14 years ago

I'm sorry I really can't reproduce this error, tried 64 bit and 32 bit of various
distributions (sabayon/gentoo, debian, suse). Is there a difference in how arch linux
package wxw?

Actions #5

Updated by Virusmater over 14 years ago

i have this problem too on mandriva 2010.0 x32

Actions #6

Updated by nakeee over 14 years ago

What is the exact wxw version you are using?
gcc/g++ versions?

Actions #7

Updated by johan.az over 14 years ago

There isn't anything special as far as I know. No other apps requiring wxWidgets
(amule, filezilla) have given me any problems when building from source.

On arch64:

  • gcc/g++ (GCC) 4.4.2 20091208 (prerelease)
  • wx-config reports the 2.8.10 unicode version. If you want to know about the cflags:

--cppflags
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__

--cxxflags && --cflags
-I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread

--libs
-pthread -Wl,--hash-style=gnu -Wl,--as-needed -lwx_gtk2u_richtext-2.8
-lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8
-lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8
-lwx_baseu-2.8

Actions #8

Updated by Anonymous about 14 years ago

  • Status changed from Accepted to Questionable

as the initial post says, the following "fixes" this wxw linking error:
{{{
Tha patch is indeed only a very ugly workaround.
Source_Core_DolphinWX_Src_SConscript.patch
--- SConscript.orig 2009-12-12 11:04:56.000000000 +0100
+++ SConscript 2009-12-12 11:05:05.000000000 +0100
@@ -69,7 +69,7 @@
else:
wxenv.Append(
LINKFLAGS = [

  • '-pthread',
  • '-pthread', '-Wl,--no-as-needed',
    ],
    LIBS = libs
    )
    }}}

While this builds and runs, it is VERY unstable. I notice on the AUR page that the
real solution seems to be to recompile the wxgtk package with gcc version 4.3.

Basically, it's not a dolphin problem - just another case of linux failboating. I'll
leave it questionable for now just so other people can review, but I doubt anything
new will happen on this front.

Actions #9

Updated by cookiecaper almost 14 years ago

Whether the fault is with Dolphin or wx or gcc doesn't really matter now, does it? GCC
4.5 is already out. More and more people are going to be switching to 4.4 and 4.5.
Someone needs to fix it. If the fault is on wxgtk, pressure those people to get it
working; if it's something specific to dolphin-emu, that should be fixed.

Actions #10

Updated by nitro322 over 13 years ago

Has there, by change, been any progress on identifying a proper solution for this bug? I've encountered it on my Gentoo system, and I'm unable to find any way at all to work around it. Details can be found in bug 3268, comments 3-6.

I see --no-as-needed listed as a "VERY unstable" workaround, but even that doesn't seem to be available as an option any longer as the relevant options no longer exist in Source/Core/DolphinWX/Src/SConscript. Can this be added somewhere else now?

Thanks.

Actions #11

Updated by nitro322 over 13 years ago

This seems to be fixed by r6258, at least on Gentoo. If anyone else can confirm (say, on Arch), this issue can probably be closed.

Actions #12

Updated by TenebraeNoctis over 13 years ago

Works fine on Archlinux i686.

Actions #13

Updated by stephendgilles over 13 years ago

Works fine on Archlinux x86_64, too.

Actions #14

Updated by sl1nk3.s over 13 years ago

right, this is fixed.

Actions #15

Updated by Anonymous almost 13 years ago

  • Status changed from Questionable to Fixed

Ignore this...Status:Verified was removed, changing to Fixed

Actions

Also available in: Atom PDF