aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Linking order problem - reloaded  (Read 11134 times)

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Linking order problem - reloaded
« on: December 18, 2005, 08:30:55 AM »

Hi,

using aMule CVS 20051218 and wx CVS 20051218 from here, I have the following problem:
Code: [Select]
g++  -O2 -g -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
-ffunction-sections -fdata-sections -I/usr/include -D__CRYPTO_MDK_SUSE_FC__ -W -Wall
-Wshadow -Wundef    -Wl,--gc-sections -L/usr/X11R6/lib -L/usr/lib  -lpthread -o amulegui
amulegui-amule-remote-gui.o amulegui-amule-gui.o amulegui-amuleDlg.o
amulegui-AddFriend.o amulegui-ChatSelector.o amulegui-ClientDetailDialog.o
amulegui-FileDetailDialog.o amulegui-KadDlg.o amulegui-OScopeCtrl.o
amulegui-PartFileConvert.o amulegui-PrefsUnifiedDlg.o amulegui-SearchDlg.o
amulegui-ServerWnd.o amulegui-SharedFilesWnd.o amulegui-StatisticsDlg.o
amulegui-SearchListCtrl.o amulegui-DownloadListCtrl.o amulegui-ClientListCtrl.o
amulegui-FriendListCtrl.o amulegui-ServerListCtrl.o amulegui-SharedFilesCtrl.o
amulegui-MuleTrayIcon.o amulegui-TransferWnd.o amulegui-ClientCredits.o
amulegui-ECSpecialMuleTags.o amulegui-KnownFile.o amulegui-GetTickCount.o
amulegui-Logger.o amulegui-PartFile.o amulegui-Preferences.o amulegui-Proxy.o
amulegui-Server.o amulegui-Statistics.o amulegui-StatTree.o amulegui-SHAHashSet.o
amulegui-OtherFunctions.o -L. -lmuleappcommon -Llibs/common -Llibs/ec -lmulecommon
-lec -lz  -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic -lcryptopp -L. -lmuleappgui  -pthread
-L/usr/X11R6/lib  /usr/lib/libwx_gtk2u_core-2.7.a /usr/lib/libwx_gtk2u_adv-2.7.a
/usr/lib/libwx_baseu_net-2.7.a /usr/lib/libwx_baseu-2.7.a -pthread -L/usr/X11R6/lib
-L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0
-lgmodule-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12 -lglitz -lgthread-2.0 -lglib-2.0
-lXinerama -lXxf86vm -lwxregexu-2.7 -lz -ldl -lm
/usr/lib/libwx_gtk2u_adv-2.7.a(advlib_taskbarx11.o): In function
`wxTaskBarIconArea::SetTrayIcon(wxBitmap const&)':
./src/unix/taskbarx11.cpp:160: undefined reference to `wxRegion::Union(wxBitmap const&)'
collect2: ld returned 1 exit status
make[3]: *** [amulegui] Fehler 1
make[3]: Leaving directory `/usr/src/packages/BUILD/amule-cvs/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/usr/src/packages/BUILD/amule-cvs/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/usr/src/packages/BUILD/amule-cvs'
make: *** [all] Fehler 2
error: Bad exit status from /var/tmp/rpm-tmp.9068 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.9068 (%build)
This one fixes it for me:
Code: [Select]
--- configure.in
+++ configure.in
@@ -365,7 +365,7 @@
 
 # For proper compilation flags
 
-WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs core,adv,net`
+WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net`
 
 WXBASE_LIBS=`$WX_CONFIG_WITH_ARGS --libs net`
 WXBASE_CXXFLAGS="$WX_CXXFLAGS -DwxUSE_GUI=0"
Warning: It's only tested on Linux and only with static wx CVS 20051218.

EDIT: It really looks like advlib depends on corelib. From my dynamic wx copy:
Code: [Select]
$ ldd /usr/lib/libwx_gtk2u_adv-2.6.so.0 | grep wx
        libwx_gtk2u_core-2.6.so.0 => /usr/lib/libwx_gtk2u_core-2.6.so.0 (0x408bb000)
        libwx_baseu-2.6.so.0 => /usr/lib/libwx_baseu-2.6.so.0 (0x40bb7000)

$ ldd /usr/lib/libwx_gtk2u_core-2.6.so.0 | grep wx
        libwx_baseu-2.6.so.0 => /usr/lib/libwx_baseu-2.6.so.0 (0x40b15000)
So even without testing wx 2.6 (I only have dynamic wx 2.6 and the problem will not pop up with dynamic wx), I'm quite sure that it's not a temporary problem in wx CVS. advlib depends on corelib and therefore the order should be reversed.
« Last Edit: December 18, 2005, 08:51:04 AM by Gerd78 »
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: Linking order problem - reloaded
« Reply #1 on: December 18, 2005, 06:04:02 PM »

kry fixed it...
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Linking order problem - reloaded
« Reply #2 on: December 18, 2005, 06:06:30 PM »

Thanks!
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Linking order problem - reloaded
« Reply #3 on: December 23, 2005, 03:18:06 PM »

Hi,

although I don't really understand today's change in configure.in (the main difference I see is that aMule now requires an expat-enabled wx setup and that the resulting binary depends on libexpat.so.0 which it didn't before), I see the following problem:
Code: [Select]
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net,html,xml`This works accidentally (maybe because only some of the *.o's from html and xml are used and these ones accidentally don't have problematic references), but it might stop working later if more or other *.o's are used or if some internal things in wx change.

html depends on core:
Code: [Select]
$ ldd /usr/lib/libwx_gtk2u_html-2.6.so.0.0.0 | grep wx
        libwx_gtk2u_core-2.6.so.0 => /usr/lib/libwx_gtk2u_core-2.6.so.0 (0x408b0000)
        libwx_baseu-2.6.so.0 => /usr/lib/libwx_baseu-2.6.so.0 (0x40bac000)
Therefore html should be before core to be safe.

In general, the safest method to get the correct order is to run "wx-config --libs" with no additional arguments.
Code: [Select]
$ wx-config --libs
-pthread   -L/usr/X11R6/lib  /usr/lib/libwx_gtk2u_xrc-2.7.a /usr/lib/libwx_gtk2u_qa-2.7.a
/usr/lib/libwx_gtk2u_html-2.7.a /usr/lib/libwx_gtk2u_adv-2.7.a /usr/lib/libwx_gtk2u_core-2.7.a
/usr/lib/libwx_baseu_xml-2.7.a /usr/lib/libwx_baseu_net-2.7.a /usr/lib/libwx_baseu-2.7.a
-pthread -L/usr/X11R6/lib -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lfreetype -lfontconfig -lXrender -lX11 -lXext -lpng12
-lglitz -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm -lexpat -lwxregexu-2.7 -lz -ldl -lm
According to this output, I propose the following change:
Code: [Select]
--- configure.in
+++ configure.in
@@ -365,7 +365,7 @@
 
 # For proper compilation flags
 
-WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net,html,xml`
+WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs html,adv,core,xml,net`
 
 WXBASE_LIBS=`$WX_CONFIG_WITH_ARGS --libs net`
 WXBASE_CXXFLAGS="$WX_CXXFLAGS -DwxUSE_GUI=0"
By the way: Why are html and xml needed at all? I tried reverting today's change in configure.in altogether and everything went fine. Are they needed on another platform? If so, could someone using that platform test if the current state and the proposed change work with static wx libraries?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Linking order problem - reloaded
« Reply #4 on: December 23, 2005, 03:48:24 PM »

phoenix did change it because he was getting link errors with current wx. I'll check what's up... at some point.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Linking order problem - reloaded
« Reply #5 on: December 23, 2005, 04:49:40 PM »

Gerd78,

Someone in the wx team must have changed something that altered dependencies. I agree, html and xml should not belong here. But we need to compile and link, you know :P I will commit your suggestion, but the definitive solution is only possible when our friends in the wx team fix these deps. ;)

This is what I get without html and xml with yesterday's wxCVS:
Code: [Select]
/usr/bin/ld: warning: libwx_gtk2ud_html-2.7.so.0, needed by /usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libwx_baseud_xml-2.7.so.0, needed by /usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so, not found (try using -rpath or -rpath-link)
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::GetSelectedTextBgColour(wxColour const&) const@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::RefreshAll()@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `typeinfo for wxHtmlListBox@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::sm_eventTable@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxXmlDocument::Load(wxInputStream&, wxString const&)@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::OnGetItemMarkup(unsigned int) const@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxXmlDocument::wxXmlDocument()@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxXmlNode::GetPropVal(wxString const&, wxString const&) const@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::Init()@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `vtable for wxHtmlListBox@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::ms_classInfo@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::SetItemCount(unsigned int)@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::OnMeasureItem(unsigned int) const@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&)@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::RefreshLine(unsigned int)@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::~wxHtmlListBox()@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::OnDrawItem(wxDC&, wxRect const&, unsigned int) const@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::GetSelectedTextColour(wxColour const&) const@WXUD_2.7'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to `wxHtmlListBox::RefreshLines(unsigned int, unsigned int)@WXUD_2.7'
collect2: ld returned 1 exit status
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Linking order problem - reloaded
« Reply #6 on: December 23, 2005, 06:05:12 PM »

Ah, I see!

This error message is very confusing because it suggests that libwx_gtk2ud_adv-2.7.so needs libwx_gtk2ud_html-2.7.so.0 at run-time, but that's not correct. It should only be needed at link-time.

Try something like this:
Code: [Select]
env LDFLAGS="-Wl,-rpath-link,/path/to/the/wx-libraries ./configureThis tells the linker where it can find libraries required by other libraries at link-time.

