GNU bug report logs - #64794
Guile 3.0.9 in guix shell container with emulated FHS throws ldconfig error @ a050897

Previous Next

Package: guix;

Reported by: Juliana Sims <juli <at> incana.org>

Date: Sun, 23 Jul 2023 00:59:01 UTC

Severity: normal

To reply to this bug, email your comments to 64794 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#64794; Package guix. (Sun, 23 Jul 2023 00:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juliana Sims <juli <at> incana.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 23 Jul 2023 00:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juliana Sims <juli <at> incana.org>
To: bug-guix <at> gnu.org
Subject: Guile 3.0.9 in guix shell container with emulated FHS throws ldconfig
 error @ a050897
Date: Sat, 22 Jul 2023 20:58:33 -0400
[Message part 1 (text/plain, inline)]
Hi,

When entering `guix shell -CF guile[@3]`,  I receive the following 
error:
"ldconfig: /lib/libguile-3.0.so.1.6.0-gdb.scm is not an ELF file - it 
has the wrong magic bytes at the start."

Here is the information for my version of Guix:
```
(channel
       (name 'guix)
       (url "<https://git.savannah.gnu.org/git/guix.git>")
       (branch "master")
       (commit
         "a0508975dd6c70a2d2997a75c302a9fd42f7c370")
       (introduction
         (make-channel-introduction
           "9edb3f66fd807b096b48283debdcddccfea34bad"
           (openpgp-fingerprint
             "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))
```

Thanks,
Juli

[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#64794; Package guix. (Wed, 20 Sep 2023 07:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 64794 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Juliana Sims <juli <at> incana.org>, 64794 <at> debbugs.gnu.org
Subject: Re: bug#64794: Guile 3.0.9 in guix shell container with emulated
 FHS throws ldconfig error @ a050897
Date: Wed, 20 Sep 2023 08:55:53 +0200
Hi,

On Sat, 22 Jul 2023 at 20:58, Juliana Sims <juli <at> incana.org> wrote:

> When entering `guix shell -CF guile[@3]`,  I receive the following 
> error:
> "ldconfig: /lib/libguile-3.0.so.1.6.0-gdb.scm is not an ELF file - it 
> has the wrong magic bytes at the start."

[...]

>         (commit
>           "a0508975dd6c70a2d2997a75c302a9fd42f7c370")

I confirm the message:

--8<---------------cut here---------------start------------->8---
$ guix shell -CF guile <at> 3
ldconfig: /lib/libguile-3.0.so.1.6.0-gdb.scm is not an ELF file - it has the wrong magic bytes at the start.
--8<---------------cut here---------------end--------------->8---

with Guix revision 6113e0529d61df7425f64e30a6bf77f7cfdfe5a5.

Is it a warning or an error?  Other said, which feature does it break?


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#64794; Package guix. (Thu, 20 Jun 2024 13:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 64794 <at> debbugs.gnu.org (full text, mbox):

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: 64794 <at> debbugs.gnu.org
Subject: Re: Guile 3.0.9 in guix shell container with emulated FHS throws
 ldconfig error @ a050897
Date: Thu, 20 Jun 2024 15:00:33 +0200
The warning appears also for guile <at> 2.0 and later. guile <at> 1.8 works fine:

```
$ guix shell --emulate-fhs --container guile <at> 1.8
[env]$ exit
$ guix shell --emulate-fhs --container guile <at> 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]$
```




Information forwarded to bug-guix <at> gnu.org:
bug#64794; Package guix. (Thu, 20 Jun 2024 16:19:01 GMT) Full text and rfc822 format available.

Message #14 received at 64794 <at> debbugs.gnu.org (full text, mbox):

From: Thiago Jung Bauermann <bauermann <at> kolabnow.com>
To: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Cc: 64794 <at> debbugs.gnu.org
Subject: Re: 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
Hello,

Rostislav Svoboda <rostislav.svoboda <at> gmail.com> writes:

> The warning appears also for guile <at> 2.0 and later. guile <at> 1.8 works fine:
>
> ```
> $ guix shell --emulate-fhs --container guile <at> 1.8
> [env]$ exit
> $ guix shell --emulate-fhs --container guile <at> 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




This bug report was last modified 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.