This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive
- From: "balducci at units dot it" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 25 Mar 2005 12:41:20 -0000
- Subject: [Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
Apologies if I'm wrong.
Building glibc with --prefix=/usr/local/glibc for the first time (so
/usr/local/glibc does not yet exist).
Upon `make check', the following error message is issued:
...
/bin/sh -e tst-mtrace.sh
/home/balducci/tmp/install-us-d/glibc-d/glibc-2.3.4/build-d/
env:
/home/balducci/tmp/install-us-d/glibc-d/glibc-2.3.4/build-d/malloc/tst-mtrace:
No such file or directory
...
Browsing the output, it turns out that tst-mtrace is linked with
`-Wl,-dynamic-linker=/usr/local/glibc/lib/ld-linux.so.2', which is the
*final* destination of the dynamic-linker. However, as I'm installing
for the first time with --prefix=/usr/local/glibc,
/usr/local/glibc/lib/ld-linux.so.2 does not yet exist at `make check'
time. The consequence is that tst-mtrace is linked without any complaint
(!), but trying to run it (it is run by the malloc/mtrace perl script)
generates the above listed error message.
The same seems to apply to all other tst-* testers, but for those I
haven't noticed any error message (probably because their output is
redirected into files)
===============
>How-To-Repeat:
===============
configure ... --prefix=/not/yet/existing/dir ...
make
make check
=====
>Fix:
=====
Link tst-mtrace with the path to the dynamic linker in the build tree:
-----------------
`-Wl,-dynamic-linker=/build/directory/tree/glibc-2.3.4/build-d/elf/ld-linux.so.2'
My workaround (which is definitely *not* a fix): stuff a specific make
rule for tst-mtrace (with the correct dynamic-linker directive) into
Rules.
I guess that a genuine fix would require diving into the Makefiles,
which I haven't done.
Ciao
Gabriele
--
Summary: malloc/tst-mtrace linked w/ wrong dynamic-linker
directive
Product: glibc
Version: 2.3.4
Status: NEW
Severity: minor
Priority: P3
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: balducci at units dot it
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=804
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.