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 3

Author Topic: How to Compile for Mac  (Read 38905 times)

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
How to Compile for Mac
« on: January 15, 2005, 03:09:35 AM »

I've overhauled the HowTo.

Since one has to compile against wxMac CVS plus patches in order to get a stable Mac aMule, I eliminated the instructions about getting wxMac from Fink.

Please review the new version and let me know if you find any problems.  Thanks.
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: How to Compile for Mac
« Reply #1 on: January 17, 2005, 07:18:39 PM »

great job on the how-to, ken! :)

i just noticed one thing: the huge memory leak that resulted from the missing "ReleaseEvent(dummyEvent);" in wxMacWakeUp() in src/mac/carbon/utils.cpp is not fixed if you follow the instructions in the how-to. neither does current wx cvs contain the fix nor do the three patches.

people with less than 4gb of ram would probably be very happy if you could either include this in one of the current patches or create a new patch for it... ;)
Logged
Current aMule CVS builds for OS X can be found here.

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: How to Compile for Mac
« Reply #2 on: January 17, 2005, 09:35:02 PM »

Quote
Originally posted by lionel77
great job on the how-to, ken! :)

i just noticed one thing: the huge memory leak that resulted from the missing "ReleaseEvent(dummyEvent);" in wxMacWakeUp() in src/mac/carbon/utils.cpp is not fixed if you follow the instructions in the how-to. neither does current wx cvs contain the fix nor do the three patches.

people with less than 4gb of ram would probably be very happy if you could either include this in one of the current patches or create a new patch for it... ;)
Thanks, lionel77.  Actually, the wxWidgets devs responded to my submission of that patch by fixing the problem in a different way.  The dummyEvent is now managed by an object and so doesn't need to be released manually.  Furthermore, they made it static and reuse it so that it doesn't have to be created and destroyed over and over again.

Feel free to check their fix with MallocDebug, but don't mistake the absence of the ReleaseEvent call for the absence of the fix.  :)
Logged

lionel77

  • Provider of Mac builds, Forum Mod
  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 1107
  • Mac OS X 10.4 (Power Mac G5)
Re: How to Compile for Mac
« Reply #3 on: January 17, 2005, 09:58:18 PM »

good, thanks for letting me know. i just compiled wx with the 'fix' but i'll test it without to make sure the leak is really gone once i have a bit more time on my hands...
Logged
Current aMule CVS builds for OS X can be found here.

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: How to Compile for Mac
« Reply #4 on: January 18, 2005, 05:47:17 PM »

I have updated the HowTo again, because the wxMac devs approved the patch for the crash-causing double-free bug.  So, you no longer have to apply that patch yourself.
Logged

malcolm

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: How to Compile for Mac
« Reply #5 on: February 01, 2005, 06:42:52 AM »

I tried compiling like discribed in the how-to but it didn't work.
The wxwidgeds compildes without errors but compiling aMule after that it ended with two errors.

Can anybody send me a link where I can download a stable release of aMule. Would be great.

THX
Logged
mac is for working, linux for networking...ad windows is for solitaer

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: How to Compile for Mac
« Reply #6 on: February 01, 2005, 04:31:53 PM »

There is no 'stable' one yet. We plan to release it on 2.0.0 final.
Logged

malcolm

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: How to Compile for Mac
« Reply #7 on: February 02, 2005, 10:14:33 PM »

But maybe someone compiled it like it is described in the how-to and i can get this version?
Logged
mac is for working, linux for networking...ad windows is for solitaer

dashaund

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 25
Re: How to Compile for Mac
« Reply #8 on: February 03, 2005, 01:07:02 AM »

There is no stable version yet.  This is open source software, meaning work is being done constantly on the client, so there is essential a new version being released everyday on CVS.  Once the developers they have essentially a "finished" product, they will release what is called a stable client...and there isn't one yet for aMule.  Right now, we are all, essentially, beta testers.
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: How to Compile for Mac
« Reply #9 on: February 15, 2005, 12:21:07 PM »

I have updated the HowTo again.  I removed all references to patching wxMac because the wxMac developers reworked the area of the code which was being patched.  I believe they fixed the leaks, but we should keep an eye out just in case.
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: How to Compile for Mac
« Reply #10 on: March 04, 2005, 06:28:19 AM »

