Confused by the <fenv> implementation, causing gsl build issues
thomas.petazzoni at free-electrons.com
Sun Oct 14 10:04:29 UTC 2012
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
if you want to see the entire build log of gsl.
Am I misunderstanding something?
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
More information about the uClibc