C 编译器在尝试构建 Binutils 时无法创建可执行文件
我正在尝试从头开始构建 Linux,现在我位于 第 5.4 章,告诉我如何构建 Binutils。我有 binutils 2.20 的源代码,但是当我尝试构建它时:
time { ./binutils-2.20/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-werror ; }
它给了我一个错误:
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.
您可以在pastebin.com 上看到我的config.log: http://pastebin.com/hX7v5KLn
我刚刚安装了Ubuntu 10.04,并重新安装了GCC并安装了G++。此外,构建是由一个名为“lfs”的非 root、非管理员用户(在 Linux From Scratch 中也有描述)完成的,并且位于与系统安装位置不同的分区上。
谁能帮助我吗?谢谢
I am trying to build Linux From Scratch, and now I am at chapter 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
/tools
目录不存在。我创建了它,现在它编译得很好。The
/tools
directory didn't exist. I created it and now it compiles fine.尝试:
在运行配置之前。
Try:
before running configure.