[plt-scheme] Build PLT Scheme on Mac OS X Snow Leopard (10.6) for Leopard (10.5)

From: Todd V Rovito (rovitotv at gmail.com)
Date: Fri Jun 4 22:59:34 EDT 2010

Greetings,
    I have a project that I am working on were people do most of their work
on Leopard but machines are starting to trickle in that have 10.6 or Snow
Leopard.  So far we have been able to move the 10.5 binaries to 10.6 and run
with no problems.  Now as a developer I have 10.6 and I want to build the
project for 10.5, Apple supports this with the options -isysroot
/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 as documented on
this web page:
http://cocoawithlove.com/2009/09/building-for-earlier-os-versions-in.html.
This seems to work for some simple projects both in xcode and on the command
line.  But with PLT Scheme version 4.2.3 (for mac) I can't build using the
following commands:
export LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5"
export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5"
./configure --prefix=/opt/plt-scheme --disable-mred --enable-xonx && make
both && make install-both

The configure runs ok but the build failes with the output below, thanks for
the help.



gcc -m32 -I./.. -I./../include -isysroot /Developer/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5 -DOS_X -D_DARWIN_UNLIMITED_SELECT -DXONX
-DNEWGC_BTC_ACCOUNT    -Wall  -I./.. -c ./gc2.c -o gc2.o
ar ruv ../libmzscheme3m.a salloc.o bignum.o bool.o builtin.o char.o
complex.o dynext.o env.o error.o eval.o file.o fun.o future.o hash.o jit.o
list.o module.o mzrt.o network.o numarith.o number.o numcomp.o numstr.o
places.o port.o portfun.o print.o rational.o read.o regexp.o sema.o
setjmpup.o string.o struct.o stxobj.o symbol.o syntax.o thread.o type.o
vector.o foreign.o ../src/gmp.o ../src/unwind.o
../../foreign/gcc/libffi/src/*.o ../../foreign/gcc/libffi/src/*/*.o gc2.o
ar: creating archive ../libmzscheme3m.a
a - salloc.o
a - bignum.o
a - bool.o
a - builtin.o
a - char.o
a - complex.o
a - dynext.o
a - env.o
a - error.o
a - eval.o
a - file.o
a - fun.o
a - future.o
a - hash.o
a - jit.o
a - list.o
a - module.o
a - mzrt.o
a - network.o
a - numarith.o
a - number.o
a - numcomp.o
a - numstr.o
a - places.o
a - port.o
a - portfun.o
a - print.o
a - rational.o
a - read.o
a - regexp.o
a - sema.o
a - setjmpup.o
a - string.o
a - struct.o
a - stxobj.o
a - symbol.o
a - syntax.o
a - thread.o
a - type.o
a - vector.o
a - foreign.o
a - ../src/gmp.o
a - ../src/unwind.o
a - ../../foreign/gcc/libffi/src/closures.o
a - ../../foreign/gcc/libffi/src/debug.o
a - ../../foreign/gcc/libffi/src/java_raw_api.o
a - ../../foreign/gcc/libffi/src/prep_cif.o
a - ../../foreign/gcc/libffi/src/raw_api.o
a - ../../foreign/gcc/libffi/src/types.o
a - ../../foreign/gcc/libffi/src/x86/darwin.o
a - ../../foreign/gcc/libffi/src/x86/darwin64.o
a - ../../foreign/gcc/libffi/src/x86/ffi.o
a - ../../foreign/gcc/libffi/src/x86/ffi64.o
a - gc2.o
/usr/bin/ranlib: file: ../libmzscheme3m.a(future.o) has no symbols
/usr/bin/ranlib: file: ../libmzscheme3m.a(mzrt.o) has no symbols
/usr/bin/ranlib: file: ../libmzscheme3m.a(unwind.o) has no symbols
/usr/bin/ranlib: file: ../libmzscheme3m.a(darwin64.o) has no symbols
/usr/bin/ranlib: file: ../libmzscheme3m.a(ffi64.o) has no symbols
ranlib ../libmzscheme3m.a
ranlib: file: ../libmzscheme3m.a(future.o) has no symbols
ranlib: file: ../libmzscheme3m.a(mzrt.o) has no symbols
ranlib: file: ../libmzscheme3m.a(unwind.o) has no symbols
ranlib: file: ../libmzscheme3m.a(darwin64.o) has no symbols
ranlib: file: ../libmzscheme3m.a(ffi64.o) has no symbols
cd ..; gcc -m32 -o mzscheme3m  gc2/main.o libmzscheme3m.a -isysroot
/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -ldl -lm  -liconv
Undefined symbols:
  "_fopen$UNIX2003", referenced from:
      _copy_file in libmzscheme3m.a(file.o)
      _copy_file in libmzscheme3m.a(file.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[4]: *** [../mzscheme3m] Error 1
make[3]: *** [all] Error 2
make[2]: *** [3m] Error 2
make[1]: *** [3m] Error 2
make: *** [both] Error 2
_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.