Page 1 of 1
Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 5:24 am
by brodeur235
I'm following the tutorial in the wiki on creating a cross compiler for developing my toy OS in my native OS; 10.7 Lion. At the first compiler time binutils attempts to install until I receive this error:
Code: Select all
creating libtool
loading cache ../config.cache
checking whether to enable maintainer-specific portions of Makefiles... no
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking for executable suffix... (cached) .dSYM
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 -W -Wall ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Configure in /usr/src/build-binutils/bfd failed, exiting.
I have followed the instructions up until this point. No idea how to tend to this. Help appreciated,
Nick
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 6:15 am
by gerryg400
Which version of GCC do you have installed on your mac ?
Look in config.log to get more details of your error.
BTW, I've not been able to build a cross-compiler on Lion with the latest Xcode installed. I got error like this
https://trac.macports.org/ticket/29104.
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 6:28 am
by brodeur235
I have the latest version of xcode installed, which is apparently:
Code: Select all
NICHOLAS-PACHULSKIs-MacBook-Pro:nick nmpach$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
But, the version that I was planning on using for my cross compiler is 4.2.0 (which is not installed yet). The cross compiler tutorial in the wiki says to redo the gcc installation after doing a binutils install (which I obviously haven't done yet). Thanks for the reply. Future assistance greatly appreciated; want to do this on my mac!
Nick
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 6:41 am
by mike20123
hi "brodeur235"
i have found a tutorial step by step how to make cross platform compiler
i have tried that tutorial my self and it works for me me pretty well
check my topic in the forum
http://forum.osdev.org/viewtopic.php?f=1&t=24019
this video will teach you how to do it in Windows Platform
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 7:02 am
by brodeur235
I appreciate the help, but I need a cross compiler for mac; not windows. Just from skimming that video I can see that it uses tools that are .exe(s) which can't help me.
Any additional input is greatly appreciated. Still in need of help,
Nick
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 10:04 am
by Owen
GCC 4.2.1 is perfectly fine; and there is no newer GCC version for mac (From Apple, that is; and if you use a non-Apple GCC, you're in for a world of hurt)
Check "config.log"
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 2:29 pm
by Brynet-Inc
OP is probably compiling an ancient version of binutils.
Also, 4.2.1 is the last GPLv2 licensed GCC compiler and is used by OS X.. the entire ARM community.. and at least OpenBSD, as a systems compiler.
OS X forked 4.2.1 for their own reasons as well.
For a cross compiler, you can use whatever version you want.. so long as it compiles on your host OS.
Re: Cross Compiler Build Error Issues
Posted: Sun Aug 21, 2011 3:21 pm
by gerryg400
As I said, you cannot build a cross-compiler out-of-the-box on Lion because the new version of Xcode will not support it. I really wanted to get going again so rather than investigating the problem I just reverted to the old Xcode version from Snow Leopard. That worked.
As Brynet-Inc said, take care that you are using the latest Binutils. Note that 2.21 is NEWER than 2.9
Brodeur, attach your config.log.
[Edit] Actually, to be more specific, the cros-compiler tool-chain does build on Lion. But It segfaults in the compiler when used.