powerpc and --without-fp build failure: fenv_libc.h not found

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

powerpc and --without-fp build failure: fenv_libc.h not found

Martin Michlmayr
Has anyone tried to build glibc on powerpc with --without-fp recently?
Using glibc 2.6.1, I'm seeing a build failure in ldbl-128ibm.
s_rintl.c tries to include fenv_libc.h but that's in
sysdeps/powerpc/fpu/fenv_libc.h and obviously won't get included on a
--without-fp build.

I worked around the problem by creating a sysdeps/powerpc/fenv_libc.h
with only #include <fenv.h> in it, but I'm wondering whether there's a
real fix for this.

Here's the error:

gcc-4.2 ../sysdeps/ieee754/ldbl-128ibm/s_rintl.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fstrict-aliasing -g -mcpu=405 -pipe -msoft-float -mnew-mnemonics -Wstrict-prototypes -mlong-double-128    -Wno-uninitialized -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -I../include -I/home/tbm/build/toolchain/glibc/glibc-2.6.1/build-tree/ppc405-libc/math -I/home/tbm/build/toolchain/glibc/glibc-2.6.1/build-tree/ppc405-libc -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/powerpc-linux-gnuppc405/4.2.1/include -isystem /home/tbm/build/toolchain/glibc/glibc-2.6.1/debian/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1 -DIS_IN_libm=1    -o /home/tbm/build/toolchain/glibc/glibc-2.6.1/build-tree/ppc405-libc/math/s_rintl.o -MD -MP -MF /home/tbm/build/toolchain/glibc/glibc-2.6.1/build-tree/ppc405-libc/math/s_rintl.o.dt -MT /home/tbm/build/toolchain/glibc/glibc-2.6.1/build-tree/ppc405-libc/math/s_rintl.o
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:25:23: error: fenv_libc.h: No such file or directory
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c: In function '__rintl':
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:50: warning: implicit declaration of function 'fegetround'
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:54: warning: implicit declaration of function 'fesetround'
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:54: error: 'FE_TONEAREST' undeclared (first use in this function)
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:54: error: (Each undeclared identifier is reported only once
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:54: error: for each function it appears in.)
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:86: error: 'FE_TOWARDZERO' undeclared (first use in this function)
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:91: error: 'FE_DOWNWARD' undeclared (first use in this function)
../sysdeps/ieee754/ldbl-128ibm/s_rintl.c:96: error: 'FE_UPWARD' undeclared (first use in this function)
make[3]: *** [/home/tbm/build/toolchain/glibc/glibc-2.6.1/build-tree/ppc405-libc/math/s_rintl.o] Error 1

--
Martin Michlmayr
http://www.cyrius.com/
Reply | Threaded
Open this post in threaded view
|

Re: powerpc and --without-fp build failure: fenv_libc.h not found

Daniel Jacobowitz-2
On Wed, Oct 10, 2007 at 07:32:01PM +0200, Martin Michlmayr wrote:
> Has anyone tried to build glibc on powerpc with --without-fp recently?
> Using glibc 2.6.1, I'm seeing a build failure in ldbl-128ibm.
> s_rintl.c tries to include fenv_libc.h but that's in
> sysdeps/powerpc/fpu/fenv_libc.h and obviously won't get included on a
> --without-fp build.
>
> I worked around the problem by creating a sysdeps/powerpc/fenv_libc.h
> with only #include <fenv.h> in it, but I'm wondering whether there's a
> real fix for this.

I think you're missing --enable-add-ons=ports.  You should be getting
sysdeps/powerpc/nofpu/fenv_libc.h.


--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: powerpc and --without-fp build failure: fenv_libc.h not found

Martin Michlmayr
* Daniel Jacobowitz <[hidden email]> [2007-10-10 13:39]:
> I think you're missing --enable-add-ons=ports.  You should be getting
> sysdeps/powerpc/nofpu/fenv_libc.h.

Thanks, Dan.  I hadn't realized that the nofpu parts weren't part of
glibc proper.

Maybe an error could be printed when --without-fp is used without
--enable-add-ons=ports.

Anyway, now I'm seeing the following error:

make[3]: *** No rule to make target `/home/tbm/build/toolchain/glibc2/glibc-2.6.1/build-tree/ppc405-libc/math/fe_nomask.o', needed by `/home/tbm/build/toolchain/glibc2/glibc-2.6.1/build-tree/ppc405-libc/math/libm.a'.  Stop.

which is stange because my previous attempt with a fake
sysdeps/powerpc/fenv_libc.h worked.  I don't know why it suddenly
wants to build math/fe_nomask.o (which of course only exists as
sysdeps/powerpc/fpu/fe_nomask.c)

--
Martin Michlmayr
http://www.cyrius.com/
Reply | Threaded
Open this post in threaded view
|

Re: powerpc and --without-fp build failure: fenv_libc.h not found

Steven Munroe
Martin Michlmayr wrote:

>* Daniel Jacobowitz <[hidden email]> [2007-10-10 13:39]:
>  
>
>>I think you're missing --enable-add-ons=ports.  You should be getting
>>sysdeps/powerpc/nofpu/fenv_libc.h.
>>    
>>
>
>Thanks, Dan.  I hadn't realized that the nofpu parts weren't part of
>glibc proper.
>
>Maybe an error could be printed when --without-fp is used without
>--enable-add-ons=ports.
>
>Anyway, now I'm seeing the following error:
>
>make[3]: *** No rule to make target `/home/tbm/build/toolchain/glibc2/glibc-2.6.1/build-tree/ppc405-libc/math/fe_nomask.o', needed by `/home/tbm/build/toolchain/glibc2/glibc-2.6.1/build-tree/ppc405-libc/math/libm.a'.  Stop.
>
>which is stange because my previous attempt with a fake
>sysdeps/powerpc/fenv_libc.h worked.  I don't know why it suddenly
>wants to build math/fe_nomask.o (which of course only exists as
>sysdeps/powerpc/fpu/fe_nomask.c)
>
>  
>
You need the patch from:
http://sources.redhat.com/ml/libc-ports/2007-06/msg00005.html

It is  upstream but not back to 2.6.1 tar.

Reply | Threaded
Open this post in threaded view
|

Re: powerpc and --without-fp build failure: fenv_libc.h not found

Daniel Jacobowitz-2
In reply to this post by Martin Michlmayr
On Wed, Oct 10, 2007 at 09:33:03PM +0200, Martin Michlmayr wrote:
> Maybe an error could be printed when --without-fp is used without
> --enable-add-ons=ports.

Catch-22: the error message couldn't be kept in ports :-)

> make[3]: *** No rule to make target `/home/tbm/build/toolchain/glibc2/glibc-2.6.1/build-tree/ppc405-libc/math/fe_nomask.o', needed by `/home/tbm/build/toolchain/glibc2/glibc-2.6.1/build-tree/ppc405-libc/math/libm.a'.  Stop.

This one's fixed in CVS; it missed glibc 2.6.1.

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: powerpc and --without-fp build failure: fenv_libc.h not found

Martin Michlmayr
In reply to this post by Steven Munroe
* Steven Munroe <[hidden email]> [2007-10-10 14:49]:
> You need the patch from:
> http://sources.redhat.com/ml/libc-ports/2007-06/msg00005.html

That helped.  Thanks a lot.
--
Martin Michlmayr
http://www.cyrius.com/