[Vm-dev] FFI for Squeak 3.8 Open Cobalt

Gary Dunn osp at aloha.com
Thu Nov 12 03:24:05 UTC 2009

(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:


DIR=`dirname $0`

# use command line arguments if present; else use default image
if [ $1 ]; then

# make source link if necessary
if [ ! -r $DIR/CroquetV1.sources ] ; then
        ln -s $DIR/bin/CroquetV1.sources $DIR/CroquetV1.sources

# 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"

# 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"

#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
default plugin location: /usr/local/share/squeak/3.9-7/*.so

As cobalt loads I get this on the error output:

$ ./cobalt.sh
  Shared object "libc.so.6" not found, required by "SqueakFFIPrims"

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?
Gary Dunn, Honolulu
osp at aloha.com
Sent from Slate001

More information about the Vm-dev mailing list