Zyle Moore <[email protected]> writes:

> I'm trying to build and install Guile from source on an Ubuntu machine. I
> followed the instructions from
> https://www.gnu.org/software/guile/manual/html_node/Obtaining-and-Installing-Guile.html
> with the only difference being running `sudo make install` instead of `make
> install`. Each stage finishes, and at the end, I see the libraries in
> /usr/local/lib, and the executable in /usr/local/bin. But when I run `make
> installcheck`, it looks like it can't find the header. When running `guile`
> it also errors out with the same message. The full output from `make
> installcheck` is below, followed by the `guile` output, followed by the
> /usr/local file listing.

The standard approach in ELF is to annotate a binary with RPATH that
lists the directories where shared libraries (that are "NEEDED") can be
located.   My understanding is that some GNU/Linux systems object to
that and do something different.  I mention this because it sounds like
it may be related.

Another point is that software is generally built with a prefix and
installed to that same prefix.  Sometimes people think they should be
able to build to one prefix and put it someplace else.  That in general
does not work.

I'm assuming that you ran ./configure without prefix, and did not set
any kind of prefix or DESTDIR when installing.

I would suggest:

   run "ldd /usr/local/bin/guile"

   run "objdump -x /usr/local/bin/guile" (to a file and then look at it;
   it's huge).   Look specifically for NEEDED and RPATH

   Determine somehow, if Ubuntu objects to RPATH and does something
   else, and if so, understand it.  Perhaps /etc/ld.so.conf has to list
   directories, which are treated as being in RPATH for every binary
   (and if so, I don't know how that works with multiple installs of
   different versions).

   Check if some other guile is installed.  Consider removing it,
   removing all guile bits in /usr/local, removing your entire build
   directory, and building again.  It is a fairly frequent problem for
   builds to refer to different versions in various places, as the
   search mechanisms tend to be lists of directories.


On my NetBSD 10 amd64 system, which uses pkgsrc and can install multiple
versions of guile at once (I have 2.0, 2.2. and 3.0), it works.  NetBSD
and pkgsrc follow the traditional ELF plan of RPATH.

  $ /usr/pkg/guile/3.0/bin/guile --version
  guile (GNU Guile) 3.0.11
  [license info snipped]

  $ ldd /usr/pkg/guile/3.0/bin/guile
  /usr/pkg/guile/3.0/bin/guile:
          -lguile-3.0.1 => /usr/pkg/guile/3.0/lib/libguile-3.0.so.1
          -lgc.1 => /usr/pkg/lib/libgc.so.1
          -lpthread.1 => /usr/lib/libpthread.so.1
          -lc.12 => /usr/lib/libc.so.12
          -lrt.1 => /usr/lib/librt.so.1
          -lffi.8 => /usr/pkg/lib/libffi.so.8
          -lunistring.5 => /usr/pkg/lib/libunistring.so.5
          -lgmp.10 => /usr/pkg/lib/libgmp.so.10
          -lcrypt.1 => /usr/lib/libcrypt.so.1
          -lm.0 => /usr/lib/libm.so.0

  $ objdump -x /usr/pkg/guile/3.0/bin/guile |egrep NEEDED\|RPATH
    NEEDED               libguile-3.0.so.1
    NEEDED               libgc.so.1
    NEEDED               libpthread.so.1
    NEEDED               librt.so.1
    NEEDED               libffi.so.8
    NEEDED               libunistring.so.5
    NEEDED               libgmp.so.10
    NEEDED               libcrypt.so.1
    NEEDED               libm.so.0
    NEEDED               libc.so.12
    RPATH                /usr/pkg/guile/3.0/lib:/usr/pkg/lib



Reply via email to