aMule Forum
English => Compilation problems => Topic started by: Gerd78 on November 18, 2005, 03:31:24 PM
-
Hi,
following problem:
g++ -Os -DUSE_EMBEDDED_CRYPTO -L/usr/X11R6/lib -lpthread -o amuled
amuled-amuled.o amuled-Timer.o amuled-AICHSyncThread.o amuled-AddFileThread.o
amuled-amule.o amuled-BaseClient.o amuled-ClientList.o
amuled-ClientCreditsList.o amuled-ClientTCPSocket.o amuled-ClientUDPSocket.o
amuled-DownloadClient.o amuled-DownloadQueue.o amuled-EMSocket.o
amuled-ECSpecialCoreTags.o amuled-ExternalConn.o amuled-Friend.o
amuled-FriendList.o amuled-HTTPDownload.o amuled-IPFilter.o
amuled-KnownFileList.o amuled-ListenSocket.o amuled-MuleUDPSocket.o
amuled-SearchList.o amuled-ServerConnect.o amuled-ServerList.o
amuled-ServerSocket.o amuled-ServerUDPSocket.o amuled-SharedFileList.o
amuled-UploadBandwidthThrottler.o amuled-UploadClient.o amuled-UploadQueue.o
amuled-Kademlia.o amuled-Search.o amuled-Indexed.o amuled-KademliaUDPListener.o
amuled-Prefs.o amuled-RoutingZone.o amuled-Contact.o amuled-ClientCredits.o
amuled-ECSpecialMuleTags.o amuled-KnownFile.o amuled-GetTickCount.o
amuled-Logger.o amuled-PartFile.o amuled-Preferences.o amuled-Proxy.o
amuled-Server.o amuled-Statistics.o amuled-StatTree.o amuled-SHAHashSet.o
amuled-OtherFunctions.o amuled-CryptoPP.o -pthread -L/usr/X11R6/lib
/usr/lib/libwx_baseu-2.7.a /usr/lib/libwx_baseu_net-2.7.a -lwxregexu-2.7 -lz
-ldl -lm -L. -lmuleappcore -L. -lmuleappcommon -Llibs/common -Llibs/ec
-lmulecommon -lec -lz -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::wxTCPConnection()':
sckipc.cpp:(.text+0xaf): undefined reference to
`wxConnectionBase::wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::wxTCPConnection()':
sckipc.cpp:(.text+0x14f): undefined reference to
`wxConnectionBase::wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::wxTCPConnection(wchar_t*, int)':
sckipc.cpp:(.text+0x195): undefined reference to
`wxConnectionBase::wxConnectionBase(wchar_t*, int)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::wxTCPConnection(wchar_t*, int)':
sckipc.cpp:(.text+0x1db): undefined reference to
`wxConnectionBase::wxConnectionBase(wchar_t*, int)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::Advise(wxString const&, wchar_t*, int, wxIPCFormat)':
sckipc.cpp:(.text+0x238): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x245): undefined reference to
`wxDataOutputStream::WriteString(wxString const&)'
sckipc.cpp:(.text+0x254): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x271): undefined reference to
`wxDataOutputStream::Write32(unsigned int)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPEventHandler::Server_OnRequest(wxSocketEvent&)':
sckipc.cpp:(.text+0x321): undefined reference to
`wxDataInputStream::wxDataInputStream(wxInputStream&, wxMBConv&)'
sckipc.cpp:(.text+0x353): undefined reference to
`wxDataOutputStream::wxDataOutputStream(wxOutputStream&, wxMBConv&)'
sckipc.cpp:(.text+0x365): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x384): undefined reference to
`wxDataInputStream::ReadString()'
sckipc.cpp:(.text+0x3ea): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x479): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`__static_initialization_and_destruction_0(int, int)':
sckipc.cpp:(.text+0x56f): undefined reference to `wxServerBase::ms_classInfo'
sckipc.cpp:(.text+0x5a0): undefined reference to `wxClientBase::ms_classInfo'
sckipc.cpp:(.text+0x5ce): undefined reference to
`wxConnectionBase::ms_classInfo'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::Execute(wchar_t const*, int, wxIPCFormat)':
sckipc.cpp:(.text+0x6fe): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x70d): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x72a): undefined reference to
`wxDataOutputStream::Write32(unsigned int)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::Request(wxString const&, int*, wxIPCFormat)':
sckipc.cpp:(.text+0x76a): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x777): undefined reference to
`wxDataOutputStream::WriteString(wxString const&)'
sckipc.cpp:(.text+0x786): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x790): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x79d): undefined reference to `wxDataInputStream::Read32()'
sckipc.cpp:(.text+0x7a8): undefined reference to
`wxConnectionBase::GetBufferAtLeast(unsigned int)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::Poke(wxString const&, wchar_t*, int, wxIPCFormat)':
sckipc.cpp:(.text+0x7f8): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x805): undefined reference to
`wxDataOutputStream::WriteString(wxString const&)'
sckipc.cpp:(.text+0x814): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x831): undefined reference to
`wxDataOutputStream::Write32(unsigned int)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::StartAdvise(wxString const&)':
sckipc.cpp:(.text+0x86e): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x87b): undefined reference to
`wxDataOutputStream::WriteString(wxString const&)'
sckipc.cpp:(.text+0x885): undefined reference to `wxDataInputStream::Read8()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::StopAdvise(wxString const&)':
sckipc.cpp:(.text+0x8b2): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x8bf): undefined reference to
`wxDataOutputStream::WriteString(wxString const&)'
sckipc.cpp:(.text+0x8c9): undefined reference to `wxDataInputStream::Read8()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPClient::MakeConnection(wxString const&, wxString const&, wxString const&)':
sckipc.cpp:(.text+0xb99): undefined reference to
`wxDataInputStream::wxDataInputStream(wxInputStream&, wxMBConv&)'
sckipc.cpp:(.text+0xbc2): undefined reference to
`wxDataOutputStream::wxDataOutputStream(wxOutputStream&, wxMBConv&)'
sckipc.cpp:(.text+0xc0b): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0xc16): undefined reference to
`wxDataOutputStream::WriteString(wxString const&)'
sckipc.cpp:(.text+0xc20): undefined reference to
`wxDataInputStream::Read8()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::Disconnect()':
sckipc.cpp:(.text+0xdbb): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o):
In function `wxTCPConnection::~wxTCPConnection()':
sckipc.cpp:(.text+0xe5e): undefined reference to
`wxConnectionBase::~wxConnectionBase()'
sckipc.cpp:(.text+0xe75): undefined reference to
`wxConnectionBase::~wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::~wxTCPConnection()':
sckipc.cpp:(.text+0xf00): undefined reference to
`wxConnectionBase::~wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::~wxTCPConnection()':
sckipc.cpp:(.text+0xf9a): undefined reference to
`wxConnectionBase::~wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPEventHandler::Client_OnRequest(wxSocketEvent&)':
sckipc.cpp:(.text+0x1024): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x103f): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x104d): undefined reference to `wxDataInputStream::Read32()'
sckipc.cpp:(.text+0x1058): undefined reference to
`wxConnectionBase::GetBufferAtLeast(unsigned int)'
sckipc.cpp:(.text+0x108b): undefined reference to
`wxDataInputStream::ReadString()'
sckipc.cpp:(.text+0x10b3): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x10c1): undefined reference to `wxDataInputStream::Read32()'
sckipc.cpp:(.text+0x10cc): undefined reference to
`wxConnectionBase::GetBufferAtLeast(unsigned int)'
sckipc.cpp:(.text+0x1100): undefined reference to
`wxDataInputStream::ReadString()'
sckipc.cpp:(.text+0x1155): undefined reference to
`wxDataInputStream::ReadString()'
sckipc.cpp:(.text+0x11a1): undefined reference to
`wxDataInputStream::ReadString()'
sckipc.cpp:(.text+0x11cc): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x11da): undefined reference to `wxDataInputStream::Read32()'
sckipc.cpp:(.text+0x11e5): undefined reference to
`wxConnectionBase::GetBufferAtLeast(unsigned int)'
sckipc.cpp:(.text+0x121c): undefined reference to
`wxDataInputStream::ReadString()'
sckipc.cpp:(.text+0x1247): undefined reference to `wxDataInputStream::Read8()'
sckipc.cpp:(.text+0x1279): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
sckipc.cpp:(.text+0x129d): undefined reference to
`wxDataOutputStream::Write32(unsigned int)'
sckipc.cpp:(.text+0x12df): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::~wxTCPConnection()':
sckipc.cpp:(.text+0xf1e): undefined reference to
`wxConnectionBase::~wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::~wxTCPConnection()':
sckipc.cpp:(.text+0xfb8): undefined reference to
`wxConnectionBase::~wxConnectionBase()'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o):(.gnu.linkonce.r._ZTI15wxTCPConnection[typeinfo for wxTCPConnection]+0x8):
undefined reference to `typeinfo for wxConnectionBase'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o):(.gnu.linkonce.r._ZTI11wxTCPServer[typeinfo for wxTCPServer]+0x8):
undefined reference to `typeinfo for wxServerBase'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o):(.gnu.linkonce.r._ZTI11wxTCPClient[typeinfo for wxTCPClient]+0x8):
undefined reference to `typeinfo for wxClientBase'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxServerBase::~wxServerBase()':
sckipc.cpp:(.gnu.linkonce.t._ZN12wxServerBaseD2Ev[wxServerBase::~wxServerBase()]+0x8):
undefined reference to `vtable for wxServerBase'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxClientBase::~wxClientBase()':
sckipc.cpp:(.gnu.linkonce.t._ZN12wxClientBaseD2Ev[wxClientBase::~wxClientBase()]+0x8):
undefined reference to `vtable for wxClientBase'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxClientBase::wxClientBase()':
sckipc.cpp:(.gnu.linkonce.t._ZN12wxClientBaseC2Ev[wxClientBase::wxClientBase()]+0xf):
undefined reference to `vtable for wxClientBase'
/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxServerBase::wxServerBase()':
sckipc.cpp:(.gnu.linkonce.t._ZN12wxServerBaseC2Ev[wxServerBase::wxServerBase()]+0xf):
undefined reference to `vtable for wxServerBase'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`CED2KServerLink::CED2KServerLink(wxString const&)':
ED2KLink.cpp:(.text+0x246): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x27f): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x2f3): undefined reference to `wxRegEx::~wxRegEx()'
ED2KLink.cpp:(.text+0x321): undefined reference to `wxRegEx::~wxRegEx()'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`CED2KServerLink::CED2KServerLink(wxString const&)':
ED2KLink.cpp:(.text+0x3e4): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x41d): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x491): undefined reference to `wxRegEx::~wxRegEx()'
ED2KLink.cpp:(.text+0x4bf): undefined reference to `wxRegEx::~wxRegEx()'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`CED2KServerListLink::CED2KServerListLink(wxString const&)':
ED2KLink.cpp:(.text+0x67f): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x6c3): undefined reference to `wxRegEx::~wxRegEx()'
ED2KLink.cpp:(.text+0x6e4): undefined reference to `wxRegEx::~wxRegEx()'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`CED2KServerListLink::CED2KServerListLink(wxString const&)':
ED2KLink.cpp:(.text+0x7b7): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x7fb): undefined reference to `wxRegEx::~wxRegEx()'
ED2KLink.cpp:(.text+0x81c): undefined reference to `wxRegEx::~wxRegEx()'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`CED2KLink::CreateLinkFromUrl(wxString const&)':
ED2KLink.cpp:(.text+0x135e): undefined reference to
`wxRegEx::GetMatch(wxString const&, unsigned int) const'
ED2KLink.cpp:(.text+0x143e): undefined reference to `wxRegEx::~wxRegEx()'
ED2KLink.cpp:(.text+0x144f): undefined reference to `wxRegEx::~wxRegEx()'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`wxRegEx::wxRegEx(wxString const&, int)':
ED2KLink.cpp:(.gnu.linkonce.t._ZN7wxRegExC1ERK8wxStringi[wxRegEx::wxRegEx(wxString const&, int)]+0x11):
undefined reference to `wxRegEx::Init()'
ED2KLink.cpp:(.gnu.linkonce.t._ZN7wxRegExC1ERK8wxStringi[wxRegEx::wxRegEx(wxString const&, int)]+0x27):
undefined reference to `wxRegEx::Compile(wxString const&, int)'
./libmuleappcommon.a(libmuleappcommon_a-ED2KLink.o): In function
`wxRegEx::Matches(wxString const&, int) const':
ED2KLink.cpp:(.gnu.linkonce.t._ZNK7wxRegEx7MatchesERK8wxStringi[wxRegEx::Matches(wxString const&, int) const]+0x19):
undefined reference to `wxRegEx::Matches(wchar_t const*, int, unsigned int) const'
./libmuleappcommon.a(libmuleappcommon_a-FileFunctions.o): In function
`UnpackGZipFile(wxString const&)':
FileFunctions.cpp:(.text+0x83a): undefined reference to
`wxZlibInputStream::wxZlibInputStream(wxInputStream&, int)'
FileFunctions.cpp:(.text+0x8a9): undefined reference to
`wxZlibInputStream::~wxZlibInputStream()'
FileFunctions.cpp:(.text+0x8b6): undefined reference to
`wxZlibInputStream::~wxZlibInputStream()'
./libmuleappcommon.a(libmuleappcommon_a-FileFunctions.o): In function
`UnpackZipFile(wxString const&, wchar_t const**)':
FileFunctions.cpp:(.text+0x8f8): undefined reference to
`wxZipFSHandler::wxZipFSHandler()'
FileFunctions.cpp:(.text+0x917): undefined reference to
`wxZipFSHandler::FindFirst(wxString const&, int)'
FileFunctions.cpp:(.text+0xa1b): undefined reference to
`wxZipInputStream::~wxZipInputStream()'
FileFunctions.cpp:(.text+0xa2b): undefined reference to
`wxZipInputStream::~wxZipInputStream()'
FileFunctions.cpp:(.text+0xa44): undefined reference to
`wxZipFSHandler::FindNext()'
FileFunctions.cpp:(.text+0xaa2): undefined reference to
`wxZipFSHandler::~wxZipFSHandler()'
FileFunctions.cpp:(.text+0xabc): undefined reference to
`wxZipFSHandler::~wxZipFSHandler()'
./libmuleappcommon.a(libmuleappcommon_a-FileFunctions.o): In function
`wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)':
FileFunctions.cpp:(.gnu.linkonce.t._ZN16wxZipInputStreamC1ERK8wxStringS2_[wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)]+0x11):
undefined reference to `wxZipInputStream::OpenFile(wxString const&)'
FileFunctions.cpp:(.gnu.linkonce.t._ZN16wxZipInputStreamC1ERK8wxStringS2_[wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)]+0x20):
undefined reference to `wxArchiveInputStream::wxArchiveInputStream(wxInputStream&, wxMBConv&)'
FileFunctions.cpp:(.gnu.linkonce.t._ZN16wxZipInputStreamC1ERK8wxStringS2_[wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)]+0x29):
undefined reference to `vtable for wxZipInputStream'
FileFunctions.cpp:(.gnu.linkonce.t._ZN16wxZipInputStreamC1ERK8wxStringS2_[wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)]+0x66):
undefined reference to `wxZipEntry::wxZipEntry(wxString const&, wxDateTime const&, long long)'
FileFunctions.cpp:(.gnu.linkonce.t._ZN16wxZipInputStreamC1ERK8wxStringS2_[wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)]+0x98):
undefined reference to `wxZipInputStream::Init(wxString const&)'
FileFunctions.cpp:(.gnu.linkonce.t._ZN16wxZipInputStreamC1ERK8wxStringS2_[wxZipInputStream::wxZipInputStream(wxString const&, wxString const&)]+0xb2):
undefined reference to `wxZipEntry::~wxZipEntry()'
collect2: ld returned 1 exit status
aMule CVS 20051118
wx CVS 20051117
GCC 4.0.2
binutils 2.16.91.0.2
aMule configuration:
CFLAGS="-Os" \
CXXFLAGS="-Os" \
LDFLAGS="-L/usr/X11R6/lib" \
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--disable-debug \
--enable-monolithic \
--enable-amule-daemon \
--enable-amulecmd \
--enable-webserver \
--enable-amule-gui \
--enable-cas \
--enable-wxcas \
--enable-ed2k \
--enable-alc \
--enable-alcc \
--enable-systray \
--enable-embedded-crypto \
--with-wx-config=/usr/lib/wx/config/gtk2-unicode-release-static-2.7 \
--with-wxbase-config=/usr/lib/wx/config/gtk2-unicode-release-static-2.7
wx configuration:
CFLAGS="-Os" \
CXXFLAGS="-Os" \
./configure \
--prefix=/usr \
--libdir=/usr/lib \
--disable-shared \
--enable-unicode \
--without-libpng \
--without-libjpeg \
--without-libtiff \
--without-libxpm \
--without-libmspack \
--without-sdl \
--without-gnomeprint \
--without-opengl \
--without-dmalloc \
--with-zlib \
--without-odbc \
--without-expat
Did I disable too much in wx? I wouldn't know what as it's all GUI stuff which is not used by amuled anyway.
It didn't get far enough to compile the monolithic app, but all other apps before amuled compiled and linked fine, including amuleweb and amulegui.
-
To amuled I think you need wxBase. It's a different package.
-
Originally posted by Dante_
To amuled I think you need wxBase.
I have wxBase, as one can see in the linker command:
/usr/lib/libwx_baseu-2.7.a /usr/lib/libwx_baseu_net-2.7.a
amuleweb needs the same libraries and links to them just fine.
Originally posted by Dante_
It's a different package.
No, it was a different package until wx 2.4.2, but since wx 2.5.0 it's installed together with wxGTK.
BTW: This is the wx package I'm using:
http://biolpc22.york.ac.uk/pub/CVS_HEAD/wx-cvs-All.tar.bz2
It installs these libraries:
/usr/lib/libwx_baseu-2.7.a
/usr/lib/libwx_baseu_net-2.7.a
/usr/lib/libwx_baseu_xml-2.7.a
/usr/lib/libwx_gtk2u_adv-2.7.a
/usr/lib/libwx_gtk2u_core-2.7.a
/usr/lib/libwx_gtk2u_html-2.7.a
/usr/lib/libwx_gtk2u_media-2.7.a
/usr/lib/libwx_gtk2u_qa-2.7.a
/usr/lib/libwxregexu-2.7.a
And many include files, of course.
EDIT: amuled is the only app that fails - the monolithic app links fine, if that matters.
-
By experimenting, I found out that the following works:
g++ -Os -DUSE_EMBEDDED_CRYPTO -L/usr/X11R6/lib -lpthread -o amuled
amuled-amuled.o amuled-Timer.o amuled-AICHSyncThread.o amuled-AddFileThread.o
amuled-amule.o amuled-BaseClient.o amuled-ClientList.o amuled-ClientCreditsList.o
amuled-ClientTCPSocket.o amuled-ClientUDPSocket.o amuled-DownloadClient.o
amuled-DownloadQueue.o amuled-EMSocket.o amuled-ECSpecialCoreTags.o
amuled-ExternalConn.o amuled-Friend.o amuled-FriendList.o amuled-HTTPDownload.o
amuled-IPFilter.o amuled-KnownFileList.o amuled-ListenSocket.o
amuled-MuleUDPSocket.o amuled-SearchList.o amuled-ServerConnect.o
amuled-ServerList.o amuled-ServerSocket.o amuled-ServerUDPSocket.o
amuled-SharedFileList.o amuled-UploadBandwidthThrottler.o amuled-UploadClient.o
amuled-UploadQueue.o amuled-Kademlia.o amuled-Search.o amuled-Indexed.o
amuled-KademliaUDPListener.o amuled-Prefs.o amuled-RoutingZone.o amuled-Contact.o
amuled-ClientCredits.o amuled-ECSpecialMuleTags.o amuled-KnownFile.o
amuled-GetTickCount.o amuled-Logger.o amuled-PartFile.o amuled-Preferences.o
amuled-Proxy.o amuled-Server.o amuled-Statistics.o amuled-StatTree.o
amuled-SHAHashSet.o amuled-OtherFunctions.o amuled-CryptoPP.o -pthread
-L/usr/X11R6/lib /usr/lib/libwx_baseu-2.7.a /usr/lib/libwx_baseu_net-2.7.a -lwxregexu-2.7 -lz
-ldl -lm -L. -lmuleappcore -L. -lmuleappcommon -Llibs/common -Llibs/ec -lmulecommon -lec
/usr/lib/libwx_baseu-2.7.a /usr/lib/libwx_baseu_net-2.7.a -lwxregexu-2.7 -lz -Wl,-Bstatic -lbfd
-liberty -Wl,-Bdynamic
The difference is that the wx libraries are *twice* in the linker command. Then it works.
Should that change go into the code? I know that you changed a very similar thing very few days ago with the same result, i.e. that the wx libraries are twice in the linker command. I don't know the exact day and file, but I know that I had another linker problem before that was fixed afterwards. I fixed it myself by only rearranging the linker command, but your change to link it twice worked as well.
If the change should go into the code, I can prepare a patch.
-
ther is no point on adding libs twice.
Now, to add them in the proper place, maybe ;)
-
Originally posted by Kry
ther is no point on adding libs twice.
Are you 100% sure? I admit that I lost my bookmarks some time ago, but I remember that it can sometimes be necessary when two libraries "depend on each other" (it was not exactly that, but similar). I don't know if that's the case here, but it doesn't do any harm either because e.g. zlib is linked twice as well (it's added multiple times from various *-config scripts).
Originally posted by Kry
Now, to add them in the proper place, maybe ;)
I didn't manage to get it working by reordering only.
The problem seems to be in src/Makefile.am, line 257. There are six possibilities to arrange them:
amuled_LDADD = $(WXBASE_LIBS) $(core_libs) $(common_libs)
amuled_LDADD = $(core_libs) $(common_libs) $(WXBASE_LIBS)
amuled_LDADD = $(core_libs) $(WXBASE_LIBS) $(common_libs)
amuled_LDADD = $(WXBASE_LIBS) $(common_libs) $(core_libs)
amuled_LDADD = $(common_libs) $(core_libs) $(WXBASE_LIBS)
amuled_LDADD = $(common_libs) $(WXBASE_LIBS) $(core_libs)
None of them works for me.
The following doesn't work either:
amuled_LDADD = $(WXBASE_LIBS) $(core_libs) $(WXBASE_LIBS) $(common_libs)
But these two work for me:
amuled_LDADD = $(WXBASE_LIBS) $(core_libs) $(common_libs) $(WXBASE_LIBS)
amuled_LDADD = $(core_libs) $(WXBASE_LIBS) $(common_libs) $(WXBASE_LIBS)
-
I know that you changed a very similar thing very few days ago with the same result, i.e. that the wx libraries are twice in the linker command.
I don't remember such a thing and would kill anyone doing so.
... two libraries "depend on each other"
Means bad library design.
The problem seems to be in src/Makefile.am, line 257. There are six possibilities to arrange them:
amuled_LDADD = $(WXBASE_LIBS) $(core_libs) $(common_libs)
amuled_LDADD = $(core_libs) $(common_libs) $(WXBASE_LIBS)
amuled_LDADD = $(core_libs) $(WXBASE_LIBS) $(common_libs)
amuled_LDADD = $(WXBASE_LIBS) $(common_libs) $(core_libs)
amuled_LDADD = $(common_libs) $(core_libs) $(WXBASE_LIBS)
amuled_LDADD = $(common_libs) $(WXBASE_LIBS) $(core_libs)
None of them works for me.
The following doesn't work either:
amuled_LDADD = $(WXBASE_LIBS) $(core_libs) $(WXBASE_LIBS) $(common_libs)
But these two work for me:
amuled_LDADD = $(WXBASE_LIBS) $(core_libs) $(common_libs) $(WXBASE_LIBS)
amuled_LDADD = $(core_libs) $(WXBASE_LIBS) $(common_libs) $(WXBASE_LIBS)
This one should have been ok: amuled_LDADD = $(common_libs) $(core_libs) $(WXBASE_LIBS)
If you can only fix it by adding wx libraries twice, then it means that the error is in the wx libraries. The following is an example:/usr/lib/libwx_baseu_net-2.7.a(netlib_sckipc.o): In function
`wxTCPConnection::Disconnect()':
sckipc.cpp:(.text+0xdbb): undefined reference to
`wxDataOutputStream::Write8(unsigned char)'
where you can see wx referencing to itself. As you're using the development version of the library, such things may occur. Report this bug to wx developers.
-
Originally posted by GonoszTopi
I don't remember such a thing and would kill anyone doing so.
Sure? ;)
I found it again: It was not WXBASE_LIBS, but BFD_LIB and it was between 20051111 and 20051112 in src/Makefile.am.
in 20051111:
remote_common_libs = $(ZLIB_LIBS) $(RESOLV_LIB) $(BFD_LIB) -L. -lmulecommon -leccommon
common_libs = $(CRYPTOLIBS) $(remote_common_libs) -lmuleappcommon
=> BFD_LIB linked only once from remote_common_libs, but in the wrong order
=> not working
in 20051112
remote_common_libs = $(ZLIB_LIBS) $(RESOLV_LIB) $(BFD_LIB) -L. -Llibs/common -Llibs/ec -lmulecommon -lec
common_libs = $(CRYPTOLIBS) $(remote_common_libs) $(BFD_LIB) -lmuleappcommon
=> BFD_LIB in remote_common_libs, remote_common_libs and BFD_LIB in common_libs
=> BFD_LIB linked twice
=> accidentally working, although not the correct solution
But it doesn't matter any more because it was correctlly fixed a few days later without linking BFD_LIB twice.
=> Simply forget about it.
Originally posted by GonoszTopi
As you're using the development version of the library, such things may occur. Report this bug to wx developers.
Thanks, I'll investigate and maybe report it.
-
They tend to like reports much more which already have a patch attached to fix the bug. :P
-
That's clear, but I fear I won't be able to do that... ;(
-
Originally posted by GonoszTopi
They tend to like reports much more which already have a patch attached to fix the bug. :P
You also? ;)
No, seriously: It's a bug in your code and the fix is attached. 8)
-
changing the libs order from base,net to net,base is a bug in OUR code?
-
Looks like that. When querying libraries separately as in your wxwin.m4, wx-config returns them in the same order as queried. The net library depends on the base library, so the base library must be queried last. I doubt that it's wx' fault this time because wx' own wxwin.m4 doesn't query libraries separately at all.
By the way: Querying for "base,net" or "net,base" is redundant as one of them depends on the other, so it's sufficient to query for the most specific one because wx-config will then return the other needed ones automatically in the right order.
Try:
$ wx-config --libs base
-pthread -L/usr/X11R6/lib /usr/lib/libwx_baseu-2.7.a -lwxregexu-2.7 -lz -ldl -lm
=> Not sufficient because only base is returned
$ wx-config --libs net
-pthread -L/usr/X11R6/lib /usr/lib/libwx_baseu_net-2.7.a /usr/lib/libwx_baseu-2.7.a -lwxregexu-2.7 -lz -ldl -lm
=> Absolutely sufficient. base is pulled in by net in the right order because net depends on base.
$ wx-config --libs base,net
-pthread -L/usr/X11R6/lib /usr/lib/libwx_baseu-2.7.a /usr/lib/libwx_baseu_net-2.7.a -lwxregexu-2.7 -lz -ldl -lm
=> Same as above, but in the wrong order, exactly as queried.
$ wx-config --libs net,base
-pthread -L/usr/X11R6/lib /usr/lib/libwx_baseu_net-2.7.a /usr/lib/libwx_baseu-2.7.a -lwxregexu-2.7 -lz -ldl -lm
=> In the right order again. This time not because wx-config pulls the dependencies in automatically, but because the querying order is correct.
I'd suggest to still use "wx-config --libs net,base", not "wx-config --libs net" because I don't know if all wx versions pull their dependencies in automatically.
-
Can someone please review this proposal for 2.1 (without being angry in advance - this is not an accusation)? Otherwise it's not possible to build the product with static wx libraries (of any version), but I think it should because it does actually work very well from the software side of things (only the build system has a minor problem) and there is a configure option "--enable-static" which doesn't work at the moment for amuled.
BTW: Half of the proposal is already in CVS, only the m4/wxwin.m4 stuff remains to be reviewed (please note that m4/wxwin.m4 is not the wxwin.m4 from wx; it's a custom one as you can see here (http://lists.wxwidgets.org/archive/wx-users/msg63473.html) from the wording "in my m4 stuff"). Feel free to add questions, comments, proposals what wx-config should do instead of what it's doing now etc...
-
Committed.
-
Thank you very much! It's exactly the right day to do it because now that wx >= 2.6.0 is required, it's much easier for packagers to support old distros with static wx libraries. Thanks!