[Vm-dev] FFI for Squeak 3.8 Open Cobalt

Andreas Raab andreas.raab at gmx.de
Thu Nov 12 06:22:38 UTC 2009


Hi Gary -

A couple of notes. Croquet / Cobalt have some special requirements for 
their VMs which relate to the bit-identical execution of the Croquet 
environment. I suspect that may be the problem.

As the first thing you should run the CroquetVMTests in Cobalt to ensure 
that your VM adheres to the required invariants.

If that passes, you should run "FFITester testAll" next to ensure that 
the FFI is working properly in your environment.

When that works, it's time to try launching OpenGL via:

	(OpenGL newIn: (0 at 0 corner: 100 at 100))
		clearWindow: #(1 0 0 1);
		swapBuffers.

(this should result in a red square). If all of the above works you have 
a good chance that Cobalt will work as well but more likely one or the 
other will fail which will help you find out more about what you need to 
fix.

Cheers,
   - Andreas

Gary Dunn wrote:
>  
> (mutoh is the Squeak port maintainer. Please reply directly to me as the
> vm-dev list requires subscription.)
> 
> I am trying to get Open Cobalt running on FreeBSD 7.1, Gnome 2.24. I
> installed Squeak 3.9 from ports and have a 3.10 image running fine.
> 
> Open Cobalt is configured for Linux. The image is based on Squeak 3.8.
> To get it to run at all I had to modify the startup script, basically to
> use my squeak instead of the one that comes with the Linux version:
> 
> =-=-=-=-=
> 
> #!/bin/sh
> IMAGE="cobalt.image"
> DIR=`dirname $0`
> EXE="$DIR/bin/i686-pc-linux-gnu"
> 
> # use command line arguments if present; else use default image
> if [ $1 ]; then
>     ARGS="$*"
> else
>     ARGS="$DIR/$IMAGE"
> fi
> 
> # make source link if necessary
> if [ ! -r $DIR/CroquetV1.sources ] ; then
>         ln -s $DIR/bin/CroquetV1.sources $DIR/CroquetV1.sources
> fi
> 
> # make libGL.so link if necessary
> if [ ! -f /usr/lib/libGL.so -a -f /usr/lib/libGL.so.1 ] ; then
>         if [ ! -f  "$EXE/libGL.so" ] ; then
>                 echo Creating libGL.so symlink in $EXE
>                 ln -sf /usr/lib/libGL.so.1 "$EXE/libGL.so"
>         fi
> fi
> 
> # Slight modification to cobalt.sh - line 26:
> # make libopenal.so link if necessary - OpenAL is a good thing
> if [ ! -f "$EXE/libopenal.so" -a -f /usr/lib/libopenal.so.1 ] ; then
>     echo Creating libopenal.so symlink in $EXE
>     ln -s /usr/lib/libopenal.so.1 "$EXE/libopenal.so"
> elif [ ! -f "$EXE/libopenal.so" -a -f /usr/lib/libopenal.so.0 ] ; then
>     echo Creating libopenal.so symlink in $EXE
>     ln -s /usr/lib/libopenal.so.0 "$EXE/libopenal.so"
> fi
> 
> #exec "$EXE/squeak" -plugins "$EXE" \  <--- my changes  --gd
> #        -vm-display-X11 -swapbtn \
> #        $ARGS
> exec squeak -plugins "$EXE" $ARGS
> 
> =-=-=-=-=
> 
> This will run the FreeBSD version of squeak, the vm that comes with the
> 3.9 port:
> 
> $ squeak -version
> 3.9-7 #1 Thu Apr  9 01:24:21 HST 2009 cc
> Squeak3.9alpha of 4 July 2005 [latest update: #7021]
> FreeBSD slate01 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25
> UTC 2009     root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
> i386
> default plugin location: /usr/local/share/squeak/3.9-7/*.so
> 
> As cobalt loads I get this on the error output:
> 
> $ ./cobalt.sh
> ioLoadModule(./bin/i686-pc-linux-gnu/SqueakFFIPrims):
>   Shared object "libc.so.6" not found, required by "SqueakFFIPrims"
> /usr/local/bin/firefox
> /usr/local/bin/gnome-open
> $
> 
> When I drag the cobalt ball I get:
> 
> setsockopt: No buffer space available
> setsockopt: No buffer space available
> fcntl: Device not configured
> 
> Here squeak hangs and must be killed (kill -9)
> 
> If I do not drag the ball I can work in the cobalt window, same as
> squeak. I tried loading the FFI package but only 3.9 and 3.10 are
> available, and will not load. FFI will load in my 3.10 image, but that
> won't help me.
> 
> Is there a FreeBSD library I need to substitute for libc.so.6? I have
> one at /usr/compat/linux/lib/libc.so.6 but I am not trying to run cobalt
> in Linux mode.
> 
> Any thoughts?


More information about the Vm-dev mailing list