* Re: [Fwd: guile-1.7.x and load-extension] [not found] <3C61BF0C.56F4B1E6@altosw.be> @ 2002-03-20 6:39 ` Rob Browning 2002-03-20 23:17 ` Marius Vollmer 0 siblings, 1 reply; 4+ messages in thread From: Rob Browning @ 2002-03-20 6:39 UTC (permalink / raw) Cc: guile-user@gnu.org 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: guile-1.7.x and load-extension] 2002-03-20 6:39 ` [Fwd: guile-1.7.x and load-extension] Rob Browning @ 2002-03-20 23:17 ` Marius Vollmer 2002-03-20 23:42 ` Rob Browning 0 siblings, 1 reply; 4+ messages in thread From: Marius Vollmer @ 2002-03-20 23:17 UTC (permalink / raw) Cc: David Pirotte, guile-user@gnu.org Rob Browning <rlb@defaultvalue.org> writes: > 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 Nooo! It's the other way around: load-extension is the new thing, and you should use it in preference to a dynamic-link/dynamic-call combo. However, dynamic-link and dynamic-call are not deprecated since they are useful on its own. Apparently some docs about this are confusing. Can you say where you learned that load-extension is deprecated? _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: guile-1.7.x and load-extension] 2002-03-20 23:17 ` Marius Vollmer @ 2002-03-20 23:42 ` Rob Browning 2002-04-24 21:06 ` Marius Vollmer 0 siblings, 1 reply; 4+ messages in thread From: Rob Browning @ 2002-03-20 23:42 UTC (permalink / raw) Cc: David Pirotte, guile-user@gnu.org Marius Vollmer <mvo@zagadka.ping.de> writes: > Nooo! It's the other way around: load-extension is the new thing, and > you should use it in preference to a dynamic-link/dynamic-call combo. > However, dynamic-link and dynamic-call are not deprecated since they > are useful on its own. > > Apparently some docs about this are confusing. Can you say where you > learned that load-extension is deprecated? My bad memory perhaps? :> What's the thing that preceeded load-extension then? You and I had a discussion a while back about it, and about how the default assumptions it was making were causing trouble, and that's when you changed things -- I think perhaps I'm remembering scm_register_module... -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Fwd: guile-1.7.x and load-extension] 2002-03-20 23:42 ` Rob Browning @ 2002-04-24 21:06 ` Marius Vollmer 0 siblings, 0 replies; 4+ messages in thread From: Marius Vollmer @ 2002-04-24 21:06 UTC (permalink / raw) Cc: David Pirotte, guile-user@gnu.org Rob Browning <rlb@defaultvalue.org> writes: > Marius Vollmer <mvo@zagadka.ping.de> writes: > > > Nooo! It's the other way around: load-extension is the new thing, and > > you should use it in preference to a dynamic-link/dynamic-call combo. > > However, dynamic-link and dynamic-call are not deprecated since they > > are useful on its own. > > > > Apparently some docs about this are confusing. Can you say where you > > learned that load-extension is deprecated? > > My bad memory perhaps? :> > > What's the thing that preceeded load-extension then? You and I had a > discussion a while back about it, and about how the default > assumptions it was making were causing trouble, and that's when you > changed things -- I think perhaps I'm remembering > scm_register_module... Yes, that could be. 'load-extension' came at about the time the automatic loading of shared libraries as modules was deprecated (and removed in 1.7). It was meant to be used instead of the more explicit (dynamic-call ... (dynamic-link ...)) combo. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-24 21:06 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <3C61BF0C.56F4B1E6@altosw.be> 2002-03-20 6:39 ` [Fwd: guile-1.7.x and load-extension] Rob Browning 2002-03-20 23:17 ` Marius Vollmer 2002-03-20 23:42 ` Rob Browning 2002-04-24 21:06 ` Marius Vollmer
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).