* [Buildroot] Confused by the <fenv> implementation, causing gsl build issues
@ 2012-10-14 10:04 Thomas Petazzoni
2012-10-14 22:10 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-14 10:04 UTC (permalink / raw)
To: buildroot
Hello,
uClibc provides a UCLIBC_HAS_FENV option that can be enabled on any
architecture. As soon as this option is enabled, the <fenv.h> header is
included, which make applications and libraries think that function
such as feenableexcept() or fesetround() are available. However, on
ARM, those function are in fact not implemented by uClibc.
This causes the following build failure when trying to build the gsl
library (version 1.15) against an ARM uClibc toolchain:
../ieee-utils/.libs/libgslieeeutils.a(fp.o): In function `gsl_ieee_set_mode':
fp.c:(.text+0xd4): undefined reference to `fesetround'
fp.c:(.text+0x148): undefined reference to `feenableexcept'
collect2: ld returned 1 exit status
Of course, in one sense, the configure.ac check of gsl to test the
existence of those functions might be considered incorrect (it only
verifies if they are declared, not if it is actually possible to link a
program using those functions), but on the other hand, it sounds
strange for uClibc to install <fenv.h>, exposing certain functions that
are in fact not available.
See the end of
http://autobuild.buildroot.org/results/f1784c53cb595a3573cb98d63868aee36b5d9bb6/build.log.bz2
if you want to see the entire build log of gsl.
Am I misunderstanding something?
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Confused by the <fenv> implementation, causing gsl build issues
2012-10-14 10:04 [Buildroot] Confused by the <fenv> implementation, causing gsl build issues Thomas Petazzoni
@ 2012-10-14 22:10 ` Bernhard Reutner-Fischer
2012-10-18 13:42 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Reutner-Fischer @ 2012-10-14 22:10 UTC (permalink / raw)
To: buildroot
On 14 October 2012 12:04:29 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> uClibc provides a UCLIBC_HAS_FENV option that can be enabled on any
> architecture.
Fenv is IIRC only implemented for i386.
Sent with AquaMail for Android
http://www.aqua-mail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Confused by the <fenv> implementation, causing gsl build issues
2012-10-14 22:10 ` Bernhard Reutner-Fischer
@ 2012-10-18 13:42 ` Thomas Petazzoni
2012-10-18 18:21 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-18 13:42 UTC (permalink / raw)
To: buildroot
On Mon, 15 Oct 2012 00:10:19 +0200, Bernhard Reutner-Fischer wrote:
> > uClibc provides a UCLIBC_HAS_FENV option that can be enabled on any
> > architecture.
>
> Fenv is IIRC only implemented for i386.
Ok, but then why it can be selected on other architectures, and why
does it install <fenv.h> even on architectures where it is not
supported?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Confused by the <fenv> implementation, causing gsl build issues
2012-10-18 13:42 ` Thomas Petazzoni
@ 2012-10-18 18:21 ` Bernhard Reutner-Fischer
2012-10-18 19:14 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Bernhard Reutner-Fischer @ 2012-10-18 18:21 UTC (permalink / raw)
To: buildroot
On 18 October 2012 15:42:40 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> On Mon, 15 Oct 2012 00:10:19 +0200, Bernhard Reutner-Fischer wrote:
>
> > > uClibc provides a UCLIBC_HAS_FENV option that can be enabled on any
> > > architecture.
> >
> > Fenv is IIRC only implemented for i386.
>
> Ok, but then why it can be selected on other architectures, and why
> does it install <fenv.h> even on architectures where it is not
> supported?
Please provide patches to add minimal fenv support for the target(s)
you are interested in.
TIA,
Sent with AquaMail for Android
http://www.aqua-mail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] Confused by the <fenv> implementation, causing gsl build issues
2012-10-18 18:21 ` Bernhard Reutner-Fischer
@ 2012-10-18 19:14 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2012-10-18 19:14 UTC (permalink / raw)
To: buildroot
On Thu, 18 Oct 2012 20:21:28 +0200, Bernhard Reutner-Fischer wrote:
> > Ok, but then why it can be selected on other architectures, and why
> > does it install <fenv.h> even on architectures where it is not
> > supported?
>
> Please provide patches to add minimal fenv support for the target(s)
> you are interested in.
Well, at this point I am not interested in any particular target. I am
interested in having uClibc building a correct toolchain, that doesn't
contain headers describing functions that it doesn't implement, causing
build issues in various userspace packages.
So I guess we should simply disable the possibility of enabling fenv
support on those architectures that don't have the necessary code.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-18 19:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-14 10:04 [Buildroot] Confused by the <fenv> implementation, causing gsl build issues Thomas Petazzoni
2012-10-14 22:10 ` Bernhard Reutner-Fischer
2012-10-18 13:42 ` Thomas Petazzoni
2012-10-18 18:21 ` Bernhard Reutner-Fischer
2012-10-18 19:14 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox