[gambit-list] Gambit and Meroon

Bradley Lucier lucier at math.purdue.edu
Thu Feb 9 22:03:02 EST 2006


On Feb 9, 2006, at 4:40 PM, John wrote:

>
> Yo yo --
>
> I'd like to get Meroon up in Gambit.  I'm using Bradley Lucier's  
> port, which seems to almost work.  With the requisite (load  
> "_meroon") in gambcini, I can use meroon in gsi.  But gsc complains  
> quite a bit:
>
> $ gsc class.scm
> [ Meroon V3 Paques2001+1 $Revision: 1.1 $ ]
> *** WARNING -- "Class-allocator" is not defined,
> ***            referenced in: ("class.c")
> *** WARNING -- "Inlinable-Class-class" is not defined,
> ***            referenced in: ("class.c")
> ... and so on.
>
> The build succeeds, but the executable fails like so:
>
> *** ERROR IN | class| -- Operator is not a PROCEDURE
> (#!unbound #!unbound)
>
> Am I doing something wrong?

Well, it's kind of a pain to build a standalone executable with  
Meroon. ... When I just tried it I found out I didn't know how to do  
it, either.  Here's how far I got, perhaps someone can finish it.

First you build _meroon, but keep .c files around.

euler-45% ./make_meroon
<whatever>

Then you find out what the options are for compiling C code on your  
machine.

euler-45% cat `which gsc-cc-o`
#! /bin/sh
GSC_CC_O_ARG1=$1
shift
GSC_CC_O_ARG2=$1
shift
GSC_CC_O_ARG3=$1
shift
gcc  -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno- 
trapping-math -fno-strict-aliasing -fwrapv -fomit-frame-pointer -fPIC  
-fno-common -mieee-fp -rdynamic -shared -I${GSC_CC_O_ARG1}include - 
D___DYNAMIC -D___SINGLE_HOST -o ${GSC_CC_O_ARG2} $* ${GSC_CC_O_ARG3}

My application file is called linearalgebra.scm; compile it, link it  
with _meroon.c:

euler-55% gsc
Gambit Version 4.0 beta 17

 > (load "_meroon")
[ Meroon V3 Paques2001+1 $Revision: 1.1 $ ]
"/export/users/lucier/programs/MeroonV3-2001Apr24/_meroon.o1"
 > (compile-file-to-c "linearalgebra")
#t
 > (link-incremental '("_meroon" "linearalgebra") "linearalgebra_.c")

Then I tried to compile it, but got

euler-69% gcc -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule- 
insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fomit-frame- 
pointer -fPIC -fno-common -mieee-fp -I/pkgs/Gambit-C/include -L/pkgs/ 
Gambit-C/lib -D___SINGLE_HOST _meroon.c linearalgebra.c  
linearalgebra_.c -o linearalgebra -lgambc -lm
/tmp/ccXgPFhV.o(.text+0x8d1b3): In function `____20___meroon_2e_o1':
: undefined reference to `___S_gambit'
collect2: ld returned 1 exit status

I haven't built a standalone application with Meroon in years, sorry,  
I always do stuff like:

euler-72% gsc
Gambit Version 4.0 beta 17

 > (load "_meroon")
[ Meroon V3 Paques2001+1 $Revision: 1.1 $ ]
"/export/users/lucier/programs/MeroonV3-2001Apr24/_meroon.o1"
 > (compile-file "linearalgebra")
#t
 > (load "linearalgebra")
#f64(4. 6.)
"/export/users/lucier/programs/MeroonV3-2001Apr24/linearalgebra.o1"




More information about the Gambit-list mailing list