On Jul 31, 2011, at 8:26 PM, Adam King wrote:
On Sun, Jul 31, 2011 at 8:42 PM, Raffael Cavallaro raffaelcavallaro@mac.com wrote:
Adam, maybe you could email your scripts to Marc and he could incorporate them into the the gambit releases since you seem to be having more consistent success at getting it to build for all platforms under Xcode.
I've copied each script below. It actually doesn't need to be two scripts for each platform afterall - I've just updated them (and rebuilt all) with the scripts below under the latest beta of Xcode 4.2 and ran each with my code without issue. However, my setup is probably unique to me but may be of use. I place the primary OSX build under /usr/local/Gambit-C and then the two iOS builds are installed under /usr/local/Gambit-C/iPhoneOS and /usr/local/Gambit-C/iPhoneSimulator - and I've setup Xcode to pick the correct -lgambc to link based on the current target. The 3 scripts are:
OSX:
export CC='clang' export CXX='clang++'
./configure --prefix=/usr/local/Gambit-C CFLAGS="-arch i386" LDFLAGS="-arch i386" ./configure --prefix=/usr/local/Gambit-C --enable-single-host --host=i386 make sudo make install
So using the currently-available pre-release version of the dev tools with XCode 4.2 (build 4D139), the 4.6.1 devel sources, and the above commands, the compile of the Gambit sources gets to here:
making all in include major=`echo v4.6.1 | sed -e "s/v//g" -e "s/.[^.]*.[^.]*//g"`; \ minor=`echo v4.6.1 | sed -e "s/v[^.]*.//g" -e "s/.[^.]*//g"`; \ revision=`echo v4.6.1 | sed -e "s/v[^.]*.[^.]*.//g" -e "s///g"`; \ version_num=`eval expr "( 100000 \* $major ) + ( 1000 \* $minor ) + $revision"`; \ echo "#error "The version indicated in ___VERSION is not supported by gambit.h"" > gambit-not$version_num.h; \ echo "#error "You are probably compiling C code generated by a Gambit compiler earlier or later than v4.6.1"" >> gambit-not$version_num.h; \ echo "#error "___VERSION will be set to $version_num to reduce other errors"" >> gambit-not$version_num.h; \ echo "#undef ___VERSION" >> gambit-not$version_num.h; \ echo "#define ___VERSION $version_num" >> gambit-not$version_num.h; \ echo "#include "gambit.h"" >> gambit-not$version_num.h making all in lib clang -arch i386 -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fomit-frame-pointer -fno-move-loop-invariants -fPIC -fno-common -mieee -mieee-with-inexact -mieee-fp -I"../include" -c -o "_io.o" -I. -DHAVE_CONFIG_H -D___GAMBCDIR=""/usr/local/gambit/macosx"" -D___SYS_TYPE_CPU=""i386"" -D___SYS_TYPE_VENDOR=""pc"" -D___SYS_TYPE_OS=""none"" -D___CONFIGURE_COMMAND=""./configure --prefix=/usr/local/gambit/macosx --enable-single-host --host=i386"" -D___OBJ_EXTENSION="".o"" -D___EXE_EXTENSION="""" -D___BAT_EXTENSION="""" -D___PRIMAL _io.c -D___LIBRARY clang: warning: argument unused during compilation: '-fschedule-insns2' clang: warning: argument unused during compilation: '-fno-trapping-math' clang: warning: argument unused during compilation: '-fno-move-loop-invariants' clang: warning: argument unused during compilation: '-mieee' clang: warning: argument unused during compilation: '-mieee-with-inexact' clang: warning: argument unused during compilation: '-mieee-fp'
…and sits there for a few hours.
I'm going to let it sit for a while longer, and then, perhaps tomorrow, try something else.
--me