Bug 24757 - memusagestat is linked against system libpthread
Summary: memusagestat is linked against system libpthread
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: malloc (show other bugs)
Version: 2.30
: P2 normal
Target Milestone: 2.30
Assignee: Florian Weimer
URL:
Keywords:
Depends on:
Blocks: 20188
  Show dependency treegraph
 
Reported: 2019-07-02 14:28 UTC by Florian Weimer
Modified: 2019-07-02 14:55 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Weimer 2019-07-02 14:28:21 UTC
Bug 18465 tried to switch memusagestat to linking against the built libc, not the installed libc.  This finally resulted in commit f9b645b4b0a10c43753296ce3fa40053fa44606a ("memusagestat: use local glibc when linking [BZ #18465]").

Commit a8ff215e56050a907189e713fd449bcafe99ff6b ("Makeconfig: Move -Wl,-rpath-link options before library references") tried to enable linking against the local libpthread, not just the local libc, but it does not work due to the subdirectory build order  libpthread.so.0 simply does not exist at that point.

Related mailing list thread: https://sourceware.org/ml/libc-alpha/2019-07/msg00031.html

This currently blocks resolving bug 20188 with the posted patch because with it, the system libpthread.so.0 cannot be linked against the local libc.
Comment 1 Sourceware Commits 2019-07-02 14:52:00 UTC
The master branch has been updated by Florian Weimer <fw@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=27cec9aed97447dff887a88f4241604fffd8c525

commit 27cec9aed97447dff887a88f4241604fffd8c525
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Jul 2 16:45:52 2019 +0200

    malloc: Add nptl, htl dependency for the subdirectory [BZ #24757]
    
    memusagestat may indirectly link against libpthread.  The built
    libpthread should be used, but that is only possible if it has been
    built before the malloc programs.
Comment 2 Florian Weimer 2019-07-02 14:53:13 UTC
Fixed in glibc 2.30.