Re: Build 64 bit libCURL on Mac OS X 10.5.x
Date: Fri, 13 Feb 2009 16:57:07 -0500
On Feb 13, 2009, at 10:29 AM, Yang Tse wrote:
> 2009/2/13, Daniel Johnson wrote:
>> [...] All libraries included with OS X 10.5.x are 4-way fat (i386,
>> x86_64, ppc, ppc64) but if you use any extra libs like libssh2,
>> they may
>> have to be rebuilt.
> This comment rings a couple of bells here...
> First. I'm quite sure that lib/libcurl.framework.make, which only
> addresses i386 and ppc, has gotten outdated and lacks some file
> references in it. Anybody willing to test it and show us linker
> errors, or fix'em ?
It would be easier and more maintainable to just incorporate framework
building into the regular configure/Makefile process. I've seen other
projects do this. A framework is simply a shared lib packaged up with
headers and an XML file in a particular directory structure, so
there's no reason it can't be done during the normal build process.
I'll look into making the changes.
> And second, but probably more important. Since the introduction of the
> dynamically generated libcurl external header files, does this
> makefile serve its original purpose ? What is Apple doing to provide a
> 4-way fat libcurl library, if doing so ?
Apple includes a 4-way fat libcurl, but it's verison 7.16.3. The
normal way would be to set CFLAGS="-isysroot /Developer/SDKs/
MacOSX10.5.sdk -arch ppc -arch ppc64 -arch i386 -arch x86_64"
LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch
ppc64 -arch i386 -arch x86_64" then ./configure --disable-dependency-
tracing and make. Unfortunately, that won't work with an unpatched
libcurl since configure checks for the size of types like 'long' which
will be different for 32 and 64 bit. Apple patches config.h to do
#define SIZEOF_LONG 8
#else /* !__LP64__ */
#define SIZEOF_LONG 4
#endif /* __LP64__ */
so that it works either way. Anything configure checks that varies
with bitness will break fat building. Otherwise, in order to build 4-
way fat you would have to do two separate builds, one 32 and one 64,
and combine them with /usr/bin/lipo.
Received on 2009-02-13