This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: ARM build problem
- From: Fabrizio Gennari <fabrizio dot ge at tiscali dot it>
- To: libc-help at sourceware dot org
- Date: Sat, 20 Feb 2010 10:44:17 +0100
- Subject: Re: ARM build problem
Il 13/02/2010 0.50, Mike Frysinger ha scritto:
On Friday 12 February 2010 13:25:49 fabrizio gennari wrote:
I am trying to build glibc 2.3.6 (yes, it's old, but it is the last one
with linuxthreads supporting ARM, as linuxthreads 2.5 does not and, as
far as I heard, nptl does not either)
whoever told you about arm/nptl was wrong. it should work fine on arm.
The procedure to build glibc on ARM is poorly documented. This wouldn't
be so bad if it were straightforward, but it is far from it.
By gathering some information from Google, I discovered that glibc does
not compile for ARM standalone, but it does with an additional package
called glibc-ports. So, I downloaded glibc 2.11 and untarred it. Then, I
downloaded glibc-ports 2.11 (BTW, no glibc-ports-2.11.1 while
glibc-2.11.1 is there), untarred it, and typed
mv glibc-ports-2.11 glibc-2.11
so glibc-ports' folder becomes a subfolder of glibc's.
The build machine is running Ubuntu 9.10. binutils 2.20 for arm target
and gcc 4.4.3 cross-compiler are already there.
The configure command:
$ ../../glibc-2.11/configure --target=arm-linux --host=arm-linux
--prefix=/usr/local/cross/arm9gcc/
--enable-add-ons=nptl,glibc-ports-2.11
--with-headers=/home/fge/downloads/builds/linux-2.6.32/usr/include/
It failed, because "force unwind support is required".
The last lines of config.log are:
configure:27: checking for forced unwind support
configure:56: arm-linux-gcc -o conftest -g -O2 -fno-unwind-tables
conftest.c >&5
/usr/local/cross/arm9gcc/lib/gcc/arm-linux/4.4.3/../../../../arm-linux/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:63: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define ASM_GLOBAL_DIRECTIVE .globl
| #define HAVE_ASM_SET_DIRECTIVE 1
| #define ASM_TYPE_DIRECTIVE_PREFIX %
| #define HAVE_ASM_UNIQUE_OBJECT 1
| #define DO_VERSIONING 1
| #define HAVE_ASM_PREVIOUS_DIRECTIVE 1
| #define HAVE_Z_COMBRELOC 1
| #define NO_UNDERSCORES 1
| #define HAVE_ASM_WEAK_DIRECTIVE 1
| #define HAVE_ASM_CFI_DIRECTIVES 1
| #define HAVE_BUILTIN_EXPECT 1
| #define HAVE_BUILTIN_REDIRECTION 1
| #define HAVE___THREAD 1
| #define HAVE_TLS_MODEL_ATTRIBUTE 1
| #define SIZEOF_LONG_DOUBLE 0
| #define HAVE_TLS_SUPPORT 1
| /* end confdefs.h. */
| #include <unwind.h>
| int
| main ()
| {
|
| struct _Unwind_Exception exc;
| struct _Unwind_Context *context;
| _Unwind_GetCFA (context)
| ;
| return 0;
| }
configure:83: result: no
configure:158: error: forced unwind support is required
The configure script tries to compile a program containing a call to
_Unwind_GetCFA, to check whether that function is defined. And the
compilation is successful. Yet, it fails because the configure script
also tries to link that program. And, of course, it can't because there
is no libc yet (crt1.o is a libc file).
glibc cannot be built because it needs glibc to be built in advance. How
is this chicken-and-egg situation broken?
Regards,
Fabrizio