unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add gobject-introspection.
Date: Sun, 15 Sep 2013 23:09:16 +0200	[thread overview]
Message-ID: <87y56xkd1f.fsf@gnu.org> (raw)
In-Reply-To: <5235C7F5.4070000@gmail.com> (Cyril Roelandt's message of "Sun, 15 Sep 2013 16:45:09 +0200")

[-- Attachment #1: Type: text/plain, Size: 2910 bytes --]

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 09/12/2013 10:41 AM, Ludovic Courtès wrote:
>> No.  Could you try to grep the source to see what produces this message?
>
> Oh, I thought the message was directly produced by libtool or the
> linker, but yes, it's definitely an error message from
> gobject-introspection. I investigated this a bit. During the 'build'
> phase, the '_resolve_non_libtool' method is called from
> giscanner/shlibs.py. It tries to get the path to some libraries (here,
> gobject-2.0 and glib-2.0). In order to do this, it runs this command:
>
> $ /nix/store/2awqnfxjrcm2b8s481zwsnfdic3inkdi-bash-4.2/bin/bash \
> ./libtool --mode=execute ldd \
> /tmp/nix-build-gobject-introspection-1.37.6.drv-0/gobject-introspection-1.37.6/tmp-introspectS0TNXv/GLib-2.0
>
> (tmp-instropectS0TNXv is a random directory)
>
> On i686, this works perfectly. On x86-64, I get:
>
> 'not a dynamic executable'

Yes, we actually have a problem with ldd (I had noticed, but thought
this would change with the moon phase or something):

--8<---------------cut here---------------start------------->8---
$ sh -x ~/.guix-profile/bin/ldd $(which ls)
+ TEXTDOMAIN=libc
+ TEXTDOMAINDIR=/nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/share/locale
+ RTLDLIST='/nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/ld-linux.so.2 /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib64/ld-linux-x86-64.so.2 /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/libx32/ld-linux-x32.so.2'
+ warn=
+ bind_now=
+ verbose=
+ test 1 -gt 0
+ case "$1" in
+ break
+ add_env='LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW='
+ add_env='LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW= LD_LIBRARY_VERSION=$verify_out'
+ add_env='LD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW= LD_LIBRARY_VERSION=$verify_out LD_VERBOSE='
+ test '' = yes
+ set -o pipefail
+ case $# in
+ single_file=t
+ result=0
+ for file in '"$@"'
+ test t = t
+ case $file in
+ :
+ test '!' -e /home/ludo/.guix-profile/bin/ls
+ test '!' -f /home/ludo/.guix-profile/bin/ls
+ test -r /home/ludo/.guix-profile/bin/ls
+ test -x /home/ludo/.guix-profile/bin/ls
+ RTLD=
+ ret=1
+ for rtld in '${RTLDLIST}'
+ test -x /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/ld-linux.so.2
+ for rtld in '${RTLDLIST}'
+ test -x /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib64/ld-linux-x86-64.so.2
+ for rtld in '${RTLDLIST}'
+ test -x /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/libx32/ld-linux-x32.so.2
+ case $ret in
+ nonelf /home/ludo/.guix-profile/bin/ls
+ return 1
+ echo '        not a dynamic executable'
        not a dynamic executable
+ result=1
+ exit 1
--8<---------------cut here---------------end--------------->8---

It’s looking for ld.so in the wrong place (under lib64/).

I believe this wonderful patch fixes the problem:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 560 bytes --]

--- glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed~	2012-12-25 04:02:13.000000000 +0100
+++ glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed	2013-09-15 23:08:03.000000000 +0200
@@ -1,3 +1,3 @@
 /LD_TRACE_LOADED_OBJECTS=1/a\
 add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ 	]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ 	]*$_\1"\2\4\6 \2\4-x86-64\6 \2x32\4-x32\6"_


[-- Attachment #3: Type: text/plain, Size: 77 bytes --]


I’ll try it in ‘core-updates’ and report back.

Thanks,
Ludo’.

  reply	other threads:[~2013-09-15 21:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 23:39 [PATCH] gnu: Add gobject-introspection Cyril Roelandt
2013-09-12  8:41 ` Ludovic Courtès
2013-09-15 14:45   ` Cyril Roelandt
2013-09-15 21:09     ` Ludovic Courtès [this message]
2013-09-15 21:38       ` Ludovic Courtès
2013-09-16 23:34         ` Cyril Roelandt
2013-09-17  8:40           ` Ludovic Courtès
2013-09-29 20:08 ` [PATCH v2] " Cyril Roelandt
2013-09-29 20:26   ` Ludovic Courtès
2013-09-29 21:09     ` Cyril Roelandt

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=87y56xkd1f.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=tipecaml@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).