From: Daniel S. <dv...@ea...> - 2003-09-10 14:36:13
|
MEMO: clisp-2.31 under Mac OSX 2.6 for dummies FROM: Devious Dan DATE: 2003-09-07 First remove any workarounds for dynamic loading. I had to remove a fake dlfcn.h header file from /usr/include. That was a hack I used to build earlier versions of clisp. Another patch from OSXGNU does the same thing. Try disabling that if you have it and cannot "make" clisp. What follows was done with the tcsh shell, the default for OSX. Download the .gz form of the package and expand with tar -zxvf clisp-2.31.tar.gz Go into the clisp-2.31 folder ... cd clisp-2.31 Configure with by typing ./configure Ignore the error near the end of the type-out. There is no "avcall" feature under Mac OSX, so the message is irrelevant. Go into the source folder ... cd src Build the "Make" and configuration files (two commands) ... ./makemake > Makefile make config.lisp First hack: increase the stack size to 16384. Unlike previous versions of clisp, 8192 is just not enough. So type limit stacksize 16384 Second hack: Edit Makefile, which is inside /src. I just double-clicked it and it opened with TextEdit. Go down one screen, or about 35 lines and edit CFLAGS. Without inserting a carriage return, add the clause -traditional-cpp. The new line should look line this, ... and it's only one actual line! CFLAGS = -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -fomit-frame-pointer -Wno-sign-compare -O2 -traditional-cpp -DUNICODE -DNO_GETTEXT -DNO_SIGSEGV Edit the file config.lisp as you like, naming your site, installation, etc. Compile and build clisp by simply typing make After about 20 minutes, assuming things work, test your build ... make check make test make testsuite Make yourself super-user, complete the installation, and immediately exit as superuser ... su password:yourpass make install exit You have built clisp, but there are problems. You must set the stack size every time you invoke clisp, or you get "segmentation faults" and clisp crashes. (It took me the longest time to see this.) My solution is an alias: alias clisp 'limit stacksize 16384; /usr/local/bin/clisp -C' Put this in whatever shell configuration file you use. If you don't have one, create a file called aliases.mine with the above as a single line. Add other aliases if you like. Put the file in this location: Library/init/tcsh/aliases.mine If you don't have these folders, create ones with those names. You can do it in the regular Mac environment. Observe: I used the full pathname for clisp in order not to have a "circular alias reference." Also, I used the -C flag which makes everything compile instead of being interpreted. On a machine fast enough for OSX, compilation time is negligible. See you in the movies ... --------------------------------------- |