unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: [Fwd: guile-1.7.x and load-extension]
Date: Wed, 20 Mar 2002 00:39:02 -0600	[thread overview]
Message-ID: <87lmcnu4jd.fsf@raven.i.defaultvalue.org> (raw)
In-Reply-To: <3C61BF0C.56F4B1E6@altosw.be> (David Pirotte's message of "Wed, 06 Feb 2002 19:41:00 -0400")

David Pirotte <david@altosw.be> 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

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


       reply	other threads:[~2002-03-20  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C61BF0C.56F4B1E6@altosw.be>
2002-03-20  6:39 ` Rob Browning [this message]
2002-03-20 23:17   ` [Fwd: guile-1.7.x and load-extension] Marius Vollmer
2002-03-20 23:42     ` Rob Browning
2002-04-24 21:06       ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lmcnu4jd.fsf@raven.i.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).