Don't confuse it with the "-L" option: They are very different. "-L" tells the linker where to find the libraries that should be linked in, while "-Wl,-rpath-link" tells the linker where to find libraries that should not be linked in, but are required by other libraries that should.

Usually it should be equivalent to add the directory with the libraries to LD_LIBRARY_PATH. Is it possible that you forgot that? I'll try to reproduce it with tomorrow's wx CVS.

From ld's man page:
Code: [Select]
     -rpath-link DIR
           When using ELF or SunOS, one shared library  may  require  another.
           This happens when an "ld -shared" link includes a shared library as
           one of the input files.

           When  the  linker  encounters  such  a  dependency  when  doing   a
           non-shared,  non-relocatable  link,  it  will  automatically try to
           locate the required shared library and include it in the  link,  if
           it  is  not  included  explicitly.  In such a case, the -rpath-link
           option specifies the first  set  of  directories  to  search.   The
           -rpath-link option may specify a sequence of directory names either
           by specifying a list of names separated by colons, or by  appearing
           multiple times.

           This  option should be used with caution as it overrides the search
           path that may have been hard compiled into  a  shared  library.  In
           such  a  case  it  is  possible  to use unintentionally a different
           search path than the runtime linker would do.

           The linker uses the  following  search  paths  to  locate  required
           shared libraries.

           1.  Any directories specified by -rpath-link options.

           2.  Any  directories  specified  by -rpath options.  The difference
               between -rpath and -rpath-link is that directories specified by
               -rpath  options are included in the executable and used at run-
               time, whereas the -rpath-link option is only effective at  link
               time. It is for the native linker only.

           3.  On  an  ELF system, if the -rpath and "rpath-link" options were
               not used, search  the  contents  of  the  environment  variable
               "LD_RUN_PATH". It is for the native linker only.

           4.  On  SunOS, if the -rpath option was not used, search any direc-
               tories specified using -L options.

           5.  For a native linker, the contents of the  environment  variable
               "LD_LIBRARY_PATH".

           6.  For  a  native  ELF  linker, the directories in "DT_RUNPATH" or
               "DT_RPATH"  of  a  shared  library  are  searched  for   shared
               libraries  needed  by it. The "DT_RPATH" entries are ignored if
               "DT_RUNPATH" entries exist.

           7.  The default directories, normally /lib and /usr/lib.

           8.  For  a  native  linker  on  an  ELF   system,   if   the   file
               /etc/ld.so.conf  exists,  the list of directories found in that
               file.

           If the required shared library is not found, the linker will  issue
           a warning and continue with the link.
But the whole thing is still very strange because my executable did not become larger although I used static libraries. Usually this means that some of the libraries are not used at all. I'll try shared libraries tomorrow and look if either LD_LIBRARY_PATH or "-Wl,-rpath-link" fixes the problem.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Linking order problem - reloaded
« Reply #7 on: December 23, 2005, 08:47:41 PM »

OK, I tried to reproduce the problem as closely as possible. This is what I did:

1. Installed wx CVS 20051223:
Code: [Select]
$ ./configure --prefix=/usr/local/wxWidgets-cvsu --enable-unicode --enable-debug
$ make
$ sudo make install
2. Applied this patch to aMule CVS 20051223 to restore the previous flags and ran ./autogen.sh:
Code: [Select]
--- configure.in
+++ configure.in
@@ -365,7 +365,7 @@
 
 # For proper compilation flags
 
-WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net,html,xml`
+WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net`
 
 WXBASE_LIBS=`$WX_CONFIG_WITH_ARGS --libs net`
 WXBASE_CXXFLAGS="$WX_CXXFLAGS -DwxUSE_GUI=0"