I have updated the HowTo again.  Since wxMac 2.5.4 has been released, it is no longer necessary to get the sources from CVS.
Logged

igor79

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
Re: How to Compile for Mac
« Reply #11 on: March 04, 2005, 11:54:27 PM »

With wxmac is all ok, but with amule, after
./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config

and make

i get:

make  all-recursive
Making all in m4
make[2]: Nothing to be done for `all'.
Making all in intl
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    intl-compat.c
In file included from intl-compat.c:21:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    bindtextdom.c
In file included from bindtextdom.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    dcgettext.c
In file included from dcgettext.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    dgettext.c
In file included from dgettext.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    gettext.c
In file included from gettext.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    finddomain.c
In file included from finddomain.c:21:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    loadmsgcat.c
In file included from loadmsgcat.c:27:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    localealias.c
In file included from localealias.c:27:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    textdomain.c
In file included from textdomain.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    l10nflist.c
In file included from l10nflist.c:27:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    explodename.c
In file included from explodename.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    dcigettext.c
In file included from dcigettext.c:27:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    dcngettext.c
In file included from dcngettext.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    dngettext.c
In file included from dngettext.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    ngettext.c
In file included from ngettext.c:20:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    plural.c
In file included from plural.y:30:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
plural.y: In function `__gettexterror':
plural.y:406: warning: unused parameter `str'
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    plural-exp.c
In file included from plural-exp.c:21:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    localcharset.c
In file included from localcharset.c:23:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    localename.c
In file included from localename.c:23:
../config.h:363:1: warning: "LOCALEDIR" redefined
:6:1: warning: this is the location of the previous definition
localename.c: In function `_nl_locale_name':
localename.c:385: warning: unused parameter `category'
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DIN_LIBINTL -DHAVE_CONFIG_H -I.. -I. -I../intl  -no-cpp-precomp -D_INTL_REDIRECT_MACROS -DNOPCH -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    osdep.c
rm -f libintl.a
ar cru libintl.a intl-compat.o bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o explodename.o dcigettext.o dcngettext.o dngettext.o ngettext.o plural.o plural-exp.o localcharset.o localename.o osdep.o
ranlib libintl.a
cp ./libgnuintl.h libintl.h
/bin/sh ./config.charset 'powerpc-apple-darwin7.8.0' > t-charset.alias
mv t-charset.alias charset.alias
sed -e '/^#/d' -e 's/@''PACKAGE''@/amule/g' ref-add.sin > t-ref-add.sed
mv t-ref-add.sed ref-add.sed
sed -e '/^#/d' -e 's/@''PACKAGE''@/amule/g' ref-del.sin > t-ref-del.sed
mv t-ref-del.sed ref-del.sed
Making all in po
rm -f en_GB.gmo && : -c --statistics -o en_GB.gmo en_GB.po
mv: rename t-en_GB.gmo to en_GB.gmo: No such file or directory
make[2]: *** [en_GB.gmo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Thanx

P.S.: it's possible to compile amule with wxmac cocoa version?
 where i can optimize the installation for my G5?
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: How to Compile for Mac
« Reply #12 on: March 05, 2005, 12:31:18 AM »

You need gettext
Logged

igor79

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
Re: How to Compile for Mac
« Reply #13 on: March 05, 2005, 01:54:36 AM »

Thank you, I installed fink - only for gettext :-( - and now all works ;-)

Only this:
***
   8. Copy the amule binary to the app-Container directory: cp src/amule aMule.app/Contents/MacOS/ (NOTE: If the MacOS directory is missing in aMule.app, create it by typing mkdir aMule.app/Contents/MacOS before executing the previous command. Thanks to dan for the tip)
***

I tried directly cp src/amule aMule.app/Contents/MacOS/ but it creates an exec called Macos. Then i created a folder directly from Finder and copied the binary into and all works!

Thx again!

When will be Cocoa wx supported? ;-) It's possible to compile now with this framework?
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: How to Compile for Mac
« Reply #14 on: March 06, 2005, 10:04:53 AM »

Quote
Originally posted by igor79
When will be Cocoa wx supported? ;-) It's possible to compile now with this framework?

I don't know.  I doubt it.  wxCocoa is still pretty early in development, I think.

Anyway, the best way to find out is to try it.  :P  Let us know what you find.  :)
Logged
Pages: [1] 2 3