C compiler cannot create executables when trying to build Binutils
I am trying to build Linux From Scratch, and now I am at chapter 开发者_Python百科5.4, which tells me how to build Binutils. I have binutils 2.20's source code, but when I try to build it:
time { ./binutils-2.20/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-werror ; }
it gives me an error:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... GCC
checking for C compiler default output file name...
configure: error: in `/media/LFS':
configure: error: C compiler cannot create executables
See `config.log' for more details.
You can see my config.log at pastebin.com: http://pastebin.com/hX7v5KLn
I have just installed Ubuntu 10.04, and reinstalled GCC and installed G++. Also, the build is done by a non-root, non-admin user called 'lfs' (which is also described in Linux From Scratch), and on a different partition than where the system is installed.
Can anyone help me? Thanks
The /tools
directory didn't exist. I created it and now it compiles fine.
Try:
export CC=/usr/bin/gcc
before running configure.
精彩评论