guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: Add gobject-introspection.


From: Ludovic Courtès
Subject: Re: [PATCH] gnu: Add gobject-introspection.
Date: Sun, 15 Sep 2013 23:09:16 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Cyril Roelandt <address@hidden> 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:

--- 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"_

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

Thanks,
Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]