compiling the latest glibc with the latest gcc

zentara_at_highstream.net
Date: 10/24/05


Date: Mon, 24 Oct 2005 11:26:56 GMT

Hi,
Just for fun, I want to see if I can compile the latest glibc-2.3.5 for
use on my linux system. Since glibc is the crucial link among all
programs, I figure it should be a rock solid library.

In the docs for glibc, it says to use the latest gcc if possible, so I
tried compiling the unpatched glibc-2.3.5 with an unpatched gcc-4.0.2

I've looked at the src packages from a couple of different
distributions, and the glibc sources are all heavily patched, and
I'm wondering about the security implications of this.

So does anyone know which gcc version will compile glibc-2.3.5
without errors or patching needed? If not, I would like comments on
WHY?

I've tried this on a couple of different platforms, and it always seems
to fail at this type of error:

../sysdeps/ieee754/dbl-64/s_isinf.c:29: error: 'isinf' aliased to
undefined symbol '__isinf'

Now a typical file, where the error occurs looks like this:

s_isinf.c
/*---------------------------------------------------------------------------------*/
#if defined(LIBM_SCCS) && !defined(lint)
static char rcsid[] = "$NetBSD: s_isinf.c,v 1.3 1995/05/11 23:20:14 jtc
Exp $";
#endif

/*
 * isinf(x) returns 1 is x is inf, -1 if x is -inf, else 0;
 * no branching!
 */

#include "math.h"
#include "math_private.h"

int
__isinf (double x)
{
        int32_t hx,lx;
        EXTRACT_WORDS(hx,lx,x);
        lx |= (hx & 0x7fffffff) ^ 0x7ff00000;
        lx |= -lx;
        return ~(lx >> 31) & (hx >> 30);
}
hidden_def (__isinf)
weak_alias (__isinf, isinf)
#ifdef NO_LONG_DOUBLE
strong_alias (__isinf, __isinfl)
weak_alias (__isinf, isinfl)
#endif
/*--------------------------------------------------------------*/

Now I can comment out the offending lines, but the same error will occur
in another file. So it seems that there is something about

hidden_def (__isinf)
weak_alias (__isinf, isinf)

the weak_alias dosn't work, or something in the hidden_def dosn't work,
which causes the error -- isinf' aliased to undefined symbol '__isinf'

I'm using gcc version 4.02 and a 2.6 kernel.

Does anyone have any idea where I should look to solve this problem?

Thanks.

-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html


Relevant Pages

  • Re: How to enable thread-local storage?
    ... You can try to install it somewhere else and get gcc to use that. ... downloaded glibc and yesterday binutils. ... the newer glibc for when I compile stuff with it instead of the old? ...
    (comp.os.linux.misc)
  • weird glibc problem
    ... updated the glibc on the 7.2 m/c [originally ... the link phase, the error is: ... the dilemma is that I need to compile gcc again with ... bootstrap compile of gcc, however, even the first phase compile uses my ...
    (comp.unix.admin)
  • weird glibc problem
    ... updated the glibc on the 7.2 m/c [originally ... the link phase, the error is: ... the dilemma is that I need to compile gcc again with ... bootstrap compile of gcc, however, even the first phase compile uses my ...
    (comp.unix.misc)
  • weird glibc problem
    ... updated the glibc on the 7.2 m/c [originally ... the link phase, the error is: ... the dilemma is that I need to compile gcc again with ... bootstrap compile of gcc, however, even the first phase compile uses my ...
    (comp.os.linux.misc)
  • Re: runtime errors with lammpi compiled by intel compilers
    ... >>glibc 2.3.2 but run against an earlier glibc. ... > On the build environment, ... Inorder to avoid the glibc version conflicts, I tried to compile the ... I myself built these mpi libraries with the following options. ...
    (comp.lang.fortran)