Re: Building libetpan as a fat library for PPC and x86
DINH Viet Hoa <[email protected]> Fri, 24 Mar 2006 08:43:24 +0100
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <etPan.4423a31c.5bf468af.3048@utopia> |
Matt Ronge wrote : > I'm working on a Mac OS X framework that wraps around libetpan and for > my framework I'm going to need distribute it as a fat or universal > binary with both x86 and PPC code. So I've got make building object > files that are fat by passing the arguments to configure as shown below.. > > ./configure CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc > -arch i386" > LDFLAGS="-syslibroot,/usr/include/Developer/SDKs/MacOSX10.4u.sdk -arch > ppc -arch i386" > > However, at the end of the build the I get some problems with ar: > > mkdir .libs/liblow-level.lax/libimap.a > (cd .libs/liblow-level.lax/libimap.a && ar x > /Users/mronge/Projects/Kiwi/MailCore/libetpan/src/low-level/imap/.libs/libimap.a) > ar: > /Users/mronge/Projects/Kiwi/MailCore/libetpan/src/low-level/imap/.libs/libimap.a > is a fat file (use libtool(1) or lipo(1) and ar(1) on it) > ar: > /Users/mronge/Projects/Kiwi/MailCore/libetpan/src/low-level/imap/.libs/libimap.a: > Inappropriate file type or format > make[2]: *** [liblow-level.la] Error 1 > make[1]: *** [all-recursive] Error 1 > > I tried setting things up to use libtool instead of ar, but I am unsure > what I should do. > AR="libtool" > > Any ideas? Has anyone built this as a fat binary? 1. The idea of the .a is to group some .o files Since you are building i386 part and ppc part, it could be interesting to build on .a file for each architecture. And at the end, you will build the dyld file that is universal. However, I am not sure about how to do this. 2. Other idea : maybe an idea could be to include all sources into the framework and build it ? Maybe you'll need to make libetpan a sub-framework so that headers inclusion will be easier. -- DINH V. Hoa, "l'informatique est une source inépisable de calembours divers" -- 7th
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBEI6RW7w+pfAWHa3MRAtMvAJ4zb0378twm62sqt1VRhKuyEsWTPACcDtvq 43eA8Qy17YP5TeyWRVH0+xw= =1isr -----END PGP SIGNATURE-----