[adding bug-gnulib] On 12/25/2011 09:43 PM, chunrong lai wrote: > I tried to build a ARM version of findutils in my ubuntu 10.10 (x86_64) > with below commands > CC=arm-linux-gnueabi-gcc CFLAGS="-g" ./configure --build > arm-cross-linux-gnueabi --host i686-pc-linux-gnu
In general, you should get in the habit of passing CC=... and CFLAGS= as arguments to configure, rather than via the environment, so that configure can properly record things so that a later run of ./config.status with a different set of environment variables will still remember your configure choices. > make > > I met errors as > arm-linux-gnueabi-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. > -I../../intl -g -MT areadlink-with-size.o -MD -MP -MF $depbase.Tpo -c -o > areadlink-with-size.o areadlink-with-size.c &&\ > mv -f $depbase.Tpo $depbase.Po > In file included from ./stdio.h:31, > from areadlink-with-size.c:25: > /usr/arm-linux-gnueabi/include/stdio.h:742: error: expected > declaration specifiers or ‘...’ before ‘(’ token > /usr/arm-linux-gnueabi/include/stdio.h:742: error: conflicting > types for ‘rpl_fseeko’ > ./stdio.h:275: note: previous declaration of ‘rpl_fseeko’ was > here > but do not quite understand what happened. Any helps are appreciated. This sounds like a gnulib problem. Gnulib thinks that your ARM fseeko() is deficient (perhaps because it is a pessimistic cross-compilation guess, rather than an actual bug), but its attempts to replace things via rpl_fseeko are triggering some sort of circular header inclusion cycle where the gnulib replacement gets defined prior to the system declaration. A proper fix will probably require knowledge of which header files are involved in the circular inclusion, and/or updating the cross-compilation logic to guess correctly for your platform in the first place. Meanwhile, a quick workaround would be to prime the cache to avoid the replacement in the first place (assuming that gnueabi's fseeko() is not deficient, after all); try: ./configure CC=arm-linux-gnueabi-gcc CFLAGS="-g" \ --build arm-cross-linux-gnueabi --host i686-pc-linux-gnu \ gl_cv_func_fflush_stdin=yes to see if that is enough to bypass the pessimistic cross-compilation guess (or post more of config.log so that we know the full set of cross-compilation guesses in effect). -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature