aMule Forum
English => Multiplatform => Mac OSX => Topic started by: ken on January 15, 2005, 03:09:35 AM
-
I've overhauled the HowTo (http://www.amule.org/wiki/index.php/HowTo_compile_on_Mac).
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.
-
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... ;)
-
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. :)
-
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...
-
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.
-
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
-
There is no 'stable' one yet. We plan to release it on 2.0.0 final.
-
But maybe someone compiled it like it is described in the how-to and i can get this version?
-
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.
-
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.
-
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.
-
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?
-
You need gettext
-
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?
-
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. :)
-
I compiled and run aMule in wxCocoa several times. But it's on TOO EARLY development.
-
Hi,
I compiled it and all basic functions are working, but my scroll isn't working.
When I use the "./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config"
I get this message:
"
....
checking for curl >= 7.9.5... yes (version 7.10.2)
checking for libpng-config... /sw/bin/libpng-config
checking for libpng version >= 1.2.0... yes (version 1.2.5)
checking gd.h usability... no
checking gd.h presence... no
checking for gd.h... no
configure:
WARNING: libpng-devel >= 1.2.0 is needed for amuleweb
checking for gdlib-config... /sw/bin/gdlib-config
checking for gdlib version >= 2.0.0... yes (version 2.0.23)
checking for gd.h... (cached) no
configure:
WARNING: gd-lib >= 2.0.0, or a functional gd.h (from gd-devel) not found.
gd-lib is needed for fully funtional cas. If you don't have gd-lib,
cas will be compiled, but you won't be able to create that cool
status image (text mode however will work). Also note that you should
upgrade to gd-lib >= 2.0.22 if you intend to use it, other versions have
not been tested and therefore are unsupported at the moment.
Please check that gdlib-config is in your default path, check out
LD_LIBRARY_PATH or equivalent variable.
Or this might also be that your gdlib-config has other name.
Please try again with --with-gdlib-config=/usr/bin/gdlib-config
(replace /usr/bin/gdlib-config with a valid path to your gdlib-config).
If you use compiled packages check if you have devel pack installed.
To download the lastest version check http://www.boutell.com/gd
for sources.
checking whether we need the GUI... yes
checking for wx-config... /usr/local/bin/wx-config
checking for wxWidgets version >= 2.4.2... yes (version 2.5.4)
configure: WARNING: wxWidgets >=2.5.0: Using wx-config --libs base,net
checking if wxWidgets was linked with GTK2... no
checking for gtk-config... /sw/bin/gtk-config
checking for GTK - version >= 1.2.0... yes
checking if wxWidgets version >=2.5.0 ... yes
crypto check disabled, using embedded libs
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for working alloca.h... yes
checking for alloca... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking argz.h usability... no
checking argz.h presence... no
....
Configured aMule 2.0.0rc8 for 'powerpc-apple-darwin7.8.0'.
aMule enabled options:
**** aMule Core ****
Should aMule be compiled in debug mode? yes
Should aMule be compiled with verbose console output? no
Should aMule be compiled with upload speed sense? no
Should aMule be compiled with profiling? no
Should aMule be compiled with optimizations? no
Should aMule be compiled with systray? no
Should aMule be compiled with UTF-8 systray? no
Should aMule be compiled with pure GTK code? no
Should aMule be linked against patched gsocket? no
Should aMule monolithic application be built? yes
Should aMule daemon version be built? (EXPERIMENTAL) no
Should aMule remote gui be built? (EXPERIMENTAL) no
Crypto++ library/headers style? embeded
**** aMule TextClient ****
Should aMule Command Line Client be built? no
Should aMule GUI Client be built? no
**** aMule WebServer ****
Should aMule WebServer be built? no
Should aMule WebServer GUI be built? no
**** aMule ED2K Links Handler ****
Should aMule ED2K Links Handler be built? yes
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? yes
Should aMuleLinkCreator for console (alcc) be built? yes
**** aMule Statistics ****
Should C aMule Statistics (CAS) be built? yes
Should aMule GUI Statistics (wxCas) be built? yes
**** General Libraries and Tools ****
Should ccache support be enabled? no
Libraries aMule will use to build:
wxWidgets 2.5.4
GTK 1.2.10 (Not used)
"
Is that supposed to be like that????
-
zankty, that configure output looks fine. The warnings are benign.
my scroll isn't working
Do you mean the scroll-wheel? If that's what you mean, it's a known bug with wxMac that we're working on getting fixed.
-
Hi,
I have read the tutorial but when i compile WxMac 2.5.4 (typing make) anfter a while the shell freezes at the istruction "Derez".
I leave it alone for the enteire night but in the morning is still there.
Some suggestions ?
My mac:
PowerMac 2xG5 1.8
ATI Radeon 9800 XT 256Mb Ram
1Gb ram
2x80 Gb serial ata hd raid 0
MacOsx 10.3.9
-
Here is the istruction that freezes:
/Developer/Tools/DeRez lib/libwx_mac-2.5.4.rsrc Carbon.r -useDF >lib/libwx_mac-2.5.4.r
I tried with the version 2.5.5 also but same problem.
-
Hmm. There was just a thread about this problem on the wx-dev mailing list. Let me see what I can remember...
First, more recent wxMac cvs snapshots have removed all requirements for resources. So, this problem will have gone away.
Ah. Found the problem in my mail trash. There's a weird interaction between the DeRez program and the DISPLAY environment variable. Is that variable set, or set improperly, for you?
-
Thank you ken for your reply,
i'm at work now, but this night when i will be at home, i'll verify the display variable settings.
-
The display variable is not set, what value should be present ?
-
Hmm. If I remember the problem described on the mailing list, the problem was that the variable was set to something it shouldn't have been. I think leaving it unset should be safe.
The problem also cropped up for people who logged into their Mac remotely with ssh to do the compile. Were you doing that? If so, you could try compiling when logged in at the Mac. I think DeRez needs access to the display, which it can't normally get unless the user account running it is also logged in to the Mac GUI (and switched in, with respect to Fast User Switching).
Ultimately, you should probably just grab a more recent version of wxMac which doesn't use DeRez at all. Version 2.6.0 was just released.
-
Thank you Ken, the version 2.6.0 compile cleanly!
-
OK, good. I'm glad you got it to work. Enjoy! :)
-
Since the issues were getting rather specific I've moved DJ Nibu Aguiar's questions on how to install the DevTools and how to compile amule under 10.2 into a seperate thread: http://forum.amule.org/thread.php?threadid=7020
-
Just to be sure, I'll post this in this thread as well. With the latest cvs source, I get ./Scanner.l:191: error: 'yylex_destroy' was not declared in this scope.
OS X 10.4.10 , aMule-CVS-20070701, wxMac 2.8.4, flex 2.5.4
-
I've updated the How to compile on Mac (http://www.amule.org/wiki/index.php/HowTo_compile_on_Mac) wiki page. I am using a slightly different setup myself, but I think the provided steps should work. It would be great if someone could provide some feedback.
-
I followed the wiki, and it compiled fine as far as I can tell. Here's some feedback for making the guide even better:
The automake installed by Xcode works just fine (1.6.3), so it should be removed from the list of things you need to install.
Flex is also installed on my system, and I've never added it (2.5.4), I think it's included with Xcode. what's it used for?
Gettext is only needed if you want to build aMule with localisation support, right? That should be noted. I didn't need it.
The warning about Xcode 2.0 should really just be removed, and it should just state that you need at least 2.1, 2.4 preferably.
My configure status said it would use libgd to compile, is that a requirement? It's not stated anywhere at least.
I didn't have to add the special switch needed to run aMule CVS versions, so that seems to be obsolete information.
I didn't make an Universal binary, so I didn't get to test that part out. The 45 minutes needed for a compile of wxMac is pretty much correct for my CPU, a 1.33 GHz G4. Didn't quite take the time on aMule itself, but I think it was between 20-30 minutes.
-
Thanks a lot for the feedback, I'm glad it worked.
Regarding automake & flex:
At some point amule cvs did not compile with the versions that were included in OS X/Xcode, so I had to install more recent ones. It's good to know that that is no longer the case but I'm a little conflicted now if I should leave them in to be on the safe side or if I should remove them.
Regarding gettext:
Yes, you are completely right, it is only required for localization support. I thought it would be too confusing to have a lot of extra information in there, but now I've added a little note that is not to obtrusive.
Regarding Xcode 2.0:
I agree. I made the appropriate changes.
Regarding libgd:
I think libgd is only required for the generation of the stats graphs in amuleweb. Unfortunately, libgd is neither included with MacPorts nor with Fink and I figured putting in instructions for compiling it by hand would be outside the scope of the how-to considering how little relevance libgd has within amule. If you find a good way to include a little note on this please go ahead and put it in.
Oh, and that obviously applies in a much broader sense. If you or anybody else can think of any other good changes to the how to please go ahead an make them. I don't consider myself the gatekeeper of this guide. ;)
-
Hi,
thanks for the howto.
I'm trying to compile amule-cvs (20071110) as universal binary but I have some problems.
In particular it's dynamically linked to the MacPorts libraries libpng, libgd and the dependent libraries: jpeg,freetype,fontconfig,expat,... and even zlib and libiconv (MacPorts doesn't use system libraries).
But let me start from beginning:
My system:
OSX 10.4.10 PPC
XCode 2.4.1
last MacPorts, ports installed:
bzip2 @1.0.4_1+universal (active)
cryptlib @3.1_2 (active)
dd_rescue @1.10_0 (active)
expat @2.0.1_0+universal (active)
fontconfig @2.4.2_1+macosx+universal (active)
freetype @2.3.5_0+universal (active)
gd2 @2.0.35_0+no_x11+universal (active)
gettext @0.17_0+universal (active)
gnupg @1.4.7_0+idea (active)
jpeg @6b_2+universal (active)
libiconv @1.11_6+darwin_8+universal (active)
libpcap @0.9.5_1+universal (active)
libpng @1.2.22_0+darwin_8+universal (active)
links @2.1pre28_0+ssl+universal (active)
ncurses @5.6_0+darwin_8+universal (active)
ncursesw @5.6_0+darwin_8+universal (active)
openssl @0.9.8g_0+darwin_8+universal (active)
pcre @7.4_0+universal (active)
pwgen @2.06_1+universal (active)
readline @5.2.007_0+universal (active)
secpwgen @1.3_0 (active)
wget @1.10.2_0+darwin_8+universal (active)
zlib @1.2.3_1+universal (active)
Regarding automake & flex:
At some point amule cvs did not compile with the versions that were included in OS X/Xcode, so I had to install more recent ones. It's good to know that that is no longer the case but I'm a little conflicted now if I should leave them in to be on the safe side or if I should remove them.
Now it works with system automake and flex,
but amule configure tell me:
checking for extended flex capabilities... no
configure: Your flex version doesn't support --header-file flag. This is not critical, but an upgrade is recommended
Regarding libgd:
I think libgd is only required for the generation of the stats graphs in amuleweb. Unfortunately, libgd is neither included with MacPorts nor with Fink and I figured putting in instructions for compiling it by hand would be outside the scope of the how-to considering how little relevance libgd has within amule. If you find a good way to include a little note on this please go ahead and put it in.
Now MacPorts have libgd (gd2).
To compile wxMac I used:
CFLAGS="-O2" \
CXXFLAGS="-O2" \
CPPFLAGS="-I/opt/local/include" \
LDFLAGS="-L/opt/local/lib" \
time ../configure \
--disable-shared \
--enable-unicode \
--with-opengl \
--enable-optimise \
--enable-universal_binary \
&& read \
&& time make -j2 || exit 1
Some info:
Configured wxWidgets 2.8.6 for `powerpc-apple-darwin8.10.0'
Which GUI toolkit should wxWidgets use? mac
Should wxWidgets be compiled into single library? no
Should wxWidgets be compiled in debug mode? no
Should wxWidgets be linked as a shared library? no
Should wxWidgets be compiled in Unicode mode? yes
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.4 no
wxWidgets 2.6 yes
Which libraries should wxWidgets use?
jpeg sys
png sys
regex builtin
tiff builtin
zlib sys
odbc no
expat sys
libmspack no
sdl no
To compile aMule:
CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -O2" \
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -O2" \
CPPFLAGS="-I/opt/local/include" \
LDFLAGS="-L/opt/local/lib" \
time ./configure \
--disable-debug \
--enable-optimize \
--enable-amulecmd \
--enable-webserver \
--enable-cas \
--enable-wxcas \
--enable-alc \
--enable-alcc \
--enable-amule-daemon \
--enable-amule-gui \
--with-wxdir=../wxMac-2.8.6/build \
--disable-dependency-tracking \
&& read \
&& time make -j2 \
&& ./src/utils/scripts/mac_packager || exit 1
Some info:
Configured aMule CVS for 'powerpc-apple-darwin8.10.0'.
aMule enabled options:
**** aMule Core ****
Prefix where aMule should be installed? /usr/local
Should aMule be compiled with i18n support? yes
Should aMule be compiled in debug mode? no
Should aMule be compiled with profiling? no
Should aMule be compiled with optimizations? yes
Should aMule be compiled with UPnP support? yes
Should aMule be compiled with IP2country support? yes
Should aMule monolithic application be built? yes
Should aMule daemon version be built? yes
Should aMule remote gui be built? (EXPERIMENTAL) yes
Crypto++ library/headers style? embedded
**** aMule TextClient ****
Should aMule Command Line Client be built? yes
**** aMule WebServer ****
Should aMule WebServer be built? yes
**** aMule ED2K Links Handler ****
Should aMule ED2K Links Handler be built? yes
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? yes
Should aMuleLinkCreator for console (alcc) be built? yes
**** aMule Statistics ****
Should C aMule Statistics (CAS) be built? yes
Should aMule GUI Statistics (wxCas) be built? yes
**** General Libraries and Tools ****
Should ccache support be enabled? no
Libraries aMule will use to build:
wxWidgets 2.8.6 (mac,static)
crypto++ embedded
libpng 1.2.22
libgd 2.0.35
zlib 1.2.3
I found 2 binary that aren't universal:
super:~/mulo/amule-cvs gtoso$ find . |xargs file|grep -v "Mach-O fat "|grep -v "(for architecture "|grep Mach-O
./aMule.app/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS/applet: Mach-O executable ppc
./src/libs/ec/cpp/mkFileSum: Mach-O executable ppc
super:~/mulo/amule-cvs gtoso$ find /Applications/aMule-2.1.3-Mac_UniversalBinary_TigerOnly/ |xargs file|grep -v "Mach-O fat "|grep -v "(for architecture "|grep Mach-O
/Applications/aMule-2.1.3-Mac_UniversalBinary_TigerOnly//aMule.app/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS/applet: Mach-O executable ppc
super:~/mulo/amule-cvs gtoso$
The first one is in the sources and it's present in official aMule,
the second one is compiled without CFLAGS, but I don't think that it's important:
Making all in cpp
gcc ../../../../src/utils/mkFileSum.c -o mkFileSum
Generating ECVersion.h... created.
make all-am
Mac_packager script copy only amule, amulecmd, amuleweb and ed2k in MacOS,
I think that amuled, cas and alcc should be copied in MacOS and amulegui, wxcas and alc should have their app bundles.
It's right?
But the real problem is that binaries are dynamically linked to the MacPorts libraries:
super:~/mulo/amule-cvs gtoso$ otool -L src/amule
src/amule:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime (compatibility version 1.0.0, current version 9.0.0)
/opt/local/lib/libpng12.0.dylib (compatibility version 23.0.0, current version 23.0.0)
/opt/local/lib/libjpeg.62.dylib (compatibility version 63.0.0, current version 63.0.0)
/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
super:~/mulo/amule-cvs gtoso$ otool -L src/amulecmd
src/amulecmd:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime (compatibility version 1.0.0, current version 9.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libreadline.5.2.dylib (compatibility version 5.0.0, current version 5.2.0)
/opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
super:~/mulo/amule-cvs gtoso$ otool -L src/utils/cas/cas
src/utils/cas/cas:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 18.0.0)
/usr/X11R6/lib/libXpm.4.dylib (compatibility version 4.11.0, current version 4.11.0)
/usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
/opt/local/lib/libjpeg.62.dylib (compatibility version 63.0.0, current version 63.0.0)
/opt/local/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.16.0)
/opt/local/lib/libpng12.0.dylib (compatibility version 23.0.0, current version 23.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/opt/local/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/opt/local/lib/libgd.2.dylib (compatibility version 3.0.0, current version 3.0.0)
super:~/mulo/amule-cvs gtoso$ otool -L /opt/local/lib/libpng12.0.dylib
/opt/local/lib/libpng12.0.dylib:
/opt/local/lib/libpng12.0.dylib (compatibility version 23.0.0, current version 23.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
super:~/mulo/amule-cvs gtoso$
Ok I think it's possible to link amule to system libz and libiconv, but it must use at least libpng and libgd from MacPorts that are linked to other MacPorts libraries.
Is it possible to link statically to libpng and libgd as for wxMac?
I found 2 possible ways, but first I would like advice, given the time needed to recompile (3h 55m aMule, 3h 33m wxMac: real time on my PB G3 400):
1) Copy the required MacPorts libraries to Frameworks dir as mac_packager try to do for wxMac (in my case it's useless: wxMac is statically linked)
2) Try the --enable-static configure option
Another thing:
/usr/X11R6/lib comes with X11 or X11SDK package?
If so it may not exist,
I have just recompiled gd2 without X (no_x11 port variant),
could --without-x configure parameter prevent cas to link X11 libraries?
Goodbye and thanks,
Gianluca.
-
I changed the wiki article a bit. Instead of linking to the old thread here with CVS compiles, I made it link to this forum instead, since people post binaries here. The bit about checking out the wxMac code was also removed, since it no longer works, and phoenix warns that it will have many bugs.
edit: I revised the compile times mentioned in the article, and added my processor type. As it's only a 1.33 GHz G4, they can be considered worst case scenarios.
-
Is there any reason we prefix the crypto++ installation? Doesn't it just make it more complicated for the users? I've never had problem installing to /usr/local before.