bug#81031: Installing Guile 3.0.11 on Ubuntu 22.04
Zyle Moore <[email protected]> Wed, 13 May 2026 12:10:44 -0700
| Newsgroups | gmane.lisp.guile.bugs |
|---|---|
| Message-ID | <CAN4i4nOfLEQApz24cMF9pjWxBJ2xTYbR=nPBcTE536n0uZWVzw@mail.gmail.com> |
--000000000000c1db360651b7beb6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I was able to find this blurb in the Ubuntu docs which might explain this behavior https://manpages.ubuntu.com/manpages/focal/man8/ldconfig.8.html > Note that *ldconfig* will only look at files that are named *lib*.so** (for regular shared objects) or *ld-*.so** (for the dynamic loader itself). Other files will be ignored. On Wed, May 13, 2026 at 12:05=E2=80=AFPM Zyle Moore <[email protected]> = wrote: > No, guile didn't install unistring, I had to build that as well. > > On Wed, May 13, 2026 at 11:54=E2=80=AFAM Greg Troxel <[email protected]> wro= te: > >> Zyle Moore <[email protected]> writes: >> >> That's great you got it working. >> >> > 1. Add "/usr/local/lib" to a new file in >> /etc/ld.so.conf.d/usr-local.conf. >> >> This is in my view an Ubuntu bug for not allowing the normal RPATH >> mechanism, and given that they don't, that it wasn't documented well >> enough that you noticed :-) But apparently adding /usr/local/lib to the >> ld.so.conf is the plan. I wonder what the docs said about how files in >> /etc/ld.so.conf.d are ordered, both among themselves, and relative to >> the built-in search path, but that's not about guile. >> >> > 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 endin= g >> 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. >> >> guile script that is helpful for running guile under gdb. Read it! >> >> I don't think there are any rules in the larger POSIX ecosystem about >> not having files that aren't ELF libs in $prefix/lib. I see this as a >> self-inflicted wound by Ubuntu's ld.so.conf decision; normally a file >> in $prefix/lib is only even opened if there is a NEEDED/RPATH >> combination that references it. >> >> It may be that having .so in it somwehere is the issue. There are >> non-ELF files in lib mnormally. FWIW on my system: >> >> $ ls -l /usr/pkg/guile/3.0/lib/ >> total 4120 >> drwxr-xr-x 3 root wheel 512 Dec 6 2022 guile >> -rw-r--r-- 1 root wheel 2657138 Apr 26 05:46 libguile-3.0.a >> -rwxr-xr-x 1 root wheel 1063 Apr 26 05:46 libguile-3.0.la >> lrwxr-xr-x 1 root wheel 21 Apr 26 05:46 libguile-3.0.so -> >> libguile-3.0.so.1.7.1 >> lrwxr-xr-x 1 root wheel 21 Apr 26 05:46 libguile-3.0.so.1 -> >> libguile-3.0.so.1.7.1 >> -rwxr-xr-x 1 root wheel 1486880 Apr 26 05:46 libguile-3.0.so.1.7.1 >> -rw-r--r-- 1 root wheel 17469 Apr 26 05:46 >> libguile-3.0.so.1.7.1-gdb.scm >> drwxr-xr-x 2 root wheel 512 Apr 26 05:47 pkgconfig >> >> >> > 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 (0x00007aecfbf950= 00) >> > 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 | egre= p >> > NEEDED\|RPATH >> > NEEDED libguile-3.0.so.1 >> > NEEDED libc.so.6 >> >> So missing RPATH as you already determined, but otherwise looks fine to >> me. >> >> Did guile insttall unistring, or did you have to build that too? >> > --000000000000c1db360651b7beb6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I was able to find this blurb in the Ubuntu docs which mig= ht explain this behavior<br><br><a href=3D"https://manpages.ubuntu.com/manp= ages/focal/man8/ldconfig.8.html">https://manpages.ubuntu.com/manpages/focal= /man8/ldconfig.8.html</a><br>> Note that <b>ldconfig</b> will only look = at files that are named <i>lib*.so*</i> (for regular shared objects) or <i>ld-*.so*</i> (for th= e dynamic loader itself). Other files will be ignored.</div><br><div clas= s=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_att= r">On Wed, May 13, 2026 at 12:05=E2=80=AFPM Zyle Moore <<a href=3D"mailt= o:[email protected]">[email protected]</a>> wrote:<br></div><block= quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1= px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">No, guile didn= 't install unistring, I had to build that as well.</div><br><div class= =3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, May 13, 2026= at 11:54=E2=80=AFAM Greg Troxel <<a href=3D"mailto:[email protected]" targ= et=3D"_blank">[email protected]</a>> wrote:<br></div><blockquote class=3D"g= mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204= ,204,204);padding-left:1ex">Zyle Moore <<a href=3D"mailto:moore.zyle@gma= il.com" target=3D"_blank">[email protected]</a>> writes:<br> <br> That's great you got it working.<br> <br> > 1. Add "/usr/local/lib" to a new file in /etc/ld.so.conf.d/u= sr-local.conf.<br> <br> This is in my view an Ubuntu bug for not allowing the normal RPATH<br> mechanism, and given that they don't, that it wasn't documented wel= l<br> enough that you noticed :-) But apparently adding /usr/local/lib to the<br> ld.so.conf is the plan.=C2=A0 I wonder what the docs said about how files i= n<br> /etc/ld.so.conf.d are ordered, both among themselves, and relative to<br> the built-in search path, but that's not about guile.<br> <br> > After doing this, running `ldconfig` resulted in this error<br> > /sbin/ldconfig.real: /usr/local/lib/libguile-3.0.so.1.7.1-gdb.scm is n= ot an<br> > ELF file - it has the wrong magic bytes at the start.<br> ><br> > 2. Remove libguile-3.0.so.1.7.1-gdb.scm from /usr/local/lib<br> ><br> > I'm not sure if this is Ubuntu special sauce, or if this file is e= nding up<br> > there incorrectly, but it really wants everything in all ld folders to= be<br> > only ELF files. After doing these two steps after `sudo make install`,= <br> > guile seems to be working now.<br> <br> guile script that is helpful for running guile under gdb.=C2=A0 Read it!<br= > <br> I don't think there are any rules in the larger POSIX ecosystem about<b= r> not having files that aren't ELF libs in $prefix/lib.=C2=A0 =C2=A0 I se= e this as a<br> self-inflicted wound by Ubuntu's ld.so.conf decision;=C2=A0 normally a = file<br> in $prefix/lib is only even opened if there is a NEEDED/RPATH<br> combination that references it.<br> <br> It may be that having .so in it somwehere is the issue.=C2=A0 There are<br> non-ELF files in lib mnormally.=C2=A0 FWIW on my system:<br> <br> =C2=A0 $ ls -l /usr/pkg/guile/3.0/lib/<br> =C2=A0 total 4120<br> =C2=A0 drwxr-xr-x=C2=A0 3 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A0 512 Dec=C2= =A0 6=C2=A0 2022 guile<br> =C2=A0 -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2657138 Apr 26 05:46 libgu= ile-3.0.a<br> =C2=A0 -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A01063 Apr 26 0= 5:46 <a href=3D"http://libguile-3.0.la" rel=3D"noreferrer" target=3D"_blank= ">libguile-3.0.la</a><br> =C2=A0 lrwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A0 =C2=A021 Apr= 26 05:46 <a href=3D"http://libguile-3.0.so" rel=3D"noreferrer" target=3D"_= blank">libguile-3.0.so</a> -> libguile-3.0.so.1.7.1<br> =C2=A0 lrwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A0 =C2=A021 Apr= 26 05:46 libguile-3.0.so.1 -> libguile-3.0.so.1.7.1<br> =C2=A0 -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 1486880 Apr 26 05:46 libgu= ile-3.0.so.1.7.1<br> =C2=A0 -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 17469 Apr 26 05:46 = libguile-3.0.so.1.7.1-gdb.scm<br> =C2=A0 drwxr-xr-x=C2=A0 2 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A0 512 Apr 26 0= 5:47 pkgconfig<br> <br> <br> > Below is the output of ldd and objdump for context<br> > ldd:<br> > zymus@abyss:~/src/guile-3.0.11$ ldd /usr/local/bin/guile<br> > linux-vdso.so.1 (0x00007ffc61064000)<br> > libguile-3.0.so.1 =3D> /usr/local/lib/libguile-3.0.so.1 (0x00007aec= fc4e7000)<br> > libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007aecfc200000)= <br> > libgc.so.1 =3D> /lib/x86_64-linux-gnu/libgc.so.1 (0x00007aecfc47200= 0)<br> > libffi.so.8 =3D> /lib/x86_64-linux-gnu/libffi.so.8 (0x00007aecfc465= 000)<br> > libunistring.so.5 =3D> /usr/local/lib/libunistring.so.5 (0x00007aec= fc017000)<br> > libgmp.so.10 =3D> /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007aecfbf= 95000)<br> > libcrypt.so.1 =3D> /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007aecf= c429000)<br> > libm.so.6 =3D> /lib/x86_64-linux-gnu/libm.so.6 (0x00007aecfbeae000)= <br> > /lib64/ld-linux-x86-64.so.2 (0x00007aecfc64a000)<br> ><br> > objdump:<br> > zymus@abyss:~/src/guile-3.0.11$ objdump -x /usr/local/bin/guile | egre= p<br> > NEEDED\|RPATH<br> >=C2=A0 =C2=A0NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0libguile-3.0.so.1<br> >=C2=A0 =C2=A0NEEDED=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0libc.so.6<br> <br> So missing RPATH as you already determined, but otherwise looks fine to<br> me.<br> <br> Did guile insttall unistring, or did you have to build that too?<br> </blockquote></div> </blockquote></div> --000000000000c1db360651b7beb6--