utils/getconf.c fails to build with old host libc

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Dec 4 09:29:42 UTC 2010


Hello,

Testing uClibc snapshot, utils/getconf.c fails to build with my host
libc (glibc 2.7, from a Debian Lenny installation) with the following
message :

# Build the host utils. Need to add an install target...
/usr/bin/make -j1 -C /home/test/outputs/testtool/toolchain/uClibc/utils \
                PREFIX=/home/test/outputs/testtool/staging \
                HOSTCC="/usr/bin/gcc" \
                hostutils
make[1]: Entering directory `/home/test/outputs/testtool/toolchain/uClibc/utils'
  HOSTCC utils/getconf.host
../utils/getconf.c:1025: error: '_SC_V7_ILP32_OFF32' undeclared here (not in a function)
../utils/getconf.c:1026: error: '_SC_V7_ILP32_OFFBIG' undeclared here (not in a function)
../utils/getconf.c:1027: error: '_SC_V7_LP64_OFF64' undeclared here (not in a function)
../utils/getconf.c:1028: error: '_SC_V7_LPBIG_OFFBIG' undeclared here (not in a function)
../utils/getconf.c: In function 'main':
../utils/getconf.c:1157: warning: implicit declaration of function 'mempcpy'
../utils/getconf.c:1157: warning: incompatible implicit declaration of built-in function 'mempcpy'
../utils/getconf.c:1220: warning: incompatible implicit declaration of built-in function 'mempcpy'
make[1]: *** [../utils/getconf.host] Error 1
make[1]: Leaving directory
`/home/test/outputs/testtool/toolchain/uClibc/utils'

This is because the _SC_V7_* symbols have only been added in further
versions of the C library (there are available in the 2.11 glibc
library of my newer Ubuntu system).

However, as Debian Lenny is still the currently stable Debian version,
it'd be nice if building uClibc on it would work.

The attached patch fixes the problem for me, but as my understanding of
what utils/getconf.c do is limited, I'm far from sure that it's the
right fix.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-getconf-only-use-specs-names-when-available.patch
Type: text/x-patch
Size: 4185 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20101204/737a72aa/attachment.bin>


More information about the uClibc mailing list