bug#81031: Installing Guile 3.0.11 on Ubuntu 22.04

Zyle Moore <[email protected]> Wed, 13 May 2026 11:16:17 -0700
Newsgroups gmane.lisp.guile.bugs
Message-ID <CAN4i4nNuZeit+iw3W=-Xi7mAzbP4aXSAtBRR9=0O6iB_GHpgqA@mail.gmail.com>
--00000000000006f0e50651b6fc60
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Apologies for the double send Greg, I did reply instead of reply all.

Thanks so much for the help Greg. Yeah, I didn't include the prefix when
running configure, because the docs said it would default to the location I
wanted it in anyways. I found that Ubuntu didn't have /usr/local added for
the ldconfig. I recall it being that way several years ago, but it seems
like maybe something changed. There was one issue though, a .scm file was
installed/copied into /usr/local/lib, which ldconfig didn't like. The file
was libguile-3.0.so.1.7.1-gdb.scm. This is the only installation for guile
on this machine, as it's close to a new install, and when I delete it and
run `sudo make install`, it puts it back. So there were two parts to the fi=
x

1. Add "/usr/local/lib" to a new file in /etc/ld.so.conf.d/usr-local.conf.
After doing this, running `ldconfig` resulted in this error
/sbin/ldconfig.real: /usr/local/lib/libguile-3.0.so.1.7.1-gdb.scm is not an
ELF file - it has the wrong magic bytes at the start.

2. Remove libguile-3.0.so.1.7.1-gdb.scm from /usr/local/lib

I'm not sure if this is Ubuntu special sauce, or if this file is ending up
there incorrectly, but it really wants everything in all ld folders to be
only ELF files. After doing these two steps after `sudo make install`,
guile seems to be working now.

Below is the output of ldd and objdump for context
ldd:
zymus@abyss:~/src/guile-3.0.11$ ldd /usr/local/bin/guile
linux-vdso.so.1 (0x00007ffc61064000)
libguile-3.0.so.1 =3D> /usr/local/lib/libguile-3.0.so.1 (0x00007aecfc4e7000=
)
libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007aecfc200000)
libgc.so.1 =3D> /lib/x86_64-linux-gnu/libgc.so.1 (0x00007aecfc472000)
libffi.so.8 =3D> /lib/x86_64-linux-gnu/libffi.so.8 (0x00007aecfc465000)
libunistring.so.5 =3D> /usr/local/lib/libunistring.so.5 (0x00007aecfc017000=
)
libgmp.so.10 =3D> /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007aecfbf95000)
libcrypt.so.1 =3D> /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007aecfc429000)
libm.so.6 =3D> /lib/x86_64-linux-gnu/libm.so.6 (0x00007aecfbeae000)
/lib64/ld-linux-x86-64.so.2 (0x00007aecfc64a000)

objdump:
zymus@abyss:~/src/guile-3.0.11$ objdump -x /usr/local/bin/guile | egrep
NEEDED\|RPATH
  NEEDED               libguile-3.0.so.1
  NEEDED               libc.so.6


On Wed, May 13, 2026 at 4:45=E2=80=AFAM Greg Troxel <[email protected]> wrote:

> 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-Install=
ing-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 =3D> /usr/pkg/guile/3.0/lib/libguile-3.0.so.1
>           -lgc.1 =3D> /usr/pkg/lib/libgc.so.1
>           -lpthread.1 =3D> /usr/lib/libpthread.so.1
>           -lc.12 =3D> /usr/lib/libc.so.12
>           -lrt.1 =3D> /usr/lib/librt.so.1
>           -lffi.8 =3D> /usr/pkg/lib/libffi.so.8
>           -lunistring.5 =3D> /usr/pkg/lib/libunistring.so.5
>           -lgmp.10 =3D> /usr/pkg/lib/libgmp.so.10
>           -lcrypt.1 =3D> /usr/lib/libcrypt.so.1
>           -lm.0 =3D> /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
>

--00000000000006f0e50651b6fc60
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Apologies for the double send Greg, I did reply instead of=
 reply all.<br><br><div>Thanks so much for the help Greg. Yeah, I didn&#39;=
t include the prefix
 when running configure, because the docs said it would default to the=20
