Bug 4484 - libstdc++ has _GLIBCXX_HAVE_FENV_H undefined but uclibc appears to have a fenv.h
Summary: libstdc++ has _GLIBCXX_HAVE_FENV_H undefined but uclibc appears to have a fenv.h
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 20:58 UTC by holger
Modified: 2012-01-31 22:15 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Buildroot configuration with fenv no such file problem (21.08 KB, application/octet-stream)
2011-11-29 11:30 UTC, Jacek Kołodziejski
Details
Full error log (4.07 KB, text/plain)
2011-11-29 11:31 UTC, Jacek Kołodziejski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description holger 2011-11-15 20:58:44 UTC
bits/c++config.h does not define GLUBCXX_HAVE_FENV but it appears that uclibc has basic support for it.
Comment 1 Peter Korsgaard 2011-11-26 20:46:52 UTC
On what arch is this? uClibc currently only has basic fenv support for i386
Comment 2 Jacek Kołodziejski 2011-11-29 11:30:33 UTC
Created attachment 3818 [details]
Buildroot configuration with fenv no such file problem
Comment 3 Jacek Kołodziejski 2011-11-29 11:31:07 UTC
Created attachment 3824 [details]
Full error log
Comment 4 Jacek Kołodziejski 2011-11-29 11:37:26 UTC
(In reply to comment #1)
> On what arch is this? uClibc currently only has basic fenv support for i386

I believe I hit this problem. I'm using a powerpc p2020 (e500 core based) development board. The compilation ends with:

powerpc-unknown-linux-uclibc/libstdc++-v3/include/fenv.h:36:24: fatal error: fenv.h: No such file or directory
compilation terminated.

Reproducible: always

Submitted my configuration file and full error log.

Solution for compiling without this error:
after getting the error
make uclibc-menuconfig
switch UCLIBC_HAS_FENV to [=y]

PS. bug reporting for the first time - please excuse any inconveniences
Comment 5 Peter Korsgaard 2011-11-29 19:26:20 UTC
(In reply to comment #4)
> Submitted my configuration file and full error log.
> 
> Solution for compiling without this error:
> after getting the error
> make uclibc-menuconfig
> switch UCLIBC_HAS_FENV to [=y]
> 
> PS. bug reporting for the first time - please excuse any inconveniences

From the .config I see:

grep ^BR2_UCLIBC .config
BR2_UCLIBC_VERSION_0_9_32=y
BR2_UCLIBC_VERSION_STRING="0.9.32"
BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.31.config"

So you try to build uClibc 0.9.32 with a 0.9.31 defconfig. That is not going to work. Please change it to uClibc-0.9.32.config and try again.
Comment 6 Jacek Kołodziejski 2011-12-08 15:17:34 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Submitted my configuration file and full error log.
> > 
> > Solution for compiling without this error:
> > after getting the error
> > make uclibc-menuconfig
> > switch UCLIBC_HAS_FENV to [=y]
> > 
> > PS. bug reporting for the first time - please excuse any inconveniences
> 
> From the .config I see:
> 
> grep ^BR2_UCLIBC .config
> BR2_UCLIBC_VERSION_0_9_32=y
> BR2_UCLIBC_VERSION_STRING="0.9.32"
> BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.31.config"
> 
> So you try to build uClibc 0.9.32 with a 0.9.31 defconfig. That is not going to
> work. Please change it to uClibc-0.9.32.config and try again.

Hi,
I changed the .config to use "toolchain/uClibc/uClibc-0.9.32.config" (I only touched this thing), did make clean, and git pull.The compilation ends in the same place with the same effect (small unrelated differences - I can submit if you want). 

I looked at the two defconfigs - both have # UCLIBC_HAS_FENV is not set. 
I also noticed this patch: toolchain/uClibc/uClibc-0.9.32-honor-UCLIBC_HAS_FENV-for-e500.patch, but sadly I don't understand if it has anything in common.

Regards, Jacek

grep ^BR2_UCLIBC .config
BR2_UCLIBC_VERSION_0_9_32=y
BR2_UCLIBC_VERSION_STRING="0.9.32"
BR2_UCLIBC_CONFIG="toolchain/uClibc/uClibc-0.9.32.config"
Comment 7 Thomas Petazzoni 2012-01-31 22:15:16 UTC
I just tried with the latest Buildroot to build a PowerPC toolchain with gcc 4.6 for e500mc, and it just works fine.

If it still doesn't work for you, please post your Buildroot .config file. Your previous one was incorrect because it was using the 0.9.31 uClibc configuration with a 0.9.32 uClibc.