[vtkusers] How to build libraries for both 32-bit and 64-bit architectures

Michael Jackson mike.jackson at bluequartz.net
Sun Sep 28 14:58:46 EDT 2008


On Sep 28, 2008, at 2:44 PM, Martin Costabel wrote:

> Elvis Dowson wrote:
> []
>> ./configure make
>> This results in the following error for libpng-1.2.31
>> /bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H - 
>> I.  -DPNG_CONFIGURE_LIBPNG    -arch i386 -arch x86_64 -MT  
>> libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c -o  
>> libpng12_la-png.lo `test -f 'png.c' || echo './'`png.c
>> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG - 
>> arch i386 -arch x86_64 -MT libpng12_la-png.lo -MD -MP -MF .deps/ 
>> libpng12_la-png.Tpo -c png.c  -fno-common -DPIC -o .libs/ 
>> libpng12_la-png.o
>> gcc-4.0: -E, -S, -save-temps and -M options are not allowed with  
>> multiple -arch flags
>> make[1]: *** [libpng12_la-png.lo] Error 1
>> make: *** [all] Error 2
>> How can I disable -save-temps and -M options?
>> The ./configure --help doesnt give much or document this.
> []
>
> Try this one:
>
>>  --disable-dependency-tracking  speeds up one-time build
>
> -- 
> Martin

If all else fails then you can build each type separately and then use  
"lipo" to stick them together into a single binary. Be careful when  
you do that as the "install_name" must be exactly the same for each  
library.

http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_3.html


Mike




More information about the vtkusers mailing list