location I wanted it in anyways. I found that Ubuntu didn&#39;t have=20
/usr/local added for the ldconfig. I recall it being that way several=20
years ago, but it seems like maybe something changed. There was one=20
issue though, a .scm file was installed/copied into /usr/local/lib,=20
which ldconfig didn&#39;t like. The file was=C2=A0libguile-3.0.so.1.7.1-gdb=
.scm.
 This is the only installation for guile on this machine, as it&#39;s close=
=20
to a new install, and when I delete it and run `sudo make install`, it=20
puts it back. So there were two parts to the fix<br><br></div><div>1. Add &=
quot;/usr/local/lib&quot; to a new file in /etc/ld.so.conf.d/usr-local.conf=
. After doing this, running `ldconfig` resulted in this error<br>/sbin/ldco=
nfig.real: /usr/local/lib/libguile-3.0.so.1.7.1-gdb.scm is not an ELF file =
- it has the wrong magic bytes at the start.<br><br></div><div>2. Remove=C2=
=A0libguile-3.0.so.1.7.1-gdb.scm from /usr/local/lib<br><br></div><div>I&#3=
9;m
 not sure if this is Ubuntu special sauce, or if this file is ending up=20
there incorrectly, but it really wants everything in all ld folders to=20
be only ELF files. After doing these two steps after `sudo make=20
install`, guile seems to be working now.<br><br></div><div>Below is the out=
put of ldd and objdump for context<br></div><div>ldd:<br>zymus@abyss:~/src/=
guile-3.0.11$ ldd /usr/local/bin/guile<br>	linux-vdso.so.1 (0x00007ffc61064=
000)<br>	libguile-3.0.so.1 =3D&gt; /usr/local/lib/libguile-3.0.so.1 (0x0000=
7aecfc4e7000)<br>	libc.so.6 =3D&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x0000=
7aecfc200000)<br>	libgc.so.1 =3D&gt; /lib/x86_64-linux-gnu/libgc.so.1 (0x00=
007aecfc472000)<br>	libffi.so.8 =3D&gt; /lib/x86_64-linux-gnu/libffi.so.8 (=
0x00007aecfc465000)<br>	libunistring.so.5 =3D&gt; /usr/local/lib/libunistri=
ng.so.5 (0x00007aecfc017000)<br>	libgmp.so.10 =3D&gt; /lib/x86_64-linux-gnu=
/libgmp.so.10 (0x00007aecfbf95000)<br>	libcrypt.so.1 =3D&gt; /lib/x86_64-li=
nux-gnu/libcrypt.so.1 (0x00007aecfc429000)<br>	libm.so.6 =3D&gt; /lib/x86_6=
4-linux-gnu/libm.so.6 (0x00007aecfbeae000)<br>	/lib64/ld-linux-x86-64.so.2 =
(0x00007aecfc64a000)<br><br></div><div>objdump:<br>zymus@abyss:~/src/guile-=
3.0.11$ objdump -x /usr/local/bin/guile | egrep NEEDED\|RPATH<br>=C2=A0 NEE=
DED =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libguile-3.0.so.1<br>=
=C2=A0 NEEDED =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libc.so.6</d=
iv><br></div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=
=3D"ltr" class=3D"gmail_attr">On Wed, May 13, 2026 at 4:45=E2=80=AFAM Greg =
Troxel &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex">Zyle Moore &lt;<=
a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
om</a>&gt; writes:<br>
<br>
&gt; I&#39;m trying to build and install Guile from source on an Ubuntu mac=
hine. I<br>
&gt; followed the instructions from<br>
&gt; <a href=3D"https://www.gnu.org/software/guile/manual/html_node/Obtaini=
ng-and-Installing-Guile.html" rel=3D"noreferrer" target=3D"_blank">https://=
www.gnu.org/software/guile/manual/html_node/Obtaining-and-Installing-Guile.=
html</a><br>
&gt; with the only difference being running `sudo make install` instead of =
`make<br>
&gt; install`. Each stage finishes, and at the end, I see the libraries in<=
br>
&gt; /usr/local/lib, and the executable in /usr/local/bin. But when I run `=
make<br>
&gt; installcheck`, it looks like it can&#39;t find the header. When runnin=
g `guile`<br>
&gt; it also errors out with the same message. The full output from `make<b=
r>
&gt; installcheck` is below, followed by the `guile` output, followed by th=
e<br>
&gt; /usr/local file listing.<br>
<br>
The standard approach in ELF is to annotate a binary with RPATH that<br>
lists the directories where shared libraries (that are &quot;NEEDED&quot;) =
can be<br>
located.=C2=A0 =C2=A0My understanding is that some GNU/Linux systems object=
 to<br>
