List Info

Thread: can ext:load-foreign search the library paths?




can ext:load-foreign search the library paths?
country flaguser name
United States
2007-04-11 20:24:50
Hi,

Is there a way to load a library on Linux without specifying
the exact
library path (eg finding it using ld.so.conf, etc)?

Thanks,

Tamas


Re: can ext:load-foreign search the library paths?
country flaguser name
Germany
2007-04-12 01:24:42
On Wed, 11 Apr 2007 21:24:50 -0400, Tamas K Papp
<tpappPrinceton.EDU> wrote:

> Is there a way to load a library on Linux without
specifying the
> exact library path (eg finding it using ld.so.conf,
etc)?

SYS::LOAD-OBJECT-FILE should do it unless there have been
recent
changes.

UFFI does that and there's a long thread on clsql-devel from
2005
beginning with this message

  h
ttp://article.gmane.org/gmane.lisp.clsql.devel/265

that eventually ends with a patch from me which does what
you want.

HTH,
Edi.


Re: can ext:load-foreign search the library paths?
country flaguser name
United States
2007-04-12 09:18:55
Hi Edi,

Thanks for your help.  It finds the library, but complains
about
unresolved symbols:

CMU Common Lisp CVS 19d 19d-release (19D), running on
pu100877.student.princeton.edu
With core: /usr/lib/cmucl/lisp.core
Dumped on: Wed, 2007-03-21 20:23:55-04:00 on
pu100877.student.princeton.edu
For support see http://www.con
s.org/cmucl/support.html Send bug reports to the debian
BTS.
or to pvaneynddebian.org
type (help) for help, (quit) to exit, and (demo) to see the
demos

Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS based on Gerd's PCL 2004/04/14 03:32:47
* (sys::load-object-file "libslatec.so")

NIL
"LOAD-OBJECT-FILE: Unresolved symbols in file
"libslatec.so": NIL"


But if I just use ext:load-foreign, it works fine:

* (ext:load-foreign
"/usr/local/lib/libslatec.so")
;;; Opening as shared library /usr/local/lib/libslatec.so
...
;;; Trying as object file /usr/local/lib/libslatec.so...
;;; Running /usr/bin/ld...
;;; Done.
NIL

Is there anything I am doing wrong?  I am sorry to admit
that I'm
pretty clueless about shared libraries in general, not just
Lisp.

Thanks,

Tamas

On Thu, Apr 12, 2007 at 08:24:42AM +0200, Edi Weitz wrote:
> On Wed, 11 Apr 2007 21:24:50 -0400, Tamas K Papp
<tpappPrinceton.EDU> wrote:
> 
> > Is there a way to load a library on Linux without
specifying the
> > exact library path (eg finding it using
ld.so.conf, etc)?
> 
> SYS::LOAD-OBJECT-FILE should do it unless there have
been recent
> changes.
> 
> UFFI does that and there's a long thread on clsql-devel
from 2005
> beginning with this message
> 
>   h
ttp://article.gmane.org/gmane.lisp.clsql.devel/265
> 
> that eventually ends with a patch from me which does
what you want.
> 
> HTH,
> Edi.


Re: can ext:load-foreign search the library paths?
country flaguser name
United Kingdom
2007-04-12 12:04:10
Tamas K Papp wrote:

> Is there a way to load a library on Linux without
specifying the exact
> library path (eg finding it using ld.so.conf, etc)?

One hack that worked some time ago would be to load a dummy
library and use the further :libraries argument, as shown
in
(describe 'load-foreign).


-- 
Thomas


Re: can ext:load-foreign search the library paths?
country flaguser name
Germany
2007-04-12 11:44:07
On Thu, 12 Apr 2007 10:18:55 -0400, Tamas K Papp
<tpappPrinceton.EDU> wrote:

> Is there anything I am doing wrong?

Sorry, I have no idea.


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )