[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fwd: guile-1.7.x and load-extension]
From: |
Rob Browning |
Subject: |
Re: [Fwd: guile-1.7.x and load-extension] |
Date: |
Wed, 20 Mar 2002 00:39:02 -0600 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu) |
David Pirotte <address@hidden> writes:
>> since I use guile, notably guile-1.5.4 and more recently cvs
>> versions of guile-1.7, up to 5th dec 01 (or a very close day around
>> the 5th, can't remember exactly), it accepted to load the '.so'
>> libraries.
>>
>> now it seems to only look for '.la' libraries, see the strace
>> output below. the '.so' libraries are present:
Did you ever get this resolved?
If not, a few things to watch:
* In newer guiles, load-extension is deprecated and should be
replaced with something like
(define-module (my module))
(dynamic-call "init_my_lib" (dynamic-link "libmylib"))
(export bar)
(export baz)
* Newer versions of libtool really don't seem to like you adding
extensions to the library name. So say (dynamic-link "libfoo")
rather than (dynamic-link "libfoo.so").
* I believe your shared libs must be fully linked against everything
they depend on, but there won't necessarily be warnings at compile
time if you forget something, you'll just get a relocation or
segfault error at runtime when you try to dynamic-link. In guile
1.4 and eariler, the error message was somewhat cryptic, but newer
guile's will actually tell you what guile was trying to link (at
least the top-level lib) when the load failed. We can't have more
detailed info until/unless libtool (or ldl?) is enhanced to return
more than just static error strings.
* Make sure your LD_LIBRARY_PATH and LTDL_LIBRARY_PATH (if you have
it set) are reasonable.
* if you have a version of guile installed in /usr/ (along with it's
development .so libs), but are trying to compile an app or lib
against another version of guile installed elsewhere, make sure
you don't build let a linker flag of -L/usr/lib sneak in before
-lguile, -lqthreads, etc. on the gcc command line. If you do,
your app/lib may get linked against the wrong version of the guile
libs., or even linked against more than one version. Note that
you have to be particularly watchful when your build flags are
being generated by foo-config style scripts.
Hope this helps.
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD
- Re: [Fwd: guile-1.7.x and load-extension],
Rob Browning <=