[plt-scheme] libGL.so

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed May 6 15:56:20 EDT 2009

My impression is that a binary-based distribution like Ubuntu is
supposed to have just the libraries with version numbers, and the
version-less symlink is for building from source. The idea is that when
you build a program, the linker follows a symlink and remembers the
version in the resulting binary. But that idea seems to assume C-style
compilation and linking.

To make the FFI work in that world, I think we have to include a
version number in the library reference. That is, "collects/sgl/gl.ss"
should search for a library with version "1". The `ffi-lib' function
accepts a list of versions, so we can fall back to using the symlink by
including "" as a version:

  (ffi-lib "libGL" '("1" ""))

I'm not sure why this hasn't been changed before, but I've committed
the change in SVN.

At Wed, 06 May 2009 11:58:36 -0700, Ben Goetter wrote:
> No, it's a common complaint.  This is one of the ways that Unix systems 
> handle shared library versioning, and it's frequently misconfigured.  
> Your system should have a symlink of libGL.so to libGL.so.1.
> 
> Stephen De Gabrielle wrote:
> > Hi, I don't know if this is just a Ubuntu 9.04 thing, but i was having
> > a fiddle with the sgl example code and ffi complained that it couldn't
> > find  libGL.so - a quick look found libGL.so.1 but no libGL.so ?
> >
> > Is this just me?
> >
> > Thanks,
> > stephen
> >
> >   
> 
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.