[cells-gtk-devel] Building cells-gtk on Ubuntu7.10

Peter Hildebrandt peter.hildebrandt at gmail.com
Tue Apr 22 08:42:18 UTC 2008


Hi Greg,

alright, let's sort it out step by step.  You said you're using CMUCL
on ubuntu 7.10.  I have the same ubuntu here, and SBCL (which I use)
is said to be quite similar to your CMUCL, so your and my set up
should be roughly comparable.

Your error message states that

>  Unable to load foreign library: libgobject-2.0.so
>  [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

So, yes, as you say, the problem is with CFFI trying to open libgobject-2.0.so

>  Clearly CMUCL is in trouble with Compiling DEFUN LOAD-GTK-LIBS because it
>  cannot find libgobject.2.0.so

Now we check whether a file by this name (it is -2.0.so, btw, but I
guess that's just a typo) exists:

>  ls -l /usr/lib/|grep libgob.*\.so
>  does indeed tell me that I have libgobject.2.0.so in /usr/lib

So, you have the file CFFI is looking for with the right name in the
right place.  Therefore the whole symlink business is not necessary in
your case.  I'll explain it anyway, just so you know what it was all
about:

The whole symlink business is a way of making files available under
different names.  It is a linux thing, not a lisp thing.  So when you
do ln -s /home/mike/somefile /home/mary/mikes-file, there will be a
file called "mikes-file" in mary's home dir, and when opened, linux
will display the contents of /home/mike/somefile instead.  So it
"links" a new name to na existing file.

In our case, some linux distributions tend to call the library
libgobject-2.0.so.0 (note the trainling ".0"), so one has to introduce
a link, that is, tell linux that this file should also be available as
libgobject-2.0.so.

So this is where the commands I wrote come into play.  That is, if the
library is called libgobject-2.0.so.0 on your system, you'd need to
tell linux to make this file accessible by the name libgobject-2.0.so,
that is, link the name libgobject-2.0.so to the file
libgobject-2.0.so.0:

cd /usr/lib
ln -s libgobject-2.0.so.0 libgobject-2.0.so

However, as we saw, this is not necessary on your system, since you
have a file called /usr/lib/libgobject.2.0.so already.

So the question in your case is why CFFI fails to find that library.

Can you give me the output of ls -l /usr/lib/libgobject-2.0.so ?

Also, this is the first library cells-gtk tries to load, so maybe this
is just an indicator that it is something about cffi in general that
is broken here.

Maybe try downloading CFFI 0.9.2 from
http://common-lisp.net/project/cffi/  If you installed cells-gtk from
the tarball, there should be a cffi directory under cells-gtk.  Just
move the contents to some backup place (eg. "cffi-old") and put the
new cffi source in there.

Then (and in general while trying out things) it would be a good idea
to remove all .fasl files.  Use Places -> Search for files to see
where *.fasl files are located on your system (either among the source
files or in /var/common-lisp-controller or something), and remove
them.  Then restart CMUCL and do the load again.  This way you make
sure there are no leftovers from previous trials hanging around.

I haven't seen it necessary, but maybe you could hint CFFI as to where
to look for libraries.  So before loading CMUCL try (at the linux
command prompt):

export CPATH=$CPATH:/usr/lib

If all this does not get you past this error, it might be worthwhile
to go to the cffi mailing list, since the problem seems to be on this
level, not with cells-gtk itself, so they might be able to give better
advice.

Good luck,
Peter



More information about the cells-gtk-devel mailing list