This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Sigsegv signal while loading libc2.18
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: waseem sarwar <waseemsarwar103 at hotmail dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Fri, 1 Nov 2013 21:41:09 -0400
- Subject: Re: Sigsegv signal while loading libc2.18
- Authentication-results: sourceware.org; auth=none
- References: <BAY168-W1288D8DFBA14230789CAA9F1F50 at phx dot gbl>
On Fri, Nov 1, 2013 at 5:16 PM, waseem sarwar
<waseemsarwar103@hotmail.com> wrote:
> I have a pre-compiled binary that needs glibc version 2.14 or greater but my current ubuntu 10.04 (intel x86_64 arch) has glibc version 2.11. I decided to compile glibc 2.18 from source on my platform by using the following configuration The compilation succeeds without an issue.
>
> ../glibc-2.18/configure --prefix=/root/test_waseem//gnu-c-2.18/ --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-profile --enable-kernel=2.6.32 libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes --with-headers=/usr/include CFLAGS="-O2 -fno-stack-protector -fPIC" CXXFLAGS="-O2 -fno-stack-protector -fPIC"
By setting prefix to something other than /usr you broke the ABI and
now you need an almost complete root setup under
/root/test_waseem/gnu-c-2.18/ in order to have the library work
correctly.
> Now when I try to preload the library using LD_PRELOAD and try to execute the binary, it gives segmentation fault right away. I believe that its giving the seg fault at dynamic loading time as when i try to debug it with gdb, it crashed before the execution starts.
Preload what library? libc.so? You can't do that. The entire library
along with the dynamic loader and other libraries comprise a core
runtime that needs to be updated completely and used entirely. You
can't just preload a new libc.so.
> I have tried a few different configuration params (and with different compiler flags) but nothing works. Please respond with the possible solution. Thanks in advance.
The easiest solution is to install a VM with a distribution that has a
newer libc.
Cheers,
Carlos.