For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > October 2005 > error compiling the latest glibc









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author error compiling the latest glibc
zentara

2005-10-22, 6:58 pm

Hi,
Just for fun, I want to see if I can compile the latest glibc-2.3.5 for
use on my linux system.

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
Paolo Carlini

2005-10-22, 6:58 pm

zentara wrote:

> 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?


Yes:

http://sources.redhat.com/ml/libc-a...5/msg00001.html

in short, you need a 3.4.x compiler.

Paolo.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com