guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Managing Guile and extensions versions


From: Greg Troxel
Subject: Re: Managing Guile and extensions versions
Date: 11 Oct 2005 10:56:07 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

  INSTALL file explains how this information is supposed to be delivered
  to libltdl (with LD_LIBRARY_PATH). No information about how this
  information is supposed to be found by configure.ac/Makefile.am in
  extension. Neither in documentation of guile nor in code of existing
  extensions.

  IMNSHO this is insane:

    LD_LIBRARY_PATH=/opt/guile/lib \
      PATH=/opt/guile/bin:"${PATH}" \
        guile --version

I concur that this is a problem, and I think it's not impossible to
solve.  It is somewhat difficult, though, because of several
conflicting guidelines:

  debian doesn't allow setting RPATH, or at least used to not.  I've
  never really understood this.

  Many people think setting LD_LIBRARY_PATH is bletcherous.

  guile used to support binary-only modules, but I think after 1.6
  this compat support was dropped.  ttn-guile 1.4 still does.

My view is that when a program is compiled with --prefix=/foo that
when parts of it need to open files they should use absolute paths
with /foo so that exactly the right bits are obtained, regardless of
what is in the environment and path.  This means that you can't build
to /foo and then install in /bar, but IMHO that's one of the reasons
why we have source code.  (But, I'm afraid that this may run afoul of
the underlying reasons why debian doesn't like rpath.)

So, when I make extension modules that have binary libraries, I make a
foo.scm.in and put in it code like this:

;; Find our shared library (autoconf substitution).
(define *sinew-udaanlsu-libdir* "@prefix@/lib")

;; Link shlib, and initialize it.
(dynamic-call
 "guile_udaanlsu_init"
 (dynamic-link (string-append *sinew-udaanlsu-libdir* "/" "libguile_udaanlsu")))

Also, I use -R when linking, so the libraries can find other
libraries.  This is standard practice in NetBSD pkgsrc, but we of
course need to arrive at a solution that can work for all reasonable
practices.  I think it's reasonable for people that decline to use
rpath to have to use LD_LIBRARY_PATH.


-- 
        Greg Troxel <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]