This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
assertion fails in elf/get-dynamic-info.h
- From: Chris Aoki <christopher dot aoki at oracle dot com>
- To: libc-alpha at sourceware dot org
- Cc: Chris Aoki <christopher dot aoki at oracle dot com>
- Date: Sat, 2 Jun 2018 15:42:22 -0700
- Subject: assertion fails in elf/get-dynamic-info.h
The glibc wiki includes helpful instructions for
testing a prototype glibc build. The instructions are
found under the heading “Compile against glibc in an
installed location” at the following URL:
https://sourceware.org/glibc/wiki/Testing/Builds#Compile_against_glibc_in_an_installed_location
However, when I have followed these instructions, the
prototype glibc fails an assertion early in process startup.
In the file get-dynamic-info.h:
/* Flags must not be set for ld.so. */
assert (info[DT_RUNPATH] == NULL);
assert (info[DT_RPATH] == NULL);
As far as I can determine, the above assertions defeat the use
of the following flags given in the aforementioned instructions:
> SYSROOT=<path to the GLIBC install directory>
> ...
> -Wl,-rpath=${SYSROOT}/lib64 \
> -Wl,--dynamic-linker=${SYSROOT}/lib64/ld-<version>.so \
Questions:
1. Do the assertions intentionally defeat the purpose of the
-Wl,-rpath and -Wl,—dynamic-linker flags given in the testing
instructions?
2. If so, what is the rationale underlying the assertions?
3. If not, how should the build be configured to support the
documented testing instructions?
Thanks and best regards,
Chris Aoki