This is the mail archive of the
crossgcc@sources.redhat.com
mailing list for the crossgcc project.
See the CrossGCC FAQ for lots
more information.
Re: crosstool 0.26 for arm fail?
- From: Roman Duka <rduka at mail dot ru>
- Cc: crossgcc at sources dot redhat dot com
- Date: Thu, 29 Jan 2004 20:35:41 +0000
- Subject: Re: crosstool 0.26 for arm fail?
- References: <1075392107.1489.13.camel@dyn251.ele.uri.edu>
Ming Zhang wrote:
Hi, I dl crosstool-0.26 and try to get a cross compile toolchain for
arm.
but either
eval `cat arm.dat gcc-3.3.1-glibc-2.3.2.dat` sh all.sh --notest
or
eval `cat arm.dat gcc-3.3.2-glibc-2.3.2.dat` sh all.sh --notest
fail with same error message
In file included from ../sysdeps/unix/sysv/linux/sys/sysctl.h:29,
from ../include/sys/sysctl.h:2,
from ../sysdeps/unix/sysv/linux/arm/ioperm.c:49:
/opt/crosstool/arm-unknown-linux-gnu/gcc-3.3.1-glibc-2.3.2/arm-unknown-linux-gnu/include/linux/sysctl.h:72: error: parse error before numeric constant
make[2]: ***
[/root/crosstool-0.26/build/arm-unknown-linux-gnu/gcc-3.3.1-glibc-2.3.2/build-glibc/misc/ioperm.o] Error 1
make[2]: Leaving directory
`/root/crosstool-0.26/build/arm-unknown-linux-gnu/gcc-3.3.1-glibc-2.3.2/glibc-2.3.2/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory
`/root/crosstool-0.26/build/arm-unknown-linux-gnu/gcc-3.3.1-glibc-2.3.2/glibc-2.3.2'
make: *** [all] Error 2
My work pc is a P4 2.4 with hyperthread, 1G ram. redhat 8.0 without any
upgrade.
OK mate, trying installing headers from kernel linux-2.6.1 they seem to
be better behaved with glibc-2.3.2. There are a few things you need to
do for kernel versions 2.6.0 and above:
When installing kernel headers, instead of runnng "make symlinks" you
need to run "make include/asm"
You need to setup a symbolic link "arch" in the kernel
"include/asm-arm/" directory, which points to your chosen arm system type
eg. "cd include/asm-arm && ln -s arch-integrator arch && cd .." and then
copy the kernel headers to your install directory. If you don't setup
this symlink manually ("make include/asm" does not seem to do it) the
compilation of glibc will fail:
----------------------------
Problem:
x86-cross-arm toolchain, binutils-2.14, gcc-3.3.2, glibc-2.3.2, linux-2.6.1
error including param.h when compiling glibc
Solution:
make a sysmlink "arch" to point to a directory of a particular arm
system type in the "include/asm/" directory
e.g. "cd prefix/target/include/asm && ln -s ./arch-integrator arch"
In file included from
/home/roman/crosstool/arm-unknown/arm-unknown-linux-gnu/include/linux/param.h:4,
from ../sysdeps/unix/sysv/linux/sys/param.h:24,
from ../sysdeps/unix/sysv/linux/init-first.c:26:
/home/roman/crosstool/arm-unknown/arm-unknown-linux-gnu/include/asm/param.h:13:45:
asm/arch/param.h: No such file or directory
make[2]: ***
[/home/roman/crosstool/TOOLS/build/glibc-build/csu/init-first.o] Error 1
make[2]: Leaving directory
`/home/roman/crosstool/TOOLS/build/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/home/roman/crosstool/TOOLS/build/glibc-2.3.2'
make: *** [all] Error 2
----------------------------
After all the step above the compilation of glibc-2.3.2 still fails:
----------------------------
Problem:
x86-cross-arm toolchain, binutils-2.14, gcc-3.3.2, glibc-2.3.2, linux-2.6.1
error in a sed script when compiling glibc
Solution:
find a type in the sed script??
arm-unknown-linux-gnu-gcc -shared
-Wl,-dynamic-linker=/lib/ld-linux.so.2 -Wl,-z,combreloc \
-x c /dev/null -o
/home/roman/crosstool/TOOLS/build/glibc-build/format.lds.so
-Wl,--verbose -v 2>&1 \
| sed -n -f scripts/output-format.sed >
/home/roman/crosstool/TOOLS/build/glibc-build/format.lds.new
sed: file scripts/output-format.sed line 21: Unknown command: ``Q''
make[1]: *** [/home/roman/crosstool/TOOLS/build/glibc-build/format.lds]
Error 1
make[1]: Leaving directory `/home/roman/crosstool/TOOLS/build/glibc-2.3.2'
make: *** [install] Error 2
----------------------------
so as you can see there are loads of bugs/problems, you could try the
latest CVS version of glibc, or try fixing the apprently broken sed
script in glibc-2.3.2/scripts/output-format.sed
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com