aMule Forum
English => Compilation problems => Topic started by: Gerd78 on January 18, 2011, 09:29:21 PM
-
There are two important changes for aMule users in openSUSE 11.4.
The first is that cryptopp will be included in the distribution, so you can just use the "libcryptopp-devel" package from the distribution and don't need to build it yourself anymore.
The second is that wxWidgets is now built with --enable-stl by default (more info (http://lists.opensuse.org/opensuse-factory/2011-01/msg00213.html)). aMule does not currently work with this. This means that you must build aMule against the "wxWidgets-wxcontainer-devel" package and not "wxWidgets-devel".
-
Thank you for the info.
How did you deal with lib(g)upnp ? aMule looks for libupnp, however the library in repo is named libgupnp.
Thank you in advance.
-
aMule does not currently work with this. This means that you must build aMule against the "wxWidgets-wxcontainer-devel" package and not "wxWidgets-devel".
What does "not work"? Is it something that can be fixed?
-
If this can help :.....
Compiling aMule 2.3.1 RC1 with "wxWidgets-devel" :
Compiling MuleDebug.cpp
MuleDebug.cpp: In function ‘wxString get_backtrace(unsigned int)’:
MuleDebug.cpp:405:88: error: ambiguous overload for ‘operator+’ in ‘wxMBConv::cMB2WX(const char*) const(s_file_name) + CFormat(((const wchar_t*)":\000\000\000%\000\000\000u\000\000\000\000\000\000")).CFormat::operator% [with _Tp = unsigned int, CFormat = CFormat](s_line_number)’
/usr/include/wx-2.8/wx/string.h:1421:27: note: candidates are: wxString operator+(const wxString&, const wxString&)
/usr/include/wx-2.8/wx/string.h:1423:27: note: wxString operator+(wxChar, const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:1425:27: note: wxString operator+(const wxChar*, const wxString&)
make[4]: *** [MuleDebug.o] Erreur 1
make[3]: *** [all-recursive] Erreur 1
make[2]: *** [all-recursive] Erreur 1
make[1]: *** [all-recursive] Erreur 1
make: *** [all] Erreur 2
No error with "wxWidgets-wxcontainer-devel"
-
Does it work if you change the offending line to
out.Insert(CFormat(wxT("%s:%u")) % wxConvCurrent->cMB2WX(s_file_name) % s_line_number, i*2+1);
?
-
Sorry for the delay, I don't use many often CPP ;D
No error with the line after modification. It's work for MuleDebug.cpp but errors in :
ClientCreditsList.cpp:271:3: error: ambiguous overload for ‘operator+’ in ‘wxString(((const wchar_t*)"F\000\000\000a\000\000\000i\000\000\000l\000\000\000e\000\000\000d\000\000\000 \000\000\000t\000\000\000o\000\000\000 \000\000\000c\000\000\000r\000\000\000e\000\000\000a\000\000\000t\000\000\000e\000\000\000 \000\000\000n\000\000\000e\000\000\000w\000\000\000 \000\000\000R\000\000\000S\000\000\000A\000\000\000 \000\000\000k\000\000\000e\000\000\000y\000\000\000p\000\000\000a\000\000\000i\000\000\000r\000\000\000:\000\000\000 \000\000\000\000\000\000")) + char2unicode(const char*)()’
ClientCreditsList.cpp:322:3: error: ambiguous overload for ‘operator+’ in ‘wxString(((const wchar_t*)"E\000\000\000r\000\000\000r\000\000\000o\000\000\000r\000\000\000 \000\000\000w\000\000\000h\000\000\000i\000\000\000l\000\000\000e\000\000\000 \000\000\000i\000\000\000n\000\000\000i\000\000\000t\000\000\000i\000\000\000a\000\000\000l\000\000\000i\000\000\000z\000\000\000i\000\000\000n\000\000\000g\000\000\000 \000\000\000e\000\000\000n\000\000\000c\000\000\000r\000\000\000y\000\000\000p\000\000\000t\000\000\000i\000\000\000o\000\000\000n\000\000\000 \000\000\000k\000\000\000e\000\000\000y\000\000\000s\000\000\000:\000\000\000 \000\000\000\000\000\000")) + char2unicode(const char*)()’
ClientCreditsList.cpp:368:3: error: ambiguous overload for ‘operator+’ in ‘wxString(((const wchar_t*)"E\000\000\000r\000\000\000r\000\000\000o\000\000\000r\000\000\000 \000\000\000w\000\000\000h\000\000\000i\000\000\000l\000\000\000e\000\000\000 \000\000\000c\000\000\000r\000\000\000e\000\000\000a\000\000\000t\000\000\000i\000\000\000n\000\000\000g\000\000\000 \000\000\000s\000\000\000i\000\000\000g\000\000\000n\000\000\000a\000\000\000t\000\000\000u\000\000\000r\000\000\000e\000\000\000:\000\000\000 \000\000\000\000\000\000")) + char2unicode(const char*)()’
-
oups....
Same thing :
ClientCreditsList.cpp:429:3: error: ambiguous overload for ‘operator+’ in ‘wxString(((const wchar_t*)"E\000\000\000r\000\000\000r\000\000\000o\000\000\000r\000\000\000 \000\000\000w\000\000\000h\000\000\000i\000\000\000l\000\000\000e\000\000\000 \000\000\000v\000\000\000e\000\000\000r\000\000\000i\000\000\000f\000\000\000y\000\000\000i\000\000\000n\000\000\000g\000\000\000 \000\000\000i\000\000\000d\000\000\000e\000\000\000n\000\000\000t\000\000\000i\000\000\000t\000\000\000y\000\000\000:\000\000\000 \000\000\000\000\000\000")) + char2unicode(const char*)()’
-
Just wrap a wxString() around the char2unicode(), like
AddDebugLogLineC(logCredits,
wxString(wxT("Failed to create new RSA keypair: ")) +
wxString(char2unicode(e.what())));
I've attached the patched file for you.
-
Thank you for the file.
Good for this, now :
Logger.cpp:180:62: error: ambiguous overload for ‘operator+’ in ‘operator+(const wxString&, const wxChar*)(((const wchar_t*)":\000\000\000 \000\000\000\000\000\000")) + char2unicode(const char*)()’
-
AddLogLine(file, line, critical, logStandard,
cat.GetName() + wxT(": ") + wxString(char2unicode(msg.str().c_str())));
-
Problem during link :
Linking amule
amule-ChatSelector.o:(.rodata._ZTV12CChatSession[vtable for CChatSession]+0x38c): undefined reference to `non-virtual thunk to wxTextCtrlBase::overflow(int)'
libs/common/libmulecommon.a(MuleDebug.o): In function `get_backtrace(unsigned int)':
/home/jl/Download/aMule/aMule-2.3.1rc1/src/libs/common/MuleDebug.cpp:406: undefined reference to `CFormat& CFormat::operator%<wxWCharBuffer>(wxWCharBuffer)'
./libmuleappgui.a(libmuleappgui_a-MuleTextCtrl.o):(.rodata._ZTV13CMuleTextCtrl[vtable for CMuleTextCtrl]+0x38c): undefined reference to `non-virtual thunk to wxTextCtrlBase::overflow(int)'
collect2: ld returned 1 exit status
make[3]: *** [amule] Erreur 1
make[2]: *** [all-recursive] Erreur 1
make[1]: *** [all-recursive] Erreur 1
make: *** [all] Erreur 2
-
Error 1 ("non-virtual thunk"): use current SVN (http://code.google.com/p/amule/source/checkout) instead of the rc
Error 2: my patch for MuleDebug.cpp:406 was bad, try
out.Insert(CFormat(wxT("%s:%u")) % wxString(wxConvCurrent->cMB2WX(s_file_name)) % s_line_number, i*2+1);
-
With the SVN version you have to run autogen.sh and then configure.
-
SVN 10561 has the OpenSuse fixes. Unless there are more problems. ;)
-
OK for the new patch on MuleDebug, it works.
I used autogen and configure when changing from "wxWidgets" to "wxWidgets-wxcontainer" and back.
For the SVN instead of the RC I'll do that tomorrow, it is midnight here and my day was a little hard. :)
I'll write the result of tests after this operation.
Thank you for the "debug" online.
SVN 10561 has the OpenSuse fixes. Unless there are more problems.
What problem ????? Only solutions. ;)
-
Either I am cursed, or I am stupid. I do not find the mentioned SVN (10561). I found only 10533.....
Could you give me the URL of the "running" SVN ?
Thank you.
-
svn checkout http://amule.googlecode.com/svn/trunk/
-
Definitively I'm cursed. (As all the "normal" users of openSuse 11.4) :)
Geting the SVN : OK
autogen.sh : OK
configure :
checking for wxWidgets version >= 2.8.12 (--unicode=yes)... no (version 2.8.11 is not new enough)
configure: error:
The requested wxWidgets build couldn't be found.
2.8.11 is the last version distributed by SUSE.
I have changed in the configure script to accept 2.8.11 to see if compilation and link work. But.... maybe it will be bugs during execution.
-
Compil and Link : OK
Execution :
2011-05-08 21:38:07: amuleAppCommon.cpp(331): Initialising aMule SVN compiled with wxGTK2 v2.8.11 (Debugging) (Snapshot: rev. 10562)
2011-05-08 21:38:07: amuleAppCommon.cpp(377): Checking if there is an instance already running...
2011-05-08 21:38:07: amuleAppCommon.cpp(408): No other instances are running.
2011-05-08 21:38:08: ListenSocket.cpp(65): ListenSocket : Ok.
aMule Version: aMule SVN compiled with wxGTK2 v2.8.11 (Debugging) (Snapshot: rev. 10562)
Terminated after throwing an instance of 'std::out_of_range'
what(): basic_string::at
backtrace:
[2] CamuleApp::OnUnhandledException() in amule.cpp:1950
[3] wxEntry(int&, wchar_t**) in /usr/lib/wx-2.8-stl/libwx_baseu-2.8.so.0[0xb6db0557]
[4] wxEntry(int&, char**) in /usr/lib/wx-2.8-stl/libwx_baseu-2.8.so.0[0xb6db05c6]
[5] main in amule-gui.cpp:93
[6] __libc_start_main in /lib/libc.so.6[0xb6a84c2e]
[7] _start in start.S:122
So, openSuse users have to wait next version (2.8.12) of wxWidgets before using last version of aMule.
No matter, we'll wait. :)
-
2.8.12 is required because of a networking problem fixed there. It's not related to what you are seeing here. Hm.
I should say wx build is somehow screwed in Suse. Can you try to build wx yourself ? Don't install it, just configure aMule then using --with-wxdir (like described in the wiki for Ubuntu (http://wiki.amule.org/index.php/HowTo_Compile_In_Ubuntu)).
-
I can try to do that but I need more time because there is a long time I didn't do that. I was developer but 15 years ago and I'm a little "rusty" now.
Anyway thank you for your speed to debug all the configurations.
-
I did as you said.......
Don't ask me why but it's work :)
Now I have only to solve a problem with Kad
2011-05-09 10:30:28: RoutingZone.cpp(307): Only 0 Kad contacts available, nodes.dat not written
2011-05-09 10:30:28: RoutingZone.cpp(172): Failed to read nodes.dat file - too old. This version (0) is not supported anymore.
but this is not a "Compilation problem" so I'll check other threads.
-
I did as you said.......
You mean, compiled wx yourself?
-
Just for the record, and other openSUSE users, I compiled wx myself and new aMule also (RC1), no problems at all. I am back with 2.2.6 though, I like UI better.
-
Absolutly, compiling wxWidgets 2.8.12 as described in the wiki for Ubuntu.
Compiling aMule SVN 10562 with --with-wxdir to the compiled wxWidgets 2.8.12
-
Just for the record (after testing several combos) the best match for openSUSE 11.4 is installing wx (container version) from repos, unaltered, and then building aMule 2.2.6 by yourself (no patches, or anything). Compilation is w/o problems and it works as it should -- no problems either.
-
I should say wx build is somehow screwed in Suse.
It's not really screwed, it's just a little tricky to use because of the two incompatible binary interfaces (stl + wxcontainer).
- If you want to use the wxWidgets 2.8.11 packages shipped with openSUSE 11.4, then you must use wxWidgets-wxcontainer-devel and aMule 2.2.6.
- If you want to use aMule SVN, then you must use wxWidgets >= 2.8.12 (e.g. from this repository (http://download.opensuse.org/repositories/X11:/wxWidgets/openSUSE_11.4/)), and you can use wxWidgets-wxcontainer-devel or wxWidgets-devel. (And I would recommend the latter, at least for testing purposes, because wxWidgets-wxcontainer-devel will most likely be removed in a future release of the distribution.)
-
I forgot, there is 2.8.12 for openSUSE but in branched repository. http://download.opensuse.org/repositories/X11:/wxWidgets/ I switched to it, and results are even better (with compiled myself AMule 2.2.6).