rds :: graphikos

[ home | photos | gallery | scheme | notes | blog | facebook | twitter | youtube | last.fm | myspace | del.icio.us | EverythingHerePlus ]

Scheme on MacOSX Collected Short Items 1

Various items and how to information, recorded partly so I can refer back to them if necessary. Some items may help others.

Contents
Patch for Guile 1.6.4 libguile/gc_os_dep.c
Chicken Scheme from CVS on Mac OS X
Building Chicken Examples in Versions 0.1082 and 1.0
UMB Scheme 3.2 Relocation and Installation

Patch for Guile 1.6.4 libguile/gc_os_dep.c

The following patch to ./libguile/gc_os_dep.c

379c379
< # ifndef mach_type_known
---
> # ifdef mach_type_known

Needs static ./configure --disable-shared --prefix=/Users/Shared # last flag optional, make check fails, but guile installs and runs.

Chicken Scheme from CVS on Mac OS X

Read doc/README.CVS carefully. Already have current release version installed in /Users/Shared/bin, and have no intentions of replacing with unstable binaries. Build cvs version in place using currently installed version instead of following step 2 in README.CVS documentation. autocvs fails due to Apple moving/renaming common tools. Fix with symbolic link:

rds% sudo ln -s /usr/bin/glibtoolize /usr/bin/libtoolize

Use make instead of gmake, BOOTSTRAP_PATH is to current installed release.

rds% make BOOTSTRAP_PATH=/Users/Shared/bin

Build process errors near end, rerun with -k flag to make. Ran make without flag to insure that everything builds correctly.

rds% ./csi
; This is the CHICKEN interpreter.
; Version 1, Build 19 - macosx-gnu-ppc
; (c)2000-2003 Felix L. Winkelmann
>>>

Run commands in step 8, including 2-stage bootstrap instructions.

Building Chicken Examples in Versions 0.1082 and 1.0

The Chicken distribution has some great examples, including an X Window based one that works under Apple's X11 and XDarwin. The following will get those working. Made ln -s /usr/X11R6/include/X11/ /usr/include/X11 and ln -s /usr/X11R6 /usr/X11 to accommodate chicken examples that call X11. The Mandlebrot test runs well.

Patch to 0.1082 makefile to reflect build directory, as setting the environment variable every time between logins was becoming cumbersome. The examples directory remains in the build directory, it is not installed during make install. This isn't needed for version 1.0, which uses relative paths.

/Users/Shared/src/chicken-0.1082/examples/Makefile

9c9,10
< SRCDIR = $(CHICKEN_HOME)/src
---
> #SRCDIR = $(CHICKEN_HOME)/src
> SRCDIR = /Users/rds/code/chicken-0.1082

UMB Scheme 3.2 Relocation and Installation

UMB Scheme does not use configure, instead it has a static Makefile. The prefix relocation method described in Utilizing an Alternative to /usr/local on OSX will not work. To relocate and install UMB Scheme in a directory other than /usr/local, some hand editing is necessary.

scheme-3.2 changed standard prelude paths in steering.c, prelude.scheme, and SLIB-for-umb-scheme.init use the following patches to regain original.

[THE FOLLOWING STILL NEEDS TO BE CLEANED UP]
for steering.c
65,66c65
< /* #define STANDARD_PRELUDE_PATHNAME "/usr/local/lib/scheme/prelude.scheme" */
< #define STANDARD_PRELUDE_PATHNAME "/Users/Shared/lib/scheme/prelude.scheme"
---
> #define STANDARD_PRELUDE_PATHNAME "/usr/local/lib/scheme/prelude.scheme"

for prelude.scheme
711,712c711
< ;(load "/usr/local/lib/scheme/SLIB-for-umb-scheme.init")
< (load "/Users/Shared/lib/scheme/SLIB-for-umb-scheme.init")
---
> (load "/usr/local/lib/scheme/SLIB-for-umb-scheme.init")

for SLIB-for-umb-scheme.init
43,44c43
<     ;((UNIX)   "/usr/local/src/scheme/")
<     ((UNIX)    "/Users/Shared/src/scheme/")
---
>     ((UNIX)    "/usr/local/src/scheme/")
59,60c58
<           ;((UNIX) "/usr/local/lib/slib/")
<           ((UNIX) "/Users/Shared/lib/slib/")
---
>           ((UNIX) "/usr/local/lib/slib/")


The following should install
#!/bin/sh

cd /Users/Shared/src/scheme-3.2
cp -f scheme /Users/Shared/bin/scheme
if [ ! -e "/Users/Shared/lib/scheme" ]; then
	mkdir /Users/Shared/lib/scheme
fi
cp -f prelude.scheme /Users/Shared/lib/scheme
cp -f -r slib /Users/Shared/lib
cp -f SLIB-for-umb-scheme.init /Users/Shared/lib/scheme
cp -f scheme.1 /Users/Shared/man/man1