RE: Universal build of cranky open source lib with a configure script
RE: Universal build of cranky open source lib with a configure script
- Subject: RE: Universal build of cranky open source lib with a configure script
- From: "Syd Polk" <email@hidden>
- Date: Thu, 25 Jan 2007 13:33:07 -0600
Setting "-arch ppc -arch i386" won't work with this project, apparently.
Note in particular:
if g++ -DHAVE_CONFIG_H -I. -I. -I../../include/ode -fomit-frame-
pointer -ffast-math -I../../include -I../../include -fomit-frame-
pointer -ffast-math -MT libdrawstuff_a-drawstuff.o -MD -MP -MF ".deps/
libdrawstuff_a-drawstuff.Tpo" -c -o libdrawstuff_a-drawstuff.o `test -
f 'drawstuff.cpp' || echo './'`drawstuff.cpp; \
then mv -f ".deps/libdrawstuff_a-drawstuff.Tpo" ".deps/libdrawstuff_a-
drawstuff.Po"; else rm -f ".deps/libdrawstuff_a-drawstuff.Tpo"; exit
1; fi
There are no -arch flags here. As a mater of fact, it looks like it is
ignoring CFLAGS altogether, as there is no -Os, nor is there an -isysroot.
It's also ignorning your setting for CXXFLAGS.
This particular project's configure.ac, Makefile.am, and/or Makefile.in are
not set up for this. They are going to have to be heavily modified.
Otherwise, you are going to have to do something like:
./configure --prefix=./ppcbuild --host=powerpc-apple-darwin8.8.2
cd ../ppcbuild
make
cd ..
./configure --prefix=./i386build --host=i386-apple-darwin8.8.2
cd ./i386build
make
And then write a script to lipo everything together.
In general, configure-based projects don't like "-arch ppc -arch i386", and
often have to have extensive infrastructure work to support "-isysroot". And
then you get to debug on each machine.
It might be easier to throw all of the source into an Xcode project, set up
all of your #defines and CFLAGS, and build using Xcode's build system.
Either way, though, it's not a straightforward port.
> -----Original Message-----
> From: xcode-users-bounces+sydvicious=email@hidden
> [mailto:xcode-users-bounces+sydvicious=email@hidden
> ] On Behalf Of Shamyl Zakariya
> Sent: Thursday, January 25, 2007 1:18 PM
> To: Peter O'Gorman
> Cc: email@hidden
> Subject: Re: Universal build of cranky open source lib with a
> configure script
>
> On Jan 24, 2007, at 6:33 PM, Peter O'Gorman wrote:
> >
> > Don't set --host or --build etc.
> >
> > ./configure .... CFLAGS='-Os -arch ppc -arch i386 -isysroot /
> > Developer/SDks/MacOSX10.4u.sdk' CXXFLAGS='-Os -arch ppc
> -arch i386 -
> > isysroot /Developer/SDks/MacOSX10.4u.sdk' LDFLAGS='-arch ppc -arch
> > i386 -isysroot /Developer/SDks/MacOSX10.4u.sdk'; make
> >
> > should just work. If not, please send me the relevant chunk of
> > build log.
> >
> > Peter
> >
>
>
> That's actually the initial approach I took, from one of the docs on
> ADC.
>
> Here's the output:
>
> Polyphemus:~/Projects/ODE/opende/branches/0.8-rc1 zakariya$ ./
> configure --enable-release --with-trimesh=gimpact --prefix=/Users/
> zakariya/Projects/ODE/build CFLAGS='-Os -arch ppc -arch i386 -
> isysroot /Developer/SDks/MacOSX10.4u.sdk' CXXFLAGS='-Os -arch ppc -
> arch i386 -isysroot /Developer/SDks/MacOSX10.4u.sdk' LDFLAGS='-arch
> ppc -arch i386 -isysroot /Developer/SDks/MacOSX10.4u.sdk'; make
> checking build system type... i386-apple-darwin8.8.2
> checking host system type... i386-apple-darwin8.8.2
> checking target system type... i386-apple-darwin8.8.2
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... no
> checking for mawk... no
> checking for nawk... no
> checking for awk... awk
> checking whether make sets $(MAKE)... yes
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking dependency style of gcc... gcc3
> checking whether byte ordering is bigendian... no
> checking how to run the C preprocessor... gcc -E
> checking for X... no
> checking whether make sets $(MAKE)... (cached) yes
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for windres... no
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking for working volatile... yes
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for stdbool.h that conforms to C99... yes
> checking for _Bool... yes
> checking for ranlib... ranlib
> checking for size_t... yes
> checking if a soname should be set... no
> checking alloca.h usability... yes
> checking alloca.h presence... yes
> checking for alloca.h... yes
> checking ieeefp.h usability... no
> checking ieeefp.h presence... no
> checking for ieeefp.h... no
> checking stdio.h usability... yes
> checking stdio.h presence... yes
> checking for stdio.h... yes
> checking for stdlib.h... (cached) yes
> checking math.h usability... yes
> checking math.h presence... yes
> checking for math.h... yes
> checking for string.h... (cached) yes
> checking stdarg.h usability... yes
> checking stdarg.h presence... yes
> checking for stdarg.h... yes
> checking malloc.h usability... no
> checking malloc.h presence... no
> checking for malloc.h... no
> checking values.h usability... no
> checking values.h presence... no
> checking for values.h... no
> checking float.h usability... yes
> checking float.h presence... yes
> checking for float.h... yes
> checking time.h usability... yes
> checking time.h presence... yes
> checking for time.h... yes
> checking sys/time.h usability... yes
> checking sys/time.h presence... yes
> checking for sys/time.h... yes
> checking if gyroscopic term should be used... yes
> checking if double precision is requested... no
> checking for appropriate dInfinity constant... FLT_MAX
> checking for float.h... (cached) yes
> checking for appropriate dEpsilon constant... FLT_EPSILON
> checking for a Pentium CPU... no
> checking for a x86-64 CPU... no
> checking if building a release library... yes
> checking if building a debug library... no
> checking for char... yes
> checking size of char... 1
> checking for int... yes
> checking size of int... 4
> checking for short... yes
> checking size of short... 2
> checking for long int... yes
> checking size of long int... 4
> checking for void*... yes
> checking size of void*... 4
> checking which drawstuff lib to build... OSX
> checking for the suffix of shared libraries... .dylib
> checking for main in -lcomctl32... no
> checking for main in -lkernel32... no
> checking for main in -luser32... no
> checking for main in -lgdi32... no
> checking for main in -lwinmm... no
> checking for main in -lstdc++... yes
> checking for main in -lm... yes
> checking for main in -lpthread... yes
> checking for gprof... no
> checking for floor... yes
> checking for memmove... yes
> checking for memset... yes
> checking for select... yes
> checking for sqrt... yes
> checking for sqrtf... yes
> checking for sinf... yes
> checking for cosf... yes
> checking for fabsf... yes
> checking for atan2f... yes
> checking for fmodf... yes
> checking for copysignf... yes
> checking for copysign... yes
> checking for snprintf... yes
> checking for vsnprintf... yes
> checking for gettimeofday... yes
> checking for isnan... yes
> checking for isnanf... no
> checking for _isnan... no
> checking for _isnanf... no
> checking for __isnan... yes
> checking for __isnanf... yes
> checking for working alloca.h... yes
> checking for alloca... yes
> checking for stdlib.h... (cached) yes
> checking for GNU libc compatible malloc... yes
> checking for obstacks... no
> checking for stdlib.h... (cached) yes
> checking for GNU libc compatible realloc... yes
> checking sys/select.h usability... yes
> checking sys/select.h presence... yes
> checking for sys/select.h... yes
> checking sys/socket.h usability... yes
> checking sys/socket.h presence... yes
> checking for sys/socket.h... yes
> checking types of arguments for select... int,fd_set *,struct
> timeval *
> checking for vprintf... yes
> checking for _doprnt... no
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating include/Makefile
> config.status: creating include/ode/Makefile
> config.status: creating ode/Makefile
> config.status: creating ode/src/Makefile
> config.status: creating drawstuff/Makefile
> config.status: creating drawstuff/src/Makefile
> config.status: creating drawstuff/dstest/Makefile
> config.status: creating ode/test/Makefile
> config.status: creating ode-config
> config.status: creating include/ode/config.h
> config.status: executing depfiles commands
> Configuration:
> Target system type: i386-apple-darwin8.8.2
> Build system type: i386-apple-darwin8.8.2
> Host system type: i386-apple-darwin8.8.2
> Use double precision: no
> Use OPCODE: no
> Use GIMPACT: yes
> Use gyroscopic term: yes
> Is this a Pentium: no
> Is the CPU x86-64: no
> Is this a release build: yes
> Is this a debug build: no
> Using SONAME: no
> Headers will be installed in /Users/zakariya/Projects/ODE/build/
> include/ode
> Libraries will be installed in
> /Users/zakariya/Projects/ODE/build/lib
> Making all in include
> Making all in ode
> make all-am
> make[3]: Nothing to be done for `all-am'.
> make[2]: Nothing to be done for `all-am'.
> Making all in drawstuff
> Making all in src
> if g++ -DHAVE_CONFIG_H -I. -I. -I../../include/ode -fomit-frame-
> pointer -ffast-math -I../../include -I../../include -fomit-frame-
> pointer -ffast-math -MT libdrawstuff_a-drawstuff.o -MD -MP
> -MF ".deps/
> libdrawstuff_a-drawstuff.Tpo" -c -o
> libdrawstuff_a-drawstuff.o `test -
> f 'drawstuff.cpp' || echo './'`drawstuff.cpp; \
> then mv -f ".deps/libdrawstuff_a-drawstuff.Tpo"
> ".deps/libdrawstuff_a-
> drawstuff.Po"; else rm -f ".deps/libdrawstuff_a-drawstuff.Tpo"; exit
> 1; fi
> if g++ -DHAVE_CONFIG_H -I. -I. -I../../include/ode -fomit-frame-
> pointer -ffast-math -I../../include -I../../include -fomit-frame-
> pointer -ffast-math -MT libdrawstuff_a-osx.o -MD -MP -MF ".deps/
> libdrawstuff_a-osx.Tpo" -c -o libdrawstuff_a-osx.o `test -f
> 'osx.cpp'
> || echo './'`osx.cpp; \
> then mv -f ".deps/libdrawstuff_a-osx.Tpo" ".deps/libdrawstuff_a-
> osx.Po"; else rm -f ".deps/libdrawstuff_a-osx.Tpo"; exit 1; fi
> osx.cpp: In function 'OSStatus osxKeyEventHandler
> (OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)':
> osx.cpp:186: warning: 'UppercaseText' is deprecated (declared at /
> System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/TextUtils.h:310)
> osx.cpp:186: warning: 'UppercaseText' is deprecated (declared at /
> System/Library/Frameworks/CoreServices.framework/Frameworks/
> CarbonCore.framework/Headers/TextUtils.h:310)
> osx.cpp: In function 'void osxCreateMainWindow(int, int)':
> osx.cpp:387: warning: 'GetMainDevice' is deprecated (declared at /
> System/Library/Frameworks/ApplicationServices.framework/Frameworks/
> QD.framework/Headers/Quickdraw.h:4873)
> osx.cpp:387: warning: 'GetMainDevice' is deprecated (declared at /
> System/Library/Frameworks/ApplicationServices.framework/Frameworks/
> QD.framework/Headers/Quickdraw.h:4873)
> rm -f libdrawstuff.a
> ar cru libdrawstuff.a libdrawstuff_a-drawstuff.o
> libdrawstuff_a-osx.o
> ranlib libdrawstuff.a
> Making all in dstest
> if g++ -DHAVE_CONFIG_H -I. -I. -I../../include/ode -fomit-frame-
> pointer -ffast-math -I../../include -I../.. -fomit-frame-pointer -
> ffast-math -MT dstest-dstest.o -MD -MP -MF
> ".deps/dstest-dstest.Tpo" -
> c -o dstest-dstest.o `test -f 'dstest.cpp' || echo './'`dstest.cpp; \
> then mv -f ".deps/dstest-dstest.Tpo" ".deps/dstest-dstest.Po"; else
> rm -f ".deps/dstest-dstest.Tpo"; exit 1; fi
> g++ -fomit-frame-pointer -ffast-math -arch ppc -arch i386 -
> isysroot /Developer/SDks/MacOSX10.4u.sdk -o dstest -L../../drawstuff/
> src dstest-dstest.o -ldrawstuff -arch ppc -arch i386 -isysroot /
> Developer/SDks/MacOSX10.4u.sdk -framework OpenGL -framework Carbon -
> framework AGL -lstdc++ -lm -lpthread -lstdc++ -lm -lpthread
> /usr/bin/ld: for architecture ppc
> /usr/bin/ld: warning dstest-dstest.o cputype (7, architecture i386)
> does not match cputype (18) for specified -arch flag: ppc (file not
> loaded)
> /usr/bin/ld: warning ../../drawstuff/src/libdrawstuff.a archive's
> cputype (7, architecture i386) does not match cputype (18) for
> specified -arch flag: ppc (can't load from it)
> /usr/bin/ld: Undefined symbols:
> _main
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//cc2r8bbW.out (No such file or
> directory)
> make[2]: *** [dstest] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
> Polyphemus:~/Projects/ODE/opende/branches/0.8-rc1 zakariya$
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40mac.com
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden