[cffi-devel] librt soname

Luís Oliveira luismbo at gmail.com
Sat Jul 4 14:35:56 UTC 2009


On Sat, Jul 4, 2009 at 3:53 AM, Daniel Herring<dherring at tentpost.com> wrote:
> - On linux, shared libraries are usually loaded by ld.so; see `man ld.so`.
> CL probably couldn't find librt.so because it was in the less standard
> /usr/lib directory whereas librt.so.1 was in /lib.

IIUC, the problem is that the system in question had a librt.so.1 but
not a librt.so. Wherever those might be -- /lib or /usr/lib -- doesn't
seem to be relevant, dlopen() should find them in either place.

So, I don't the patch Stelian pushed fixes things:
   (define-foreign-library librt
  -  (:linux (:or "librt.so" "/usr/lib/librt.so")))
  +  (:linux (:or "librt.so" "/lib/librt.so.1")))

(:or "librt.so" "librt.so.1") seems to be the right way to go.
Actually, make that (:or "librt.so.1" "librt.so") since version 1 is
what we've been testing with and that's probably the version we'd
rather load should a potentially incompatible version 2 appear at some
point.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/




More information about the cffi-devel mailing list