This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: glibc build error: linking nptl static - V2.17
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: L A Walsh <glibc at tlinx dot org>
- Cc: libc-help at sourceware dot org
- Date: Tue, 2 Apr 2013 10:18:54 -0400
- Subject: Re: glibc build error: linking nptl static - V2.17
- References: <515A441E dot 10604 at tlinx dot org>
On Mon, Apr 1, 2013 at 10:36 PM, L A Walsh <glibc@tlinx.org> wrote:
> I'm getting an undefined reference when trying to build a static version
> of glibc for standalone/rescue tool building but am getting the following
> link error:
> /home/tools/glibc/glibc/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:80:
> undefined reference to `__GI___pthread_unwind'
Unfortunately this isn't a very well tested configuration.
You have two options:
(a) Roll up your sleeves and get dirty and find out why you have an
undefined reference to a "global library-internal function".
My first guess is this:
#ifdef IS_IN_libpthread
# ifdef SHARED
# define __pthread_unwind __GI___pthread_unwind
# endif
#else
# ifndef SHARED
.weak __pthread_unwind
# endif
#endif
You can pretty easily see that it has no conditional for !SHARED (or
static) when building within libpthread.
Until you fix this it won't work.
(b) Back off on some of the configure flags you are using.
You can still link statically without those flags, but some cases
might load libraries.
Cheers,
Carlos.