This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Testing a glibc build
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Christer Solskogen <christer dot solskogen at gmail dot com>
- Cc: libc-help at sourceware dot org
- Date: Tue, 11 Jun 2013 17:52:41 -0400
- Subject: Re: Testing a glibc build
- References: <kp7qui$jb6$1 at ger dot gmane dot org> <51B7880D dot 7040007 at redhat dot com> <kp82j7$782$1 at ger dot gmane dot org>
On 06/11/2013 04:51 PM, Christer Solskogen wrote:
> On 11.06.2013 22:26, Carlos O'Donell wrote:
>
>> Please describe exactly what you are trying to do and what problem
>> you are seeing.
>>
>
> Build and install glibc in a non-default directory (--prefix=/usr and DESTDIR=${SYSROOT} )
> set CC="gcc --sysroot=${SYSROOT} -Wl,-rpath=${SYSROOT}/lib -Wl,--dynamic-linker=${SYSROOT}/lib/ld-linux-x86-64.so.2"
> $CC hello.c -o hello
> readelf -l says:
> [Requesting program interpreter: ${SYSROOT}/lib/ld-linux-x86-64.so.2]
> Running ./hello works fine
>
> Build and install glibc again.
> ./hello will no longer run - This is the error:
> Inconsistency detected by ld.so: get-dynamic-info.h: 134: elf_get_dynamic_info: Assertion `info[15] == ((void *)0)' failed!
> A recompile does not fix it.
>
> objdump -x show the correct RPATH as well.
>
To put it another way... your first glibc has one ABI, the second glibc has another.
You compiled your first application against the first glibc.
Then you try to run your application against the second incompatible ABI glibc, which has prefix set to something else.
Cheers,
Carlos.