[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $ORIGIN substitution in RPATH
From: |
Bruno Haible |
Subject: |
Re: $ORIGIN substitution in RPATH |
Date: |
Sat, 23 Feb 2019 12:17:55 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; ) |
Hi Samuel,
> I have now fixed the installability and made a newer preinstalled image
> on http://cdimage.debian.org/cdimage/ports/latest/hurd-i386/
Thanks; this image works fine under VirtualBox.
However, my test case for use of $ORIGIN still does not work.
How to reproduce:
$ wget https://haible.de/bruno/gnu/libiconv-20190219.tar.gz
$ tar xfz libiconv-20190219.tar.gz
$ cd libiconv-20190219
$ ./configure --prefix=/tmp/inst1 --enable-relocatable
$ make
$ make install
$ cd /tmp
$ mv inst1 inst2
$ inst2/bin/iconv --help
-bash: inst2/bin/iconv: Permission denied
$ ls -lL inst2/bin/iconv inst2/lib/libiconv.so.2
-rwxr-xr-x 1 root root 108848 Feb 23 20:50 inst2/bin/iconv
-rwxr-xr-x 1 root root 1354728 Feb 23 20:50 inst2/lib/libiconv.so.2
$ readelf -d inst2/bin/iconv
Dynamic section at offset 0x6778 contains 30 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libiconv.so.2]
0x0000000000000001 (NEEDED) Shared library: [libc.so.0.3]
0x000000000000001d (RUNPATH) Library runpath:
[$ORIGIN/../lib:/tmp/inst1/lib]
...
$ ld --version
GNU ld (GNU Binutils for Debian) 2.31.1
I am 'root', and the executable as well as the shared library are
executable. Where does the 'Permission denied' error come from?
Bruno
Re: $ORIGIN substitution in RPATH, Bruno Haible, 2019/02/23