Here are some notes on compiling and using goo-0_155-any-dev on FreeBSD. I'm using FreeBSD 4.8, but later versions shouldn't be that different. 1. FreeBSD 4.8 comes with version 2.0.1 of gmp. This is too old to work with goo. (Some later versions of FreeBSD don't include gmp at all, apparently.) Install the libgmp-4.1.2 port from /usr/ports/math/libgmp4. 2. Install the boehm-gc port from /usr/ports/devel/boehm-gc. 3. FreeBSD ports install under /usr/local, but the FreeBSD gcc doesn't look in /usr/local/include by default when compiling nor does it look in /usr/local/lib by default when linking. You'll have to run configure with the environment variables CFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/include' 4. On FreeBSD /usr/include/values.h warns that it is obsolete and should be replaced with limits.h. The compilation of goo fails because there are no definitions for LONG_MAX or LONG_MIN in values.h. The solution is to replace values.h with limits.h everywhere: ./c/g2c/goo/bignum.c:781:#include <values.h> ./src/goo/bignum.goo:7:#include <values.h> ./src/goo/bignum/%gmp.c:2:#include <values.h> ./src/goo/bignum/gmp.goo:9:#include <values.h> 5. As far as I can tell, the goo configure script does not save the values of CFLAGS and LDFLAGS anywhere to be used when compiling the C code generated at the repl, so those compilations fail with an error about not being able to include gc/gc.h. Changing the variable `bv' in the function `YgooSsystemYPcompile' in c/g2c/goo/%system.c and src/goo/%system.c to include "-I/usr/local/include" as one of its elements fixes that problem, but it would probably be better to specify this through the configure script somehow, either by saving the value of CFLAGS or by an argument to the configure script. Here's a patch, but don't apply it blindly, since it includes the change to `YgooSsystemYPcompile' mentioned in #5.
Attachment:
goo.patch
Description: ugly patches for FreeBSD; use only for reference
-- T. Kurt Bond, tkb@tkb.mpl.com