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.
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.
Fixed in glibc 2.30.