aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: aMule doesn't compile in my linux-pcc gentoo  (Read 4068 times)

zoddo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • http://www.aronchi.org
aMule doesn't compile in my linux-pcc gentoo
« on: December 01, 2004, 12:16:57 AM »

I have a linux-ppc gentoo and I tried to compile aMule, but it says to me:

Code: [Select]
make[6]: Entering directory `/home/aronchi/aMule-2.0.0rc7/src/utils/aLinkCreator/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../..    -I/usr/lib/wx/include/gtk2u-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0   -MT alc-ed2khash.o -MD -MP -MF ".deps/alc-ed2khash.Tpo" \
  -c -o alc-ed2khash.o `test -f 'ed2khash.cpp' || echo './'`ed2khash.cpp; \
then mv -f ".deps/alc-ed2khash.Tpo" ".deps/alc-ed2khash.Po"; \
else rm -f ".deps/alc-ed2khash.Tpo"; exit 1; \
fi
ed2khash.cpp: In member function `bool Ed2kHash::SetED2KHashFromFile(const wxFileName&, bool (*)(int))':
ed2khash.cpp:86: error: no matching function for call to `wxFFile::wxFFile(wxString, const wchar_t[4])'
/usr/include/wx/ffile.h:106: note: candidates are: wxFFile::wxFFile(const wxFFile&)
/usr/include/wx/ffile.h:47: note:                 wxFFile::wxFFile(FILE*)
/usr/include/wx/ffile.h:45: note:                 wxFFile::wxFFile(const wxChar*, const char*)
/usr/include/wx/ffile.h:43: note:                 wxFFile::wxFFile()
make[6]: *** [alc-ed2khash.o] Error 1
make[6]: Leaving directory `/home/aronchi/aMule-2.0.0rc7/src/utils/aLinkCreator/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/aronchi/aMule-2.0.0rc7/src/utils/aLinkCreator'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/aronchi/aMule-2.0.0rc7/src/utils'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/aronchi/aMule-2.0.0rc7/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/aronchi/aMule-2.0.0rc7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/aronchi/aMule-2.0.0rc7'
make: *** [all] Error 2

How can I solve this problem? Is that possibile?

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #1 on: December 01, 2004, 12:42:40 AM »

Strange, it compiles here. What gcc version do you have? What wxWidgets version?

Try editing /src/utils/aLinkCreator/src/ed2khash.cpp, line 86: remove the wxT function from the text constant. (so from wxT("rbS") you should make "rbS" - this might help)
Logged
concordia cum veritate

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #2 on: December 01, 2004, 12:42:48 AM »

have you installed wxGTK and wxGTK devel packages?

wxGTk is needed for aMule to compile (at least on Linux machines. on Macintosh or others, other wx are nedeed)
Logged

zoddo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • http://www.aronchi.org
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #3 on: December 01, 2004, 12:44:26 AM »

I've solved this problem with this simple patch:

Code: [Select]
diff -ur aMule-2.0.0rc7/src/utils/aLinkCreator/src/ed2khash.cpp aMule-2.0.0rc7-ar/src/utils/aLinkCreator/src/ed2khash.cpp
--- aMule-2.0.0rc7/src/utils/aLinkCreator/src/ed2khash.cpp      2004-08-09 19:01:34.000000000 +0200
+++ aMule-2.0.0rc7-ar/src/utils/aLinkCreator/src/ed2khash.cpp   2004-12-01 00:43:15.061834816 +0100
@@ -83,7 +83,7 @@
 {
   // Open file and let wxFFile destructor close the file
   // Closing it explicitly may crash on Win32 ...
-  wxFFile file(filename.GetFullPath(), wxT("rbS"));
+  wxFFile file( (const wxChar*) filename.GetFullPath(),  (const char*) wxT("rbS"));
   if (! file.IsOpened())
     {
       wxLogError (_("Unable to open %s"),unicode2char(filename.GetFullPath()));
diff -ur aMule-2.0.0rc7/src/utils/aLinkCreator/src/md4.cpp aMule-2.0.0rc7-ar/src/utils/aLinkCreator/src/md4.cpp
--- aMule-2.0.0rc7/src/utils/aLinkCreator/src/md4.cpp   2004-08-30 00:27:04.000000000 +0200
+++ aMule-2.0.0rc7-ar/src/utils/aLinkCreator/src/md4.cpp        2004-12-01 00:43:15.037838464 +0100
@@ -336,7 +336,7 @@

   // Open file and let wxFFile destructor close the file
   // Closing it explicitly may crash on Win32 ...
-  wxFFile file(filename, wxT("rbS"));
+  wxFFile file((const wxChar*) filename, (const char*) wxT("rbS"));
   if (! file.IsOpened())
     {
       return wxEmptyString;


How can I contribute that to the project?

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #4 on: December 01, 2004, 12:46:20 AM »

zoddo, tell us please what wxWidgets version do you have?
Logged
concordia cum veritate

zoddo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • http://www.aronchi.org
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #5 on: December 01, 2004, 12:51:06 AM »

This:

abook aMule-2.0.0rc7 # epm -qa | grep wx
wxGTK-2.4.2-r2

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #6 on: December 01, 2004, 12:55:58 AM »

Thanks, I'll check it out and add your patch to cvs.
Logged
concordia cum veritate

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #7 on: December 01, 2004, 02:55:15 AM »

This problem should exist no more, but let me give an advice:
It is a VERY bad idea to use wxWidgets-2.4.2 with gtk2 and unicode! (Maybe it's factory default on your machine, but still it's a bad idea.) If you want to stay with wx-2.4.2, then use it linked against gtk1, otherwise (better) install wxGTK-2.5.3.

Have fun with aMule!
Logged
concordia cum veritate

zoddo

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
    • http://www.aronchi.org
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #8 on: December 02, 2004, 11:53:59 AM »

Why do you say that amule with gtk2 is a bad thing? I'm using it from two days without any problem...

Is there something I have to fear?

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #9 on: December 02, 2004, 11:56:26 AM »

I didn't say aMule with gtk2 is bad, I said wxWidgets-2.4.2 with gtk2 is a bad thing. wx version 2.4.2 just isn't ready for gtk2, has several bugs and memleaks.

But if it works for you, then have luck!
Logged
concordia cum veritate

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: aMule doesn't compile in my linux-pcc gentoo
« Reply #10 on: December 02, 2004, 04:49:13 PM »

if you really want to use wx with gtk2, then use wx 2.5.3 + gtk2. wxgtk 2.4.2 didn't support gtk2 (only beta development). wx gtk 2.5.x is the first branch really supporting gtk2.

Greetings!
Logged