aMule Forum
English => Multiplatform => Mac OSX => Topic started by: mirko.g on April 21, 2009, 10:45:52 AM
-
I'm working on a Universal Binary release of aMule-2.2.4! This is the log of my progress.
LAST UPDATE: May, 5th 2009
Last stable build
Yet to be released...
LOG:
GeoIP 1.4.6 has just been released and it add +universal variant.
$ sudo port info libgeoip
libgeoip @1.4.6 (devel, net)
Variants: universal
Crypto++ portfile (libcryptopp) has not been updated yet. MacPort still provides Crypto++ 5.5.2 with no universal variant but I'm working on a self-compiled version of Crypto++ 5.6.
MacPorts' crew helped me with libgeoip, now I hope they will release a new librcryptopp too.
-
I installed all portfiles with +universal.
I compiled Crypto++ 5.6 Universal Binary with no errors.
I compiled wxWidgets with --enable-universal_binary.
I configured aMule with:
./configure --disable-systray --disable-gtk --enable-embedded_crypto --with-wx-config=../wxMac-2.8.10/wx-config \
--enable-optimize --with-crypto-prefix=/usr/local/cryptopp --with-gdlib-config=/opt/local/bin/gdlib-config --with-libiconv-prefix=/opt/local \
--enable-cas --enable-webserver --enable-amulecmd --enable-amule-gui --enable-wxcas --enable-alc --enable-alcc --enable-amule-daemon \
--enable-geoip --with-geoip-lib=/opt/local/lib --with-geoip-headers=/opt/local/include --enable-geoip-static --enable-debug --enable-debug_gdb \
--disable-dependency-tracking \
CFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
CXXFLAGS="-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk"
I got:
Configured aMule 2.2.4 for 'i686-apple-darwin9.6.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? yes
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? installed
**** 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.10 (mac,static)
crypto++ 5.6.0 (installed, in /usr/local/cryptopp)
libupnp 1.6.6
regex system
libintl included
libGeoIP user
libpng 1.2.35
libgd 2.0.35
zlib 1.2.3
I get errors about libcryptopp.a that is not of required architecture.
I didn't expect it would be such a struggle to compile Universal binary... :-X
Any suggestion?
-
Try "file /usr/local/lib/libcryptopp.a"
if it's universal binary (ppc/i386) you should see something as:
enterprise:~ sadmin$ file /opt/local/lib/libcryptopp.a
/opt/local/lib/libcryptopp.a: Mach-O universal binary with 2 architectures
/opt/local/lib/libcryptopp.a (for architecture ppc): current ar archive
/opt/local/lib/libcryptopp.a (for architecture i386): current ar archive
enterprise:~ sadmin$
I used cryptopp from MacPorts, with these patches (http://trac.macports.org/ticket/19368).
-
Try "file /usr/local/lib/libcryptopp.a"
if it's universal binary (ppc/i386) you should see something as:
enterprise:~ sadmin$ file /opt/local/lib/libcryptopp.a
/opt/local/lib/libcryptopp.a: Mach-O universal binary with 2 architectures
/opt/local/lib/libcryptopp.a (for architecture ppc): current ar archive
/opt/local/lib/libcryptopp.a (for architecture i386): current ar archive
enterprise:~ sadmin$
I used cryptopp from MacPorts, with these patches (http://trac.macports.org/ticket/19368).
Thanks for your hints... I tried also with the Crypto++ UG but it seems no one is interested in Mac OS development... :-\
http://groups.google.com/group/cryptopp-users/browse_thread/thread/b8fd23386cdabaf6?hl=en
-
The problem is that cryptopp GNUmakefile set CXXFLAGS to "-DNDEBUG -g -O2" regardless previous value.
CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc" make
doesn't work...
make CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc"
or
make CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc -DNDEBUG -g -O2"
should work.
My GNUmakefile patch changes:
CXXFLAGS = -DNDEBUG -g -O2
in:
CXXFLAGS += -DNDEBUG -g -O2
so it appends to CXXFLAGS instead of replace.
If you want Tiger compatibility use -isysroot /Developer/SDKs/MacOSX10.4u.sdk or -mmacosx-version-min=10.4.
MACOSX_DEPLOYMENT_TARGET=10.4 CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc -mmacosx-version-min=10.4" make
-
Great... you definitely rocks!!! :D
-
When you build universal binary, remember to test every binaries and library with otool to see if load the correct libraries.
And if you have problem see here (http://www.amule.org/amule/index.php?topic=16911.0).