that and do something different.=C2=A0 I mention this because it sounds lik=
e<br>
it may be related.<br>
<br>
Another point is that software is generally built with a prefix and<br>
installed to that same prefix.=C2=A0 Sometimes people think they should be<=
br>
able to build to one prefix and put it someplace else.=C2=A0 That in genera=
l<br>
does not work.<br>
<br>
I&#39;m assuming that you ran ./configure without prefix, and did not set<b=
r>
any kind of prefix or DESTDIR when installing.<br>
<br>
I would suggest:<br>
<br>
=C2=A0 =C2=A0run &quot;ldd /usr/local/bin/guile&quot;<br>
<br>
=C2=A0 =C2=A0run &quot;objdump -x /usr/local/bin/guile&quot; (to a file and=
 then look at it;<br>
=C2=A0 =C2=A0it&#39;s huge).=C2=A0 =C2=A0Look specifically for NEEDED and R=
PATH<br>
<br>
=C2=A0 =C2=A0Determine somehow, if Ubuntu objects to RPATH and does somethi=
ng<br>
=C2=A0 =C2=A0else, and if so, understand it.=C2=A0 Perhaps /etc/ld.so.conf =
has to list<br>
=C2=A0 =C2=A0directories, which are treated as being in RPATH for every bin=
ary<br>
=C2=A0 =C2=A0(and if so, I don&#39;t know how that works with multiple inst=
alls of<br>
=C2=A0 =C2=A0different versions).<br>
<br>
=C2=A0 =C2=A0Check if some other guile is installed.=C2=A0 Consider removin=
g it,<br>
=C2=A0 =C2=A0removing all guile bits in /usr/local, removing your entire bu=
ild<br>
=C2=A0 =C2=A0directory, and building again.=C2=A0 It is a fairly frequent p=
roblem for<br>
=C2=A0 =C2=A0builds to refer to different versions in various places, as th=
e<br>
=C2=A0 =C2=A0search mechanisms tend to be lists of directories.<br>
<br>
<br>
On my NetBSD 10 amd64 system, which uses pkgsrc and can install multiple<br=
>
versions of guile at once (I have 2.0, 2.2. and 3.0), it works.=C2=A0 NetBS=
D<br>
and pkgsrc follow the traditional ELF plan of RPATH.<br>
<br>
=C2=A0 $ /usr/pkg/guile/3.0/bin/guile --version<br>
=C2=A0 guile (GNU Guile) 3.0.11<br>
=C2=A0 [license info snipped]<br>
<br>
=C2=A0 $ ldd /usr/pkg/guile/3.0/bin/guile<br>
=C2=A0 /usr/pkg/guile/3.0/bin/guile:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lguile-3.0.1 =3D&gt; /usr/pkg/guile/3.0=
/lib/libguile-3.0.so.1<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lgc.1 =3D&gt; /usr/pkg/lib/libgc.so.1<b=
r>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lpthread.1 =3D&gt; /usr/lib/libpthread.=
so.1<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lc.12 =3D&gt; /usr/lib/libc.so.12<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lrt.1 =3D&gt; /usr/lib/librt.so.1<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lffi.8 =3D&gt; /usr/pkg/lib/libffi.so.8=
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lunistring.5 =3D&gt; /usr/pkg/lib/libun=
istring.so.5<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lgmp.10 =3D&gt; /usr/pkg/lib/libgmp.so.=
10<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lcrypt.1 =3D&gt; /usr/lib/libcrypt.so.1=
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -lm.0 =3D&gt; /usr/lib/libm.so.0<br>
<br>
=C2=A0 $ objdump -x /usr/pkg/guile/3.0/bin/guile |egrep NEEDED\|RPATH<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libguile-3.0.so.1<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libgc.so.1<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libpthread.so.1<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
librt.so.1<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libffi.so.8<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libunistring.so.5<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libgmp.so.10<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libcrypt.so.1<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libm.so.0<br>
=C2=A0 =C2=A0 NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
libc.so.12<br>
=C2=A0 =C2=A0 RPATH=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
/usr/pkg/guile/3.0/lib:/usr/pkg/lib<br>
</blockquote></div>

--00000000000006f0e50651b6fc60--