This may not be an issue for some people, but for anyone (e.g. me) using "link.lsp", this is potentially serious, and actually could be serious for everyone if the machine used to generate the newlisp binaries runs on 10.6.
The current Makefiles for OS X compile against the system's libraries, and this means that the binaries they generate will likely not run on older systems. I know that this is definitely true if you've compiled newlisp on 10.6. A version of newlisp compiled on 10.6 won't run on any older system, you'll get this mysterious error:
Code: Select all
dyld: unknown required load command 0x80000022
Here's my modified Makefile (it includes some of the stuff from the existing Makefile):
Code: Select all
# makefile for newLISP v. 10.x.x on Mac OSX with readline support
#
# for OS X 10.4/Tiger, Tiger comes standard with libreadline
#
# needs readline library and headerfiles installed (X tools)
# use the Mac OS X lipo utitlity to extract one or the other ppc/intel
# example: lipo newlisp-universal -output newlisp-ppc -thin ppc7400
# note: architecture id for ppc on Tiger: ppc on Leopard: ppc7400
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
CFLAGS = -Wall -arch i386 -arch ppc -O2 -c -g -DREADLINE -DMAC_OSX -DSUPPORT_UTF8 -isysroot /Developer/SDKs/MacOSX10.5.sdk
#CFLAGS = -Wall -I/usr/include -c -g -DREADLINE -DMAC_OSX
default: $(OBJS)
$(CC) $(OBJS) -mmacosx-version-min=10.5 -arch i386 -arch ppc -g -lm -lreadline -o newlisp-universal
strip newlisp-universal
# lipo newlisp-universal -output newlisp-intel -thin i386
# lipo newlisp-universal -output newlisp-ppc -thin ppc
.c.o:
$(CC) $(CFLAGS) $<
$(OBJS): primes.h protos.h makefile_darwin_universal_utf8
1) When compiling the object files, you *must* include:
Code: Select all
-isysroot /Developer/SDKs/MacOSX10.5.sdk
2) When linking all the object files together, you *must* include:
Code: Select all
-mmacosx-version-min=10.5