LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2009, 08:39 AM   #1
big.frog
LQ Newbie
 
Registered: Jan 2009
Location: China
Posts: 7

Rep: Reputation: 0
Unhappy glibc-2.9 and uClibc-0.9.30 cross compile error... >_<


I aready successful compile binutils and gcc for step one.
I try all the way I could found,but I still cant do the next step well. The top guy who knows how to solve the problem, please to give me some advice,thank you.

gcc-4.3.3
binutils-2.19.1
glibc-2.9
uClibc-0.9.30.1
uClibc-0.9.30

linux: FC9

setenv:
Code:
export PROJECT=arm-linux-prj
export PROJROOT=/home/${PROJECT}
export TARGET=arm-linux
export PRJ_PREFIX=${PROJROOT}/tools
export TARGET_PREFIX=${PRJ_PREFIX}/${TARGET}
export ARCH=arm
export CROSS_COMPILE=${TARGET}-
BUILD_CC=gcc CC=${CROSS_COMPILE}gcc AR=${CROSS_COMPILE}ar RANLIB=${CROSS_COMPILE}ranlib AS=${CROSS_COMPILE}as LD=${CROSS_COMPILE}ld
export PATH=${PRJ_PREFIX}/bin:${PATH}
Part 1 try glibc:

Code:
mv -r glibc-ports-2.7 glibc-2.9/ports

../configure --build=i686-pc-linux-gnu --host=$TARGET --prefix="/usr" --enable-add-ons --with-headers=${TARGET_PREFIX}/include --with-binutils=${PRJ_PREFIX}/bin --cache-file=config.cache --enable-kernel=2.6.16.59

configure: loading cache config.cache
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
configure: running configure fragment for add-on nptl
checking add-on ports for preconfigure fragments... am33 arm hppa m68k mips 
checking sysdep dirs... ports/sysdeps/arm/elf ports/sysdeps/unix/sysv/linux/arm/nptl ports/sysdeps/unix/sysv/linux/arm nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread ports/sysdeps/unix/sysv/linux sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv ports/sysdeps/unix/sysv sysdeps/unix/sysv ports/sysdeps/unix/arm nptl/sysdeps/unix ports/sysdeps/unix sysdeps/unix sysdeps/posix ports/sysdeps/arm/fpu ports/sysdeps/arm/nptl ports/sysdeps/arm sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for arm-linux-gcc... arm-linux-gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

config.log:
Using built-in specs.
Target: arm-linux
Configured with: ./gcc-4.3.3/configure --target=arm-linux --prefix=/home/arm-linux-prj/tools --without-headers --with-newlib --enable-languages=c
Thread model: posix
gcc version 4.3.3 (GCC) 
configure:3285: $? = 0
configure:3292: arm-linux-gcc -V >&5
arm-linux-gcc: '-V' option must have argument
configure:3295: $? = 1
configure:3299: checking for suffix of object files
configure:3325: arm-linux-gcc -c   conftest.c >&5
/tmp/ccvXg8mQ.s: Assembler messages:
/tmp/ccvXg8mQ.s:7: Error: junk at end of line, first unrecognized character is `@'
/tmp/ccvXg8mQ.s:8: Error: junk at end of line, first unrecognized character is `@'
/tmp/ccvXg8mQ.s:9: Error: too many memory references for `mov'
/tmp/ccvXg8mQ.s:10: Error: no such instruction: `stmfd sp!,{fp,ip,lr,pc}'
/tmp/ccvXg8mQ.s:11: Error: too many memory references for `sub'
/tmp/ccvXg8mQ.s:12: Error: expecting operand after ','; got nothing
/tmp/ccvXg8mQ.s:13: Error: too many memory references for `mov'
/tmp/ccvXg8mQ.s:14: Error: no such instruction: `ldmfd sp,{fp,sp,pc}'
configure:3328: $? = 1
part 2 try uClibc:

Code:
[root@localhost uClibc-0.9.30]# make CROSS=arm-linux-
  AS lib/crt1.o
as: unrecognized option '-EB'
make: *** [lib/crt1.o] Error 1
where is the '-EB' option?
I cant find the option in makefiles. (makerule,makefile.in,etc.)

Why always assembler error?
Is this have relations with my CPU type ?

my pc hardware:
CPU: AMD64_X2
MEM: KINGSTON 1G DDR2
hard discs: 80G

Last edited by Tinkster; 10-30-2010 at 04:20 PM.
 
Old 04-12-2009, 08:32 PM   #2
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
This seems to be a problem with your cross-compilation setup. Maybe some header files are missing for the target system. You wrote that you have built gcc and binutils yourself - why actually? I'm sure you can set up a cross-compile environment by using the existing Fedora packages as a starting point.

See http://linux.bytesex.org/cross-compiler.html for a quick checklist.

Last edited by Tinkster; 10-30-2010 at 04:19 PM.
 
Old 04-13-2009, 08:57 AM   #3
big.frog
LQ Newbie
 
Registered: Jan 2009
Location: China
Posts: 7

Original Poster
Rep: Reputation: 0
glibc-2.9 and uClibc-0.9.30 cross compile error... >_<

maresmasb, thank you for your advices.

Quote:
This seems to be a problem with your cross-compilation setup.
I will check the list carefully.

Quote:
You wrote that you have built gcc and binutils yourself - why actually?
I'm sure you can set up a cross-compile environment by using the existing
Fedora packages as a starting point.
yes,you were right.
Only because I wish that I could make a real cross-compiler in the near future.
Then If I my pc compiler be changed,I don't need to change the cross-compiler. ^_^
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Glibc or uClibc + busybox nicoo Linux From Scratch 2 12-22-2008 04:33 AM
Glib cross compile error m.harshavardhan Linux - General 1 12-04-2007 04:31 AM
Cross LFS for IA64 Glibc make error katinoel Linux From Scratch 1 03-03-2007 07:34 AM
Errors during the test suite for Glibc-20050926 32 Bit � Cross compile x86_64 Basel Linux From Scratch 3 10-29-2005 07:45 AM
Error cross-compiling glibc, chapter 5 donbellioni Linux From Scratch 2 09-17-2004 03:12 PM


All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration