Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73007 - aMule doesn't compile with wxGTK-2.4.2-r2 and Gtk2 on linux-ppc
Summary: aMule doesn't compile with wxGTK-2.4.2-r2 and Gtk2 on linux-ppc
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo net-p2p team
: 73738 (view as bug list)
Depends on:
Reported: 2004-12-01 01:36 UTC by Alessandro Ronchi
Modified: 2005-05-31 14:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

This patch solves the problem (patch-ar.patch,1.26 KB, patch)
2004-12-01 01:37 UTC, Alessandro Ronchi
Details | Diff
amule-2.0.0_rc7.ebuild (amule-2.0.0_rc7.ebuild,2.15 KB, application/octet-stream)
2004-12-07 18:01 UTC, Alessandro Ronchi

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Ronchi 2004-12-01 01:36:58 UTC
When I try to emerge amule, it says to me:
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; \
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

Reproducible: Always
Steps to Reproduce:
1. emerge aMule

Actual Results:  
this error:

ed2khash.cpp:86: error: no matching function for call to
`wxFFile::wxFFile(wxString, const wchar_t[4])'

Expected Results:  
emerge cleanly

I've solved this problem with this simple patch to the clean
aMule-2.0.0rc7.tar.bz2 from aMule site:

#~~~~~~~~~~~~~~~~~cut here~~~~~~~~~~~~~~~~~~~~~~~~
diff -ur aMule-2.0.0rc7/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/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;

#~~~~~~~~~~~~~~~~~cut here~~~~~~~~~~~~~~~~~~~~~~~~

How can I contribute that to the project?
Comment 1 Alessandro Ronchi 2004-12-01 01:37:29 UTC
Created attachment 45041 [details, diff]
This patch solves the problem
Comment 2 Alessandro Ronchi 2004-12-06 04:59:51 UTC
Is it possible to contribute an ebuild for gentoo wich solves the problem? How can I do that?
Comment 3 Alessandro Ronchi 2004-12-07 17:59:48 UTC
Ebuild done:
Comment 4 Alessandro Ronchi 2004-12-07 18:01:46 UTC
Created attachment 45480 [details]
Comment 5 Olivier Crete (RETIRED) gentoo-dev 2004-12-07 22:30:33 UTC
*** Bug 73738 has been marked as a duplicate of this bug. ***
Comment 6 Giacomo Perale 2004-12-08 02:43:21 UTC
Am I wrong or you just added ~ppc to KEYWORDS?
Comment 7 Alessandro Ronchi 2004-12-08 03:26:27 UTC
Also commented a GTK2 check.
Comment 8 Giacomo Perale 2004-12-08 03:35:48 UTC
don't comment it out that check, it's needed because wxGTK 2.4 doesn't work well with gtk2. wait for the unmasking of wxGTK 2.5.3, there's already an ebuild, bug #71108
Comment 9 Alessandro Ronchi 2004-12-08 03:44:35 UTC
I have wxGTK-2.4.2-r3 and GTK2 and emule works perfectly (I used it a week without an error).
Comment 10 Giacomo Perale 2004-12-08 03:53:02 UTC
and in my system (-O2 -pipe, no strange hyper-optimiziations) I've got 100% CPU usage and 250mb ram occupied in ~10-12 hours. wxGTK 2.4 aren't stable with gtk2 according to wxGTK developers and amule developers.
If you've got a patch, just inherit eutils in the ebuild and patch the sources when ppc keywords is on.
Comment 11 Karol Wojtaszek (RETIRED) gentoo-dev 2005-05-31 14:29:53 UTC
Added patch to portage. Thanks for help. If you still expirience 100% CPU usage
problems try new release (2.0.1).