C 编译器在尝试构建 Binutils 时无法创建可执行文件

发布于 2024-08-30 22:34:28 字数 1226 浏览 5 评论 0原文

我正在尝试从头开始构建 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

九公里浅绿 2024-09-06 22:34:28

/tools 目录不存在。我创建了它,现在它编译得很好。

The /tools directory didn't exist. I created it and now it compiles fine.

屋檐 2024-09-06 22:34:28

尝试:

export CC=/usr/bin/gcc

在运行配置之前。

Try:

export CC=/usr/bin/gcc

before running configure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文