From: Thiago Jung Bauermann via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Rostislav Svoboda <rostislav.svoboda@gmail.com>
Cc: 64794@debbugs.gnu.org
Subject: bug#64794: Guile 3.0.9 in guix shell container with emulated FHS throws ldconfig error @ a050897
Date: Thu, 20 Jun 2024 13:17:44 -0300 [thread overview]
Message-ID: <86r0cry4ev.fsf@kolabnow.com> (raw)
In-Reply-To: <CAEtmmeyJ8S0+hfXgtDu1oMKHqJvdmmBti3ThC3ZympjGV9PbeQ@mail.gmail.com> (Rostislav Svoboda's message of "Thu, 20 Jun 2024 15:00:33 +0200")
Hello,
Rostislav Svoboda <rostislav.svoboda@gmail.com> writes:
> The warning appears also for guile@2.0 and later. guile@1.8 works fine:
>
> ```
> $ guix shell --emulate-fhs --container guile@1.8
> [env]$ exit
> $ guix shell --emulate-fhs --container guile@2.0
> ldconfig: /lib/libguile-2.0.so.22.8.1-gdb.scm is not an ELF file - it
> has the wrong magic bytes at the start.
>
> [env]$
> ```
The error is harmless. AFAIU ldconfig ignores the non-ELF file and
compiles the ld cache with the ELF shared libraries.
libguile-…-gdb.scm is a GDB extension file¹ that GDB auto-loads when
debugging programs using libguile.so². From the beginning of said .scm
file:
;;; Commentary:
;;;
;;; This file defines GDB extensions to pretty-print 'SCM' objects, and
;;; to walk Guile's virtual machine stack.
;;;
;;; This file is installed under a name that follows the convention that
;;; allows GDB to auto-load it anytime the user is debugging libguile
;;; (info "(gdb) objfile-gdbdotext file").
In distros using the Filesystem Hierarchy Standard, this file is
installed in GDB's data directory instead of /lib, so ldconfig doesn't
run into it. For example, in Debian/Ubuntu:
$ dpkg -L guile-3.0-dev | grep gdb.scm
/usr/share/gdb/auto-load/libguile-3.0.so.1.6.0-gdb.scm
Unfortunately, in the case of Guix the auto-load directory is in GDB's
own immutable installation directory so Guile can't put it there:
$ gdb -q
(gdb) show auto-load scripts-directory
List of directories from which to load auto-loaded scripts is $debugdir:$datadir/auto-load.
(gdb) show data-directory
GDB's data directory is "/gnu/store/i6x19fvlb1ladc3hcg70hnkcq6i6x232-gdb-14.2/share/gdb".
One way to improve that would be to propose a patch to upstream GDB so
that additional auto-load scripts directories could be specified via an
environment variable. Then Guile and other packages that provided GDB
extentions (such as libstdc++) could install them in their respective
/gnu/store/…-package/share/gdb/auto-load directories, and the Guix
profile could set the GDB environment variable to point to them.
--
Thiago
¹ https://sourceware.org/gdb/current/onlinedocs/gdb.html/Guile.html
² https://sourceware.org/gdb/current/onlinedocs/gdb.html/objfile_002dgdbdotext-file.html
prev parent reply other threads:[~2024-06-20 16:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-23 0:58 bug#64794: Guile 3.0.9 in guix shell container with emulated FHS throws ldconfig error @ a050897 Juliana Sims
2023-09-20 6:55 ` Simon Tournier
2024-06-20 13:00 ` Rostislav Svoboda
2024-06-20 16:17 ` Thiago Jung Bauermann via Bug reports for GNU Guix [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86r0cry4ev.fsf@kolabnow.com \
--to=bug-guix@gnu.org \
--cc=64794@debbugs.gnu.org \
--cc=bauermann@kolabnow.com \
--cc=rostislav.svoboda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).