public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive
@ 2005-03-25 12:41 balducci at units dot it
  2005-05-12  0:24 ` [Bug libc/804] malloc/tst-mtrace minor problem gschafer at zip dot com dot au
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: balducci at units dot it @ 2005-03-25 12:41 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/804] malloc/tst-mtrace minor problem
  2005-03-25 12:41 [Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive balducci at units dot it
@ 2005-05-12  0:24 ` gschafer at zip dot com dot au
  2005-05-12  0:26 ` gschafer at zip dot com dot au
  2005-10-14 23:41 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: gschafer at zip dot com dot au @ 2005-05-12  0:24 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From gschafer at zip dot com dot au  2005-05-12 00:24 -------
Yes, confirmed. This is a real bug, albeit a very minor one. But the suggested
fix is not the correct one.

The Glibc testsuite normally runs binaries using:

  elf/ld-linux.so.2 --library-path blah:blah:blah

to overcome the problem of having the dynamic linker hardwired to a name which
may not exist yet. This also explains why most folks won't see the problem
(those specifying a prefix where a dynamic linker already exists).

In this instance, the existing technique won't work because the invocation of
the mtrace perl script (from inside tst-mtrace.sh) runs the `tst-mtrace' binary
directly.

A possible fix is to run the mtrace perl script without using the binary ie:
just use the data file alone. This makes it work for me. But I'm unsure whether
running the (optional) binary will make a difference for what is being tested here.

Anyway, patch to follow.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gschafer at zip dot com dot
                   |                            |au
            Summary|malloc/tst-mtrace linked w/ |malloc/tst-mtrace minor
                   |wrong dynamic-linker        |problem
                   |directive                   |


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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/804] malloc/tst-mtrace minor problem
  2005-03-25 12:41 [Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive balducci at units dot it
  2005-05-12  0:24 ` [Bug libc/804] malloc/tst-mtrace minor problem gschafer at zip dot com dot au
@ 2005-05-12  0:26 ` gschafer at zip dot com dot au
  2005-10-14 23:41 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: gschafer at zip dot com dot au @ 2005-05-12  0:26 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From gschafer at zip dot com dot au  2005-05-12 00:26 -------
Created an attachment (id=485)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=485&action=view)
minor fix for malloc/tst-mtrace.sh


-- 


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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/804] malloc/tst-mtrace minor problem
  2005-03-25 12:41 [Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive balducci at units dot it
  2005-05-12  0:24 ` [Bug libc/804] malloc/tst-mtrace minor problem gschafer at zip dot com dot au
  2005-05-12  0:26 ` gschafer at zip dot com dot au
@ 2005-10-14 23:41 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2005-10-14 23:41 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-10-14 23:41 -------
I changed the trunk.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-14 23:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-25 12:41 [Bug libc/804] New: malloc/tst-mtrace linked w/ wrong dynamic-linker directive balducci at units dot it
2005-05-12  0:24 ` [Bug libc/804] malloc/tst-mtrace minor problem gschafer at zip dot com dot au
2005-05-12  0:26 ` gschafer at zip dot com dot au
2005-10-14 23:41 ` drepper at redhat dot com

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).