3. Installed aMule:
Code: [Select]
export PATH=/usr/local/wxWidgets-cvsu/bin:$PATH
./configure
make
Result: Same as yours.
Code: [Select]
$ g++  -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -g -ggdb -fno-inline
-D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
-lpthread -o amule  amule-AICHSyncThread.o amule-AddFileThread.o amule-amule.o
amule-BaseClient.o amule-ClientList.o amule-ClientCreditsList.o
amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-DownloadClient.o
amule-DownloadQueue.o amule-EMSocket.o amule-ECSpecialCoreTags.o
amule-ExternalConn.o amule-Friend.o amule-FriendList.o amule-HTTPDownload.o
amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o
amule-MuleUDPSocket.o amule-SearchList.o amule-ServerConnect.o
amule-ServerList.o amule-ServerSocket.o amule-ServerUDPSocket.o
amule-SharedFileList.o amule-UploadBandwidthThrottler.o amule-UploadClient.o
amule-UploadQueue.o amule-Kademlia.o amule-Search.o amule-Indexed.o
amule-KademliaUDPListener.o amule-Prefs.o amule-RoutingZone.o amule-Contact.o
amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-ChatSelector.o
amule-ClientDetailDialog.o amule-FileDetailDialog.o amule-KadDlg.o
amule-OScopeCtrl.o amule-PartFileConvert.o amule-PrefsUnifiedDlg.o
amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o
amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-ClientListCtrl.o
amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o
amule-MuleTrayIcon.o amule-TransferWnd.o amule-ClientCredits.o
amule-ECSpecialMuleTags.o amule-KnownFile.o amule-GetTickCount.o amule-Logger.o
amule-PartFile.o amule-Preferences.o amule-Proxy.o amule-Server.o
amule-Statistics.o amule-StatTree.o amule-SHAHashSet.o amule-OtherFunctions.o
-L. -lmuleappcommon -Llibs/common -Llibs/ec -lmulecommon -lec -lz  -lbfd
-liberty  -L. -lmuleappcore -L. -lmuleappgui  -L/usr/local/wxWidgets-cvsu/lib
-pthread   -L/usr/X11R6/lib  -lwx_gtk2ud_adv-2.7 -lwx_gtk2ud_core-2.7
-lwx_baseud_net-2.7 -lwx_baseud-2.7
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: warning:
libwx_gtk2ud_html-2.7.so.0, needed by
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so, not found (try using
-rpath or -rpath-link)
/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/ld: warning:
libwx_baseud_xml-2.7.so.0, needed by
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so, not found (try using
-rpath or -rpath-link)
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxXmlNode::GetPropVal(wxString const&, wxString const&) const'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::GetSelectedTextColour(wxColour const&) const'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::SetItemCount(unsigned int)'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::OnMeasureItem(unsigned int) const'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxXmlDocument::wxXmlDocument()'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::Create(wxWindow*, int, wxPoint const&, wxSize const&, long,
wxString const&)'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::OnDrawItem(wxDC&, wxRect const&, unsigned int) const'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::OnGetItemMarkup(unsigned int) const'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxXmlDocument::Load(wxInputStream&, wxString const&)'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`typeinfo for wxHtmlListBox'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::RefreshAll()'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::Init()'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::ms_classInfo'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::sm_eventTable'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::GetSelectedTextBgColour(wxColour const&) const'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::RefreshLine(unsigned int)'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::RefreshLines(unsigned int, unsigned int)'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`wxHtmlListBox::~wxHtmlListBox()'
/usr/local/wxWidgets-cvsu/lib/libwx_gtk2ud_adv-2.7.so: undefined reference to
`vtable for wxHtmlListBox'
collect2: ld returned 1 exit status
make[3]: *** [amule] Fehler 1
make[3]: Leaving directory `/usr/src/packages/SOURCES/amule-cvs/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/usr/src/packages/SOURCES/amule-cvs/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/usr/src/packages/SOURCES/amule-cvs'
make: *** [all] Fehler 2
Then I copied the last command executed by make and added "-Wl,-rpath-link,/usr/local/wxWidgets-cvsu/lib" manually. Result:
Code: [Select]
$ cd src
$ g++ -Wl,-rpath-link,/usr/local/wxWidgets-cvsu/lib -DUSE_EMBEDDED_CRYPTO
-W -Wall -Wshadow -Wundef -g -ggdb -fno-inline
-D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
-lpthread -o amule  amule-AICHSyncThread.o amule-AddFileThread.o amule-amule.o
amule-BaseClient.o amule-ClientList.o amule-ClientCreditsList.o
amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-DownloadClient.o
amule-DownloadQueue.o amule-EMSocket.o amule-ECSpecialCoreTags.o
amule-ExternalConn.o amule-Friend.o amule-FriendList.o amule-HTTPDownload.o
amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o
amule-MuleUDPSocket.o amule-SearchList.o amule-ServerConnect.o
amule-ServerList.o amule-ServerSocket.o amule-ServerUDPSocket.o
amule-SharedFileList.o amule-UploadBandwidthThrottler.o amule-UploadClient.o
amule-UploadQueue.o amule-Kademlia.o amule-Search.o amule-Indexed.o
amule-KademliaUDPListener.o amule-Prefs.o amule-RoutingZone.o amule-Contact.o
amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-ChatSelector.o
amule-ClientDetailDialog.o amule-FileDetailDialog.o amule-KadDlg.o
amule-OScopeCtrl.o amule-PartFileConvert.o amule-PrefsUnifiedDlg.o
amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o
amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-ClientListCtrl.o
amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o
amule-MuleTrayIcon.o amule-TransferWnd.o amule-ClientCredits.o
amule-ECSpecialMuleTags.o amule-KnownFile.o amule-GetTickCount.o amule-Logger.o
amule-PartFile.o amule-Preferences.o amule-Proxy.o amule-Server.o
amule-Statistics.o amule-StatTree.o amule-SHAHashSet.o amule-OtherFunctions.o
-L. -lmuleappcommon -Llibs/common -Llibs/ec -lmulecommon -lec -lz  -lbfd
-liberty  -L. -lmuleappcore -L. -lmuleappgui  -L/usr/local/wxWidgets-cvsu/lib
-pthread   -L/usr/X11R6/lib  -lwx_gtk2ud_adv-2.7 -lwx_gtk2ud_core-2.7
-lwx_baseud_net-2.7 -lwx_baseud-2.7
$ echo $?
0
And then I ran make again with LD_LIBRARY_PATH. Result:
Code: [Select]
$ env LC_ALL=C LD_LIBRARY_PATH=/usr/local/wxWidgets-cvsu/lib make amule
make: `amule' is up to date.
$ rm -f amule
$ env LC_ALL=C LD_LIBRARY_PATH=/usr/local/wxWidgets-cvsu/lib make amule
$ g++  -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -g -ggdb -fno-inline
-D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
-lpthread -o amule  amule-AICHSyncThread.o amule-AddFileThread.o amule-amule.o
amule-BaseClient.o amule-ClientList.o amule-ClientCreditsList.o
amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-DownloadClient.o
amule-DownloadQueue.o amule-EMSocket.o amule-ECSpecialCoreTags.o
amule-ExternalConn.o amule-Friend.o amule-FriendList.o amule-HTTPDownload.o
amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o
amule-MuleUDPSocket.o amule-SearchList.o amule-ServerConnect.o
amule-ServerList.o amule-ServerSocket.o amule-ServerUDPSocket.o
amule-SharedFileList.o amule-UploadBandwidthThrottler.o amule-UploadClient.o
amule-UploadQueue.o amule-Kademlia.o amule-Search.o amule-Indexed.o
amule-KademliaUDPListener.o amule-Prefs.o amule-RoutingZone.o amule-Contact.o
amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-ChatSelector.o
amule-ClientDetailDialog.o amule-FileDetailDialog.o amule-KadDlg.o
amule-OScopeCtrl.o amule-PartFileConvert.o amule-PrefsUnifiedDlg.o
amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o
amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-ClientListCtrl.o
amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o
amule-MuleTrayIcon.o amule-TransferWnd.o amule-ClientCredits.o
amule-ECSpecialMuleTags.o amule-KnownFile.o amule-GetTickCount.o amule-Logger.o
amule-PartFile.o amule-Preferences.o amule-Proxy.o amule-Server.o
amule-Statistics.o amule-StatTree.o amule-SHAHashSet.o amule-OtherFunctions.o
-L. -lmuleappcommon -Llibs/common -Llibs/ec -lmulecommon -lec -lz  -lbfd
-liberty  -L. -lmuleappcore -L. -lmuleappgui  -L/usr/local/wxWidgets-cvsu/lib
-pthread   -L/usr/X11R6/lib  -lwx_gtk2ud_adv-2.7 -lwx_gtk2ud_core-2.7
-lwx_baseud_net-2.7 -lwx_baseud-2.7
$ echo $?
0
$ ldd amule | grep wx
        libwx_gtk2ud_adv-2.7.so.0 => not found
        libwx_gtk2ud_core-2.7.so.0 => not found
        libwx_baseud_net-2.7.so.0 => not found
        libwx_baseud-2.7.so.0 => not found
You see that both solutions worked and that the resulting binary was linked only to the really needed wx libraries. The other ones are only needed at link time.

So there are three suggestions:

1. Tell people to set LD_LIBRARY_PATH before building aMule - best solution because most people use the default /usr/local anyway, which doesn't require LD_LIBRARY_PATH to be set because /usr/local/lib is already in /etc/ld.so.conf unless the distro is really broken.

2. Send an enhancement request to the wx people to expose "-Wl,-rpath-link,/where/the/libraries/are" through their wx-config script - not optimal because they would have to do it conditionally because not all linkers on all platforms accept it.

3. Add "-Wl,-rpath-link,/where/the/libraries/are" to aMule's configure script - worst solution for obvious reasons.

4. Simply forget about it and use "wx-config --libs" without additional arguments - aMule will then use all libraries. Not the best solution, but simple and guaranteed to work.

Furthermore, I agree that wx CVS is currently broken - you can check it yourself by running "ldd -u and you will see that many of them are linked to unneeded ones. But it's still not necessary to copy this behaviour in aMule. ;)
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Linking order problem - reloaded
« Reply #8 on: December 23, 2005, 11:43:25 PM »

Gerd78,

First, great job! :)

Quote
Originally posted by Gerd78
You see that both solutions worked and that the resulting binary was linked only to the really needed wx libraries. The other ones are only needed at link time.

So there are three suggestions:

1. Tell people to set LD_LIBRARY_PATH before building aMule - best solution because most people use the default /usr/local anyway, which doesn't require LD_LIBRARY_PATH to be set because /usr/local/lib is already in /etc/ld.so.conf unless the distro is really broken.
I personally don't think this is a good solution. This is an obscure procedure that will diminish the chances that someone can compile aMule without reading docs. You should not have to set LD_LIBRARY_PATH to build a program. I never did this to any other program.

Quote
Originally posted by Gerd78
2. Send an enhancement request to the wx people to expose "-Wl,-rpath-link,/where/the/libraries/are" through their wx-config script - not optimal because they would have to do it conditionally because not all linkers on all platforms accept it.
I doubt they will accept it.

Quote
Originally posted by Gerd78
3. Add "-Wl,-rpath-link,/where/the/libraries/are" to aMule's configure script - worst solution for obvious reasons.
Could you elaborate more on that? That was actually the solution I thought. The configure script is supposed to find the path of the library, why not add this string to the compilation flags?

Quote
Originally posted by Gerd78
4. Simply forget about it and use "wx-config --libs" without additional arguments - aMule will then use all libraries. Not the best solution, but simple and guaranteed to work.
Yes, I agree, not the best solution, but simple. I still prefer number 3.

Quote
Originally posted by Gerd78
Furthermore, I agree that wx CVS is currently broken - you can check it yourself by running "ldd -u and you will see that many of them are linked to unneeded ones. But it's still not necessary to copy this behaviour in aMule. ;)
Well, the conclusion up to here is that we can:

1) Leave as it is, the wx devs will soon fix it and it will all be history. Might work, but requires some talk with them to expose this problem. Also might take some time.

2) Use suggestions number 3 or number 4. This is assuming that wx would stay "broken" like that forever. In that case, I still preffer number 3 over number 4.

I think we need more opinions here.
Cheers!
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Linking order problem - reloaded
« Reply #9 on: December 24, 2005, 01:46:16 AM »

Gerd78,

I have committed this patch, which seems to work and implements your suggestion number 3. Please, tell me what you think.

Cheers!

Code: [Select]
Index: configure.in
===================================================================
--- configure.in        (revision 6184)
+++ configure.in        (working copy)
@@ -365,7 +365,10 @@

 # For proper compilation flags

-WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs html,adv,core,xml,net`
+WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net`
+# The following is here to work around a library dependency wx bug.
+# Please remove when they have it fixed.
+WX_LIBS="$WX_LIBS -Wl,-rpath-link,`$WX_CONFIG_WITH_ARGS --prefix`/lib"

 WXBASE_LIBS=`$WX_CONFIG_WITH_ARGS --libs net`
 WXBASE_CXXFLAGS="$WX_CXXFLAGS -DwxUSE_GUI=0"
@@ -470,7 +473,7 @@
        VL_LIB_READLINE
 fi

-# DO NOT MOVE UP...THAT'S A REASON TO BE HERE!!
+# DO NOT MOVE UP... THERE'S A REASON TO BE HERE!!

 AM_OPTIONS_CCACHE_PFX

Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Linking order problem - reloaded
« Reply #10 on: December 24, 2005, 10:30:23 AM »

Hi,

I'm sorry, but I'm not really convinced:

- I don't know if this works on all systems. It will probably work on all 32-bit Linux systems and on all Solaris systems, but not on non-Linux Unices which don't use GNU ld. Options starting with "-Wl" are passed by the compiler to the linker, so it works only if the linker supports "-rpath-link". GNU ld and Sun ld support it, but maybe not all others. The most well-known system that doesn't use GNU ld is Mac OS X. For some of the commercial Unices, it's recommended by GNU to use GCC with the platform's native linker for compatibility reasons.

- "`$WX_CONFIG_WITH_ARGS --prefix`/lib" is not safe if "--libdir=" was passed to wxWidgets' ./configure. The libraries are not necessarily there. Maybe it doesn't look smart to do that, but the file system hierarchy standard even requires it on some hardware architectures:

http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64

This policy is followed by at least Fedora, Mandriva, SuSE and all distros derived from one of the above - they use "./configure --libdir=${prefix}/lib64" for every library package on x86_64 systems in order to allow concurrent installations of x86 and x86_64 libraries. Other distros will probably follow sooner or later if they want to be LSB-certified. Not all people like ./lib64, but it's in use anyway, we can't change it...

Why not rely on LD_LIBRARY_PATH? wxWidgets' make procedure displays such a hint at the end of "make install". From wxWidgets' Makefile.in, lines 9442 to 9456:
Code: [Select]
@echo " "
@echo " ------------------------------------------------------"
@echo " "
@echo " The installation of wxWidgets is finished.  On certain"
@echo " platforms (e.g. Linux) you'll now have to run ldconfig"
@echo " if you installed a shared library and also modify the"
@echo " LD_LIBRARY_PATH (or equivalent) environment variable."
@echo " "
@echo " wxWidgets comes with no guarantees and doesn't claim"
@echo " to be suitable for any purpose."
@echo " "
@echo " Read the wxWidgets Licence on licencing conditions."
@echo " "
@echo " ------------------------------------------------------"
@echo " "
Why I don't think that this is a problem:

- Most people just use ./configure and ignore all the optional arguments. For these people, the libraries will end up in /usr/local/lib. This is already in the search path for most Linux systems. If not, they would have to add it to LD_LIBRARY_PATH or /etc/ld.so.conf anyway before running aMule. If aMule is not their first self-compiled package, they have probably already done so.

- Mac users get pre-compiled binaries and shouldn't care too much. Users of non-Linux Unices should be experienced enough to have a look at the documentation if there are build failures. If they already have other autoconf-based packages installed, they have probably already added /usr/local/lib to their environment and will not be hit by the problem.

- People who don't want to install wxWidgets into a standard prefix are maybe better off using an uninstalled build instead of installing it to a non-standard prefix. They can "./configure && make" wxWidgets without running "make install" and then use "./configure --with-wxdir=" for aMule. This will work because wx-config already exposes -rpath for uninstalled builds (but only for them, not for installed ones).

The reason why you didn't need to set LD_LIBRARY_PATH for other library packages is that they are either much simpler and don't have internal dependencies (like gdlib) or they handle them properly (like earlier released versions of wxWidgets) or they have their own mechanism to handle the problem and "hide" it from the user (like the QTDIR environment variable for Qt).

Maybe an additional test could be added to aMule's ./configure to find out if wx apps can be linked without problem, and if not, ./configure could ask the user to set LD_LIBRARY_PATH and run configure again. If I remember correctly, there was even such a test in the past - the test for large file support in wxWidgets did that "accidentally", but then it was changed to work without it.

One thing that would be very undesirable is that aMule's configure script works with less linkers than before just because of a mess in wxWidgets CVS. In this case I think it would be the better solution to link even the unneeded wx libraries or to tell people that wx CVS is currently a little bit broken and that they have to set an environment variable, which some people don't even have to do.
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: Linking order problem - reloaded
« Reply #11 on: December 25, 2005, 08:11:28 AM »

Good morning,

yesterday's and today's wx CVS (they are the same) seem to be *really* broken.

This is what I get with shared wx libraries:
Code: [Select]
g++  -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef    -lpthread -o amulegui
amulegui-amule-remote-gui.o amulegui-amule-gui.o amulegui-amuleDlg.o
amulegui-AddFriend.o amulegui-ChatSelector.o amulegui-ClientDetailDialog.o
amulegui-FileDetailDialog.o amulegui-KadDlg.o amulegui-OScopeCtrl.o
amulegui-PartFileConvert.o amulegui-PrefsUnifiedDlg.o amulegui-SearchDlg.o
amulegui-ServerWnd.o amulegui-SharedFilesWnd.o amulegui-StatisticsDlg.o
amulegui-SearchListCtrl.o amulegui-DownloadListCtrl.o amulegui-ClientListCtrl.o
amulegui-FriendListCtrl.o amulegui-ServerListCtrl.o amulegui-SharedFilesCtrl.o
amulegui-MuleTrayIcon.o amulegui-TransferWnd.o amulegui-ClientCredits.o
amulegui-ECSpecialMuleTags.o amulegui-KnownFile.o amulegui-GetTickCount.o
amulegui-Logger.o amulegui-PartFile.o amulegui-Preferences.o amulegui-Proxy.o
amulegui-Server.o amulegui-Statistics.o amulegui-StatTree.o
amulegui-SHAHashSet.o amulegui-OtherFunctions.o -L. -lmuleappcommon
-Llibs/common -Llibs/ec -lmulecommon -lec -lz  -lbfd -liberty  -L. -lmuleappgui
-L/opt/wxGTK/lib -pthread   -L/usr/X11R6/lib  -lwx_gtk2u_adv-2.7
-lwx_gtk2u_core-2.7 -lwx_baseu_net-2.7 -lwx_baseu-2.7
-Wl,-rpath-link,/opt/wxGTK/lib
/opt/wxGTK/lib/libwx_gtk2u_adv-2.7.so: undefined reference to
`SetInvokingWindow(wxMenu*, wxWindow*)'
collect2: ld returned 1 exit status
make[3]: *** [amulegui] Fehler 1
make[3]: Leaving directory `/usr/src/packages/SOURCES/amule-cvs/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/usr/src/packages/SOURCES/amule-cvs/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/usr/src/packages/SOURCES/amule-cvs'
make: *** [all] Fehler 2
And the same error with static wx libraries:
Code: [Select]
g++  -O2 -g -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2
-ffunction-sections -fdata-sections -I/usr/include -D__CRYPTO_MDK_SUSE_FC__ -W
-Wall -Wshadow -Wundef    -Wl,--gc-sections -L/usr/X11R6/lib -L/usr/lib
-lpthread -o amulegui  amulegui-amule-remote-gui.o amulegui-amule-gui.o
amulegui-amuleDlg.o amulegui-AddFriend.o amulegui-ChatSelector.o
amulegui-ClientDetailDialog.o amulegui-FileDetailDialog.o amulegui-KadDlg.o
amulegui-OScopeCtrl.o amulegui-PartFileConvert.o amulegui-PrefsUnifiedDlg.o
amulegui-SearchDlg.o amulegui-ServerWnd.o amulegui-SharedFilesWnd.o
amulegui-StatisticsDlg.o amulegui-SearchListCtrl.o amulegui-DownloadListCtrl.o
amulegui-ClientListCtrl.o amulegui-FriendListCtrl.o amulegui-ServerListCtrl.o
amulegui-SharedFilesCtrl.o amulegui-MuleTrayIcon.o amulegui-TransferWnd.o
amulegui-ClientCredits.o amulegui-ECSpecialMuleTags.o amulegui-KnownFile.o
amulegui-GetTickCount.o amulegui-Logger.o amulegui-PartFile.o
amulegui-Preferences.o amulegui-Proxy.o amulegui-Server.o amulegui-Statistics.o
amulegui-StatTree.o amulegui-SHAHashSet.o amulegui-OtherFunctions.o -L.
-lmuleappcommon -Llibs/common -Llibs/ec -lmulecommon -lec -lz  -Wl,-Bstatic
-lbfd -liberty -Wl,-Bdynamic -lcryptopp -L. -lmuleappgui  -pthread
-L/usr/X11R6/lib  /usr/lib/libwx_gtk2u_adv-2.7.a /usr/lib/libwx_gtk2u_core-2.7.a
/usr/lib/libwx_baseu_net-2.7.a /usr/lib/libwx_baseu-2.7.a -pthread
-L/usr/X11R6/lib -L/opt/gnome/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lfreetype -lfontconfig
-lXrender -lX11 -lXext -lpng12 -lglitz -lgthread-2.0 -lglib-2.0 -lXinerama
-lXxf86vm -lwxregexu-2.7 -lz -ldl -lm  -Wl,-rpath-link,/usr/lib
/usr/lib/libwx_gtk2u_adv-2.7.a(advlib_taskbar.o): In function
`wxTaskBarIconAreaBase::DoPopupMenu(wxMenu*, int, int)':
: undefined reference to `SetInvokingWindow(wxMenu*, wxWindow*)'
collect2: ld returned 1 exit status
make[3]: *** [amulegui] Fehler 1
make[3]: Leaving directory `/usr/src/packages/BUILD/amule-cvs/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/usr/src/packages/BUILD/amule-cvs/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/usr/src/packages/BUILD/amule-cvs'
make: *** [all] Fehler 2
error: Bad exit status from /var/tmp/rpm-tmp.78912 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.78912 (%build)
This is a different error, it's not related to the above one. I'm 99% sure because I tried many combinations: with and without "-rpath-link" (but it's clear that this cannot be the reason because there's not even such a warning), with all wx libraries and with only the needed ones, with shared and with static wx libraries, with and without optimization etc.

Why I think this information might be relevant anyway: Are you *really* sure that you want to support wx CVS, add workarounds for its bugs to your working code, maybe even delay your release for it etc.? I mean, it would be a nice-to-have, but it's still a development version and people should always expect such problems. It could break every day again.

wx people will fix their stuff sooner or later, until then you could just instruct people to use a released wx version instead of spending time on their problems, adding hacks etc... OK, maybe it's not that easy, I don't know.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: Linking order problem - reloaded
« Reply #12 on: December 25, 2005, 02:23:01 PM »

Gerd78,

CVS snapshots are supposed to compile so that people can test the latest greatest. Since some days ago, aMule CVS will only work with a recent wx CVS snapshot. The only way to test it is to use a recent wxCVS. So, answering your question, this kind of stuff (-Wl,bla,bla,bla) will not go into a release, but is needed now to enable people to test.

What happens to most people that try to compile a CVS snapshot and get an error? I can tell you, 98% will forget about it and get a binary. So beeing easy to compile is a must. We want a lot of people testing, and give support in the forums consumes a lot of our resources.

And about the new error, it does not happen here, I have a successful compilation. Are you using a recent wxCVS? :D

Cheers!
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: Linking order problem - reloaded
« Reply #13 on: December 25, 2005, 02:40:06 PM »

I reverted phoenix's commit because it did indeed break linking on Mac OS X.  For now, I have implemented this approach:

Quote
Originally posted by Gerd78
4. Simply forget about it and use "wx-config --libs" without additional arguments - aMule will then use all libraries. Not the best solution, but simple and guaranteed to work.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Linking order problem - reloaded
« Reply #14 on: December 25, 2005, 04:31:56 PM »

great, now you broke windows static linkage.
Logged
Pages: [1] 2