LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-28-2008, 07:10 AM   #1
bhagat_singh
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
Gcc 4.3.0 cross compilation for arm is failing


Hi
I am trying to cross compile gcc 4.3.0 on a x86 machine for the arm architecture

have done configuration as below
configure --target=arm-unknown-linux-gnu --host=i686-host_pc-linux-gnu --disable-multilib --with-newlib --with-mpfr=/home/bhagat/mpfr-2.3.1_install/ --without-headers --disable-nls --enable-threads=no --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c --disable-shared

The compliation is failing with error message


-DHAVE_CONFIG_H -o cpp gcc.o opts-common.o gcc-options.o cppspec.o \
intl.o prefix.o version.o ../libcpp/libcpp.a -L/usr/local/lib -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
arm-unknown-linux-gnu-gcc -dumpspecs > tmp-specs
/bin/sh: arm-unknown-linux-gnu-gcc: command not found
make[2]: *** [specs] Error 127


Can any body pls help me with some solution .

Thanks
bhagat
 
Old 06-29-2008, 01:29 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
"Gcc 4.3.0 cross compilation for arm is failing"

Welcome to Linux Questions.

Please always tell which "Linux" ,
"Name" and "version" you are using, when asking a question.
Please also add some info about the distro in your profile
here at LQ.

""--target=arm-linux""...then you will only be told :
..arm-linux-gcc: command not found...... meaning :
You will need a "cross compiler" to build one, i.e.
build the compiler in 2 steps.

http://www.gnuarm.org/ the "Gnu Arm homepage" has instructions
for building the "GNU ARM toolchain" : Click on the word "here"
in the 3' line :

Quote:
The toolchain consists of the GNU binutils, compiler set (GCC) and Insight debugger.
Newlib is used for the C library. The toolchain includes the C and C++ compilers.
Details of the build process appear here
**Take care to have a build directory outside all files...
..binutils-2.17 >> binutils-build, gcc-4.2 >> gcc-build, newlib-1.15 >> newlib-build
..etc.
e.g. 'cd gcc-build' , 'sh ../gcc-4.2/configure --.

**Prefer to build and install all files in your /home/ on the host,
e.g. build in /home/"user"/tmpxx and install in /home/"user"/arm-yy-toolchain.
( I can see you have no specific --prefix (except /usr/local/ ??))
Your system might "see" some alien files and get damaged, if /usr/local/.

The instructions are for: binutils, gcc, newlib, gdb. I followed that.
(Files shown for download is a little different :
binutils, gcc, newlib, insight-6.6.tar.bz2.)

But now it is your turn, and may be you can make it different ??
Please inform, when you succeed.

I would not use gcc-4.3, released 3 weeks ago ?, too many things will
not yet compile, and some not with 4.2. AFAIK 4.1.1 is a safe choice.

### Bugs : I found only 1, [toolchain-prefix]/bin/
'ln -s arm-elf-gcc arm-elf-cc' when you are asked for missing 'arm-elf-cc'
or some "files not found" .

Generally building a compiler in 2 steps: Also see "Linux From Scratch"
Building for other achitectures than arm, this example :
http://www.ifp.uiuc.edu/~nakazato/tips/xgcc.html

Good luck with the project !
PS : I used PCLinuxOS2007 as host.,building gcc-4.2 etc.

Last edited by knudfl; 07-09-2008 at 03:40 AM.
 
Old 07-10-2008, 02:38 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
New comments :

Gcc-4.3.x has some new features for "arm 7" so I understand your attempt
to use it.

I found some packages, packed as ".rpm's"
for Mandriva and Fedora : http://home.comcast.net/~mcatudal/

Rgds
 
  


Reply



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
ARM-Linux Cross compilation Toolkits 2.95 hazzyb Programming 3 02-06-2009 10:21 AM
Problem compiling BlueZ stack on ARM ( cross compilation from linux x86) shilpates Linux - Wireless Networking 1 08-20-2008 03:02 AM
Cross compiling utftpd for arm SachinTCS Linux - Desktop 1 04-13-2007 02:11 AM
Cross compilation (QT libraries) using gcc for Windows arunak Programming 15 04-06-2007 01:12 AM
gcc compilation failing on UnixWare for LOCALE_ALIAS_PATH subu_s Programming 0 12-21-2004 07:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:09 AM.

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
Open Source Consulting | Domain Registration