LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-11-2011, 10:57 AM   #1
bencpeters
LQ Newbie
 
Registered: Jul 2011
Posts: 3

Rep: Reputation: Disabled
Final Phase GCC build fails for ARM cross compiler toolchain


Hi all, I'm working on building a cross compiler tool chain to allow me to compile for an embedded Debian on an ARM9 system (a Technologic TS7550). I develop on a Macbook Pro, and I've gotten a tool chain working in an Ubuntu VM using binaries provided by Technologic; however, I would like to have OS X native binaries.

I've found some directions online, and have been able to build binutils, bootstrap GCC, and newlib. Unfortunately, the final (full) GCC build fails on libgomp. This is the configure command I'm using:

Code:
../configure --prefix=/Users/benpeters/NFS/arm-linux-osx/ --target=arm-unknown-linux-gnu --enable-interwork --enable-languages="c,c++" --enable-multilib --with-newlib --disable-nls --disable-shared --disable-threads --with-gnu-as --with-gnu-ld --with-gmp=/Users/benpeters/Downloads/armtoolchain/gmp --with-mpfr=/Users/benpeters/Downloads/armtoolchain/mpfr --with-mpc=/Users/benpeters/Downloads/armtoolchain/mpc
and the error:

Code:
checking for arm-unknown-linux-gnu-gcc... /Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/./gcc/xgcc -B/Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/./gcc/ -B/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ -B/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/lib/ -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/include -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/sys-include   
checking for C compiler default output file name... 
configure: error: in `/Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/arm-unknown-linux-gnu/libgomp':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libgomp] Error 1
make: *** [all] Error 2
I looked in the config.log file for libgomp, and here is the relevant portion:

Code:
configure:3635: /Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/./gcc/xgcc -B/Users/benpeters/Downloads
/armtoolchain/gcc-4.6.2/build/./gcc/ -B/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ -B/Users/b
enpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/lib/ -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-l
inux-gnu/include -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/sys-include    -V >&5
xgcc: error: unrecognized option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3646: $? = 1
configure:3635: /Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/./gcc/xgcc -B/Users/benpeters/Downloads
/armtoolchain/gcc-4.6.2/build/./gcc/ -B/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ -B/Users/b
enpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/lib/ -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-l
inux-gnu/include -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/sys-include    -qversion >&5
xgcc: error: unrecognized option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3646: $? = 1
configure:3666: checking for C compiler default output file name
configure:3688: /Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/./gcc/xgcc -B/Users/benpeters/Downloads
/armtoolchain/gcc-4.6.2/build/./gcc/ -B/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ -B/Users/b
enpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/lib/ -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-l
inux-gnu/include -isystem /Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/sys-include    -g -O2   conf
test.c  >&5
/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ld: cannot find -lc
/Users/benpeters/NFS/arm-linux-osx/arm-unknown-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
configure:3692: $? = 1
configure:3729: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU OpenMP Runtime Library"
| #define PACKAGE_TARNAME "libgomp"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU OpenMP Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgomp/"
| #define PACKAGE "libgomp"
| #define VERSION "1.0"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3735: error: in `/Users/benpeters/Downloads/armtoolchain/gcc-4.6.2/build/arm-unknown-linux-gnu/libgomp':
configure:3739: error: C compiler cannot create executables
As far as I can figure out, it's trying to use this "xgcc" which is a bootstrapped cross compiler from stage 1 of the build to build something in the libgomp config, but it's missing some library files? (the crt1.o, crti.o, etc.) Can anyone shed some more light on this?

thanks!!!
 
Old 11-13-2011, 05:23 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Do yourself a favor, and leverage the experience and testing by a cast of thousands. Use Crosstool-NG to build your toolchain. Building a cross toolchain is non-trivial, and what you end up with will fail in mysterious ways if you haven't done everything just right. The developers and users of Crosstool-NG have been through all of the things you're trying, solved all of the problems, as well as a bunch you haven't thought of yet, and created a nice tool to help you build your toolchain. There is an active mailing list with ample friendly and timely help.
--- rod.
 
1 members found this post helpful.
  


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
How to build Cross Compiler Toolchain on Fedora for other Linux distributions? drroot Programming 8 04-25-2011 04:35 PM
[SOLVED] Cross compiling software for arm with a proprietary toolchain prushik Linux - Software 6 03-17-2011 01:38 PM
Trouble with build and install GCC-toolchain for ARM _oligarch Programming 2 04-26-2009 11:03 PM
GNU ToolChain for ARM, Linux 2.6.14-2/binutil-2.16/gcc 4.0.2/glibc-2.3.5 kumar_bst Linux - Software 0 01-22-2008 04:59 AM
How to check ARM Cross-Compiler MKSrivastava Debian 1 02-07-2006 02:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:24 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
Open Source Consulting | Domain Registration