Remove this ad

Lead

Jan 11 14 10:49 PM

Tags : :

Trying to compile amule from SVN on Mavericks fails with the following error:

[code]Undefined symbols for architecture x86_64:
"non-virtual thunk to wxTextCtrl::Cut()", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::Copy()", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl:aste()", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrlBase::SetHint(wxString const&)", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrlBase:verflow(int)", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl:iscardEdits()", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::ShowPosition(long)", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::SetDefaultStyle(wxTextAttr const&)", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::GetStyle(long, wxTextAttr&)", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::SetStyle(long, long, wxTextAttr const&)", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::MarkDirty()", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::IsModified() const", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::GetLineText(long) const", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl:ositionToXY(long, long*, long*) const", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::XYToPosition(long, long) const", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::GetLineLength(long) const", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
"non-virtual thunk to wxTextCtrl::GetNumberOfLines() const", referenced from:
vtable for CChatSession in amule-ChatSelector.o
vtable for CMuleTextCtrl in libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2[/code]

I'm trying to compile it with the the script located in /src/utils/scripts/MacOSX/full_build.sh with the following syntax:

[code]SDKNUMBER=10.8 WXVERSION=svn WXPORT=cocoa MULECLEAN=YES ../src/utils/scripts/MacOSX/full_build.sh[/code]

I modified defs-global.sh script to be able to support SDK 10.8 (I know that Mavericks is 10.9 but I only have SDK files for 10.8 installed)

Any ideas on how can I fix this?

Thanks
Quote    Reply   
Remove this ad
Remove this ad

#1 [url]

Jan 13 14 7:55 PM

Re: OS X 10.9: Undefined symbols for architecture x86_64

I've built aMule for Maverick and wxWidget 3.0, but I don't use that script.
(I could try to check if it needs some "adjustment")

Currently I'm using other scripts and my plans for the near future are to share in some way these silly scripts and/or create a mini-howto.
But my final goal is to update/to integrate scripts with the XCode projects already present in SVN sources (even if my knowledge of XCode environment is quite limited... near to absolute zero), probably I will keep the scripts used to build wxWidgets and other stuff used by amule, and use XCode just to build amule sources.


Anyway as regards your error, IMHO you have something of wrong when you build wxWidgets.

Just as example, to build wxWidgets 3.0 COCOA and debug enabled (both for x86_64 and i386) I use something similar to

[code]

export MY_SDKROOT=`xcode-select -print-path`

export THE_SDKPATH="${MY_SDKROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"

export MY_MIN_TARGET=10.6

../configure \
--prefix /dest/dir/of/wx30/files \
--enable-debug --enable-debug_gdb --enable-debug_info --disable-optimise \
--with-osx_cocoa \
--enable-intl \
--disable-shared \
--enable-unicode \
--disable-dependency_tracking --disable-universal --enable-universal-binary=i386,x86_64 \
--with-zlib \
--with-libpng \
--with-libiconv \
--with-libiconv-prefix=/dir/where/is/installed/libiconv \
--with-subdirs \
--with-macosx-sdk=${THE_SDKPATH} \
--with-macosx-version-min=${MY_MIN_TARGET}

MACOSX_DEPLOYMENT_TARGET=${MY_MIN_TARGET} make clean
MACOSX_DEPLOYMENT_TARGET=${MY_MIN_TARGET} make -j4 all
MACOSX_DEPLOYMENT_TARGET=${MY_MIN_TARGET} make install
[/code]

(extracted from the script I'm currently using)


Bye,
Mr Hyde

Quote    Reply   

#2 [url]

Jan 15 14 2:05 PM

Re: OS X 10.9: Undefined symbols for architecture x86_64

Thanks for your answer, there's not a lot of information about compiling on mac.

Y tried with your command:

[code]
export MY_SDKROOT=`xcode-select -print-path`

export THE_SDKPATH="${MY_SDKROOT}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"

export MY_MIN_TARGET=10.6

./configure \
--prefix /my/folder \
--enable-debug --enable-debug_gdb --enable-debug_info --disable-optimise \
--with-osx_cocoa \
--enable-intl \
--disable-shared \
--enable-unicode \
--disable-dependency_tracking --disable-universal --enable-universal-binary=i386,x86_64 \
--with-zlib \
--with-libpng \
--with-libiconv \
--with-libiconv-prefix=/opt/local \
--with-subdirs \
--with-macosx-sdk=${THE_SDKPATH} \
--with-macosx-version-min=${MY_MIN_TARGET}

MACOSX_DEPLOYMENT_TARGET=${MY_MIN_TARGET} make clean
MACOSX_DEPLOYMENT_TARGET=${MY_MIN_TARGET} make -j4 all
[/code]

And I get the exact opposite error than before, "Undefined symbols for architecture i386":
[code]
g++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.6 -o wxrc wxrc_wxrc.o -L/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib -arch i386 -arch x86_64 -L/opt/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime -lwx_baseu_xml-3.0 -lexpat -lwx_baseu-3.0 -lwxregexu-3.0 -arch i386 -arch x86_64 -L/opt/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime -lz -lpthread -llzma -lz -lpthread -llzma
ld: warning: ignoring file /opt/local/lib/libexpat.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libexpat.dylib
ld: warning: ignoring file /opt/local/lib/libz.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libz.dylib
ld: warning: ignoring file /opt/local/lib/liblzma.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/liblzma.dylib
Undefined symbols for architecture i386:
"_XML_ErrorString", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_GetCurrentLineNumber", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
_StartElementHnd in libwx_baseu_xml-3.0.a(xmllib_xml.o)
_TextHnd in libwx_baseu_xml-3.0.a(xmllib_xml.o)
_StartCdataHnd in libwx_baseu_xml-3.0.a(xmllib_xml.o)
_CommentHnd in libwx_baseu_xml-3.0.a(xmllib_xml.o)
_PIHnd in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_GetErrorCode", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_Parse", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_ParserCreate", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_ParserFree", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetCdataSectionHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetCharacterDataHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetCommentHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetDefaultHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetElementHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetProcessingInstructionHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetUnknownEncodingHandler", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
"_XML_SetUserData", referenced from:
wxXmlDocument::Load(wxInputStream&, wxString const&, int) in libwx_baseu_xml-3.0.a(xmllib_xml.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [wxrc] Error 1
make: *** [wxrc] Error 2
[/code]

Quote    Reply   

#3 [url]

Jan 15 14 10:37 PM

Re: OS X 10.9: Undefined symbols for architecture x86_64

I guess that you are using Mac Ports.
Probably you already knows it, but it's better to remember that, if you want to create a "universal binary" with i386 _AND_ x86_64, you need to install "+universal" variant of some packages.

Instead, if you want to build just for x86_64, do not use

--enable-universal-binary=i386,x86_64

(or simply remove "i386" from the list)


Bye,
Mr Hyde

Quote    Reply   

#4 [url]

Jan 16 14 12:02 AM

Re: OS X 10.9: Undefined symbols for architecture x86_64

Ok, thanks for the help, I was able to compile wxWidgets 3.0 on 64bits.

But here's the same error when compiling amule from SVN:

[code]Undefined symbols for architecture x86_64[/code]

I use this for configure:

[code]
./configure
--with-wx-config=../wxWidgets-3.0.0/wx-config
--enable-optimize
--with-crypto-prefix=/opt/local
--with-gdlib-config=/opt/local/bin/gdlib-config
--with-libiconv-prefix=/opt/local
--enable-cas
--enable-webserver
--enable-amulecmd
--enable-amule-gui
--enable-wxcas
--enable-alc
--enable-alcc
--enable-amule-daemon
--enable-geoip
--with-geoip-lib=/opt/local/lib
--with-geoip-headers=/opt/local/include
--enable-geoip-static
--enable-debug
[/code]

But I couldn't find the way to compile correctly (I'm really new at this). Can you post your configure options?

Thanks!

Quote    Reply   
Remove this ad

#5 [url]

Jan 16 14 12:09 AM

Re: OS X 10.9: Undefined symbols for architecture x86_64

Sorry, this is a more complete debug log

[code]
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2 -I/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -bind_at_load -lpthread -o wxcas onlinesig.o linuxmon.o wxcas.o wxcasprint.o wxcasframe.o wxcasprefs.o wxcascte.o wxcaspix.o -L/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib/libwx_baseu_net-3.0.a /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib/libwx_osx_cocoau_adv-3.0.a /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib/libwx_osx_cocoau_core-3.0.a /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/lib/libwx_baseu-3.0.a -framework WebKit -lwxregexu-3.0 -lwxtiff-3.0 -lwxjpeg-3.0 -lwxpng-3.0 -lz -lpthread -liconv -llzma
Undefined symbols for architecture x86_64:
[/code]

I really don't understand why because I specified x86_64 like you suggested and it gave me no compilation error on wxWidgets

Quote    Reply   

#6 [url]

Jan 16 14 2:51 AM

Re: OS X 10.9: Undefined symbols for architecture x86_64

I deleted my wxWidgets folder and compile it again and I was able to advance a little bit on the amule compilation

This is the error:

[code]
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2 -I/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -bind_at_load -lpthread -o wxcas onlinesig.o linuxmon.o wxcas.o wxcasprint.o wxcasframe.o wxcasprefs.o wxcascte.o wxcaspix.o -L/Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/lib/libwx_baseu_net-3.0.a /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/lib/libwx_osx_cocoau_adv-3.0.a /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/lib/libwx_osx_cocoau_core-3.0.a /Users/esteban/Documents/amuleGUI-Mac/wxWidgets-3.0.0/compilados/lib/libwx_baseu-3.0.a -framework WebKit -lwxregexu-3.0 -lwxtiff-3.0 -lwxjpeg-3.0 -lwxpng-3.0 -lz -lpthread -liconv -llzma
Undefined symbols for architecture x86_64:
[/code]

Quote    Reply   

#7 [url]

Jan 16 14 1:40 PM

Re: OS X 10.9: Undefined symbols for architecture x86_64

Ok, quick update.

I installed wxWidgets 3.0 from macports instead of compiling it and seems to work better when compiling amule.

But it seems that now I'm getting an error of architecture in something called CUPnPPortMapping:

[code]
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2 -bind_at_load -lpthread -o amule amule-CaptchaDialog.o amule-CaptchaGenerator.o amule-PartFileConvert.o amule-PartFileConvertDlg.o amule-amule.o amule-BaseClient.o amule-CanceledFileList.o amule-ClientList.o amule-ClientCreditsList.o amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-CorruptionBlackBox.o amule-DownloadClient.o amule-DownloadQueue.o amule-ECSpecialCoreTags.o amule-EMSocket.o amule-EncryptedStreamSocket.o amule-EncryptedDatagramSocket.o amule-ExternalConn.o amule-FriendList.o amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o amule-MuleUDPSocket.o amule-SearchFile.o amule-SearchList.o amule-ServerConnect.o amule-ServerList.o amule-ServerSocket.o amule-ServerUDPSocket.o amule-SHAHashSet.o amule-SharedFileList.o amule-ThreadTasks.o amule-UploadBandwidthThrottler.o amule-UploadClient.o amule-UploadQueue.o amule-Indexed.o amule-Kademlia.o amule-Prefs.o amule-Search.o amule-UDPFirewallTester.o amule-KademliaUDPListener.o amule-PacketTracking.o amule-Contact.o amule-RoutingZone.o amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-CatDialog.o amule-ChatSelector.o amule-ChatWnd.o amule-CommentDialog.o amule-CommentDialogLst.o amule-GenericClientListCtrl.o amule-ClientDetailDialog.o amule-DirectoryTreeCtrl.o amule-FileDetailDialog.o amule-KadDlg.o amule-OScopeCtrl.o amule-PrefsUnifiedDlg.o amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-SourceListCtrl.o amule-SharedFilePeersListCtrl.o amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o amule-MuleTrayIcon.o amule-TransferWnd.o amule-amuleAppCommon.o amule-ClientRef.o amule-DataToText.o amule-ECSpecialMuleTags.o amule-KnownFile.o amule-GetTickCount.o amule-GuiEvents.o amule-HTTPDownload.o amule-Logger.o amule-PartFile.o amule-Preferences.o amule-Proxy.o amule-Server.o amule-Statistics.o amule-StatTree.o amule-UserEvents.o -L. -lmuleappcommon -Llibs/common -Llibs/ec/cpp -lmulecommon -lec -lz -lmulesocket -L/opt/local/lib -lcryptopp -L. -lmuleappcore -L. -lmuleappgui -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -lwx_osx_cocoau_adv-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -L/opt/local/lib -lGeoIP
Undefined symbols for architecture x86_64:
"CUPnPPortMapping::CUPnPPortMapping(int, std::__1::basic_string, std::__1::allocator > const&, bool, std::__1::basic_string, std::__1::allocator > const&)", referenced from:
CamuleApp::ReinitializeNetwork(wxString*) in amule-amule.o
std::__1::vector >::__append(unsigned long) in amule-amule.o
"CUPnPControlPoint::AddPortMappings(std::__1::vector >&)", referenced from:
CamuleApp::ReinitializeNetwork(wxString*) in amule-amule.o
"CUPnPControlPoint:eletePortMappings(std::__1::vector >&)", referenced from:
CamuleApp::ShutDown() in amule-amule.o
"CUPnPControlPoint::CUPnPControlPoint(unsigned short)", referenced from:
CamuleApp::ReinitializeNetwork(wxString*) in amule-amule.o
"CUPnPControlPoint::~CUPnPControlPoint()", referenced from:
CamuleApp::OnExit() in amule-amule.o
"_stdEmptyString", referenced from:
std::__1::vector >::__append(unsigned long) in amule-amule.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
[/code]

I tried to add --disable-upnp con ./configure to see if that solved the problem, but I had no luck

Quote    Reply   

#8 [url]

Apr 11 14 3:08 PM

Re: OS X 10.9: Undefined symbols for architecture x86_64

Hello estemendoza,
I also got the compile error from your first post. I compiled wxWidgets 3.0.0 with ./configure --with-macosx-version-min=10.9, then I was able to compile aMule SVN 10835 without error. To compile aMule with ./configure --disable-upnp worked for me.
Arne

Quote    Reply   
Remove this ad
Add Reply

Quick Reply

bbcode help