[gambit-list] Gambit for plan9?

Bakul Shah bakul at bitblocks.com
Tue Feb 12 15:06:43 EST 2013

On Tue, 12 Feb 2013 14:06:57 EST Marc Feeley <feeley at iro.umontreal.ca> wrote:
> You could try
>    ./configure

term% ./configure
./configure: '/bin/sh' file does not exist

term% ape/sh configure
sed: r.e.-using command garbled: /^.*\/\([^/][^/]*\)\/*$/{
configure: expr: not found
sed: r.e.-using command garbled:       s/[$]LINENO\([^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_].*\n\)\(.*\)/\2\1\2/
: error: cannot create .lineno; rerun with a POSIX shell

But this is not surprising.

> If the configure fails, from a fresh Gambit distribution directory you =
> could:
> 1) Create a new include/gambit.h file with
> echo #ifndef ___VOIDSTAR_WIDTH                > include/gambit.h
> echo #define ___VOIDSTAR_WIDTH ___LONG_WIDTH >> include/gambit.h
> echo #endif                                  >> include/gambit.h
> echo #ifndef ___MAX_CHR                      >> include/gambit.h
> echo #define ___MAX_CHR 0x10ffff             >> include/gambit.h
> echo #endif                                  >> include/gambit.h
> cat include/gambit.h.in                      >> include/gambit.h
> Usually the gambit.h file is created by the configure script, but here =
> we'll avoid using the configure script because it may have issues on =
> plan9.
> 2) In lib/ compile all the .c files to .o files using -D___LIBRARY and =
> -D___PRIMAL and -D___HAVE_STDIO_H and -D___HAVE_STDLIB_H.  Some of the =
> files (os*.c) are operating system dependent, so most of your problems =
> will be in compiling these files.  By default, only stdio functions will =
> be called for I/O and only malloc/free are used for memory allocation. =
> Obviously you won't have a bunch of functionality such as sockets, =
> process ports, time measurement, etc but these can be ported one by one =
> as the need arises by adding the appropriate -DHAVE_XXX and adapting the =
> os*.c files.

term% pcc -I../include -D___LIBRARY -D___PRIMAL -D___HAD_STDLIB_H *.c
cpp: _eval.c:645 Unknown preprocessor control f
cpp: ../include/gambit.h:748 _eval.c:661 Could not find include file <wchar.h>
cpp: ../include/gambit.h:833 _eval.c:661 Bad operator (@) in #if/#elif
cpp: ../include/gambit.h:1654 _eval.c:661 Bad operator (@) in #if/#elif
cpp: ../include/gambit.h:1657 _eval.c:661 Bad operator (@) in #if/#elif
cpp: ../include/gambit.h:1678 _eval.c:661 Bad operator (@) in #if/#elif
/usr/bakul/gambit/lib/../include/gambit.h:7250[stdin:6880] syntax error, last name: wchar_t
pcc: cpp: 8c 212: error

> Once step #2 is completed, you are almost done!

Looks like the port will require some real work!
That'll have to wait for some other time.

Nevertheless, thanks for the hints.


More information about the Gambit-list mailing list