无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 6332|回复: 17

[求助] g4d编译出错

[复制链接]
发表于 2012-11-8 15:22:20 | 显示全部楼层 |阅读模式
checking if C symbols get an underscore after compilation... no
checking whether objcopy works for absolute addresses... no
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils
make: *** [build_default] 错误 1

我使用Ubuntu12.04 gcc环境编译 ,怎么会出现这种情况?请问各位大大。
发表于 2012-11-8 15:27:49 | 显示全部楼层
安装或更新一下 binutils

如果你习惯使用WINDOWS系统,可以试试我已经整好的可以直接在WINDOWS下使用的编译环境才50MB左右.
回复

使用道具 举报

发表于 2012-11-8 16:02:01 | 显示全部楼层
楼主可能没有使用最新版的 grub4dos。旧版容易出现楼主的错误。新版应该不会出现那个错误了。
回复

使用道具 举报

 楼主| 发表于 2012-11-8 16:16:20 | 显示全部楼层

回复 #2 chenall 的帖子

C大 你整理好的windows下编译环境在哪里呢?我去试试看。
回复

使用道具 举报

 楼主| 发表于 2012-11-8 16:18:24 | 显示全部楼层

回复 #3 不点 的帖子

我之前去SVN里面下载了最新版的,用Ubuntu12.04编译同样出现这个问题,我就想试试用低版本的g4d试试,没想到也这样。SVN最近登不上,不知道是我的问题还是怎么了。
回复

使用道具 举报

发表于 2012-11-8 16:43:06 | 显示全部楼层
可能是你的编译环境没弄好吧。

新版 gcc 是可以编译 grub4dos 的。我用的 Mageia 就完全没问题。
回复

使用道具 举报

发表于 2012-11-8 16:53:05 | 显示全部楼层
可能你裝上了binutils-gold了吧,移除用普通的binutils即可。
回复

使用道具 举报

 楼主| 发表于 2012-11-8 19:04:10 | 显示全部楼层

回复 #6 不点 的帖子

我的gcc是4.6.3的 。我上svn使用了最新版的g4d,出现下面情况
./build
make: execvp: ./build: 权限不够
make: *** [build_default] 错误 127
root@ubuntu:/g4d# chmod 755 build
root@ubuntu:/g4d# chmod 755 configure
root@ubuntu:/g4d# make
我把权限改了,编译还是出现了

checking whether -falign-loops works... yes
checking for objcopy... objcopy
checking if C symbols get an underscore after compilation... no
checking whether objcopy works for absolute addresses... no
configure: error: GRUB requires a working absolute objcopy; upgrade your binutils
make: *** [build_default] 错误 1
这是怎么回事呢?

[ 本帖最后由 2012casscqt 于 2012-11-8 19:05 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2012-11-8 19:22:16 | 显示全部楼层

回复 #7 roytam1 的帖子

不好意思,我不习惯使用linux,怎么知道我装的是binutils-gold呢?该怎么移除用普通的binutils?
回复

使用道具 举报

发表于 2012-11-9 07:36:55 | 显示全部楼层

回复 #4 2012casscqt 的帖子

http://chenall.net/post/grub4dos_dev/

或在http://chenall.net右上角的搜索框中输入grub4dos应该就可以找到了.

这个搜索框可以找到很多和GRUB4DOS相关的东西.
回复

使用道具 举报

 楼主| 发表于 2012-11-9 14:47:23 | 显示全部楼层

回复 #10 chenall 的帖子

好的,谢谢C大。。。
回复

使用道具 举报

发表于 2012-11-9 16:05:33 | 显示全部楼层
原帖由 2012casscqt 于 2012-11-8 19:22 发表
不好意思,我不习惯使用linux,怎么知道我装的是binutils-gold呢?该怎么移除用普通的binutils?

看來不是 binutils-gold 的問題,而是你的系統是 amd64 但沒安裝 gcc-multilib 和/或 binutils-multiarch 支援

如果是安裝了binutils-gold的話會像這樣:
  1. ~/grub4dos$ ./configure
  2. checking for a BSD-compatible install... /usr/bin/install -c
  3. checking whether build environment is sane... yes
  4. checking for gawk... no
  5. checking for mawk... mawk
  6. checking whether make sets $(MAKE)... yes
  7. checking build system type... x86_64-unknown-linux-gnu
  8. checking host system type... x86_64-unknown-linux-gnu
  9. checking whether to enable maintainer-specific portions of Makefiles... no
  10. checking for gcc... gcc
  11. checking for gcc... (cached) gcc
  12. checking whether the C compiler works... yes
  13. checking for C compiler default output file name... a.out
  14. checking for suffix of executables...
  15. checking whether we are cross compiling... no
  16. checking for suffix of object files... o
  17. checking whether we are using the GNU C compiler... yes
  18. checking whether gcc accepts -g... yes
  19. checking for gcc option to accept ISO C89... none needed
  20. checking for style of include used by make... GNU
  21. checking dependency style of gcc... gcc3
  22. checking dependency style of gcc... (cached) gcc3
  23. checking for ranlib... ranlib
  24. checking whether optimization for size works... yes
  25. checking whether gcc has -fno-stack-protector... yes
  26. checking whether gcc has -fno-reorder-functions... yes
  27. checking whether -Wundef works... yes
  28. checking whether -falign-loops works... yes
  29. checking whether linker accepts `--build-id=none'... yes
  30. checking for objcopy... objcopy
  31. checking if C symbols get an underscore after compilation... no
  32. checking whether objcopy works for absolute addresses... configure: error: gcc cannot link at address 7C00
复制代码

[ 本帖最后由 roytam1 于 2012-11-9 17:25 编辑 ]
回复

使用道具 举报

发表于 2012-11-10 18:54:59 | 显示全部楼层
之前可以用slitaz 4.0编译,现在下载最新版编译不了,gcc 4.5.2
回复

使用道具 举报

发表于 2012-11-10 20:55:44 | 显示全部楼层
原帖由 jianliulin 于 2012-11-10 18:54 发表
之前可以用slitaz 4.0编译,现在下载最新版编译不了,gcc 4.5.2

把錯誤訊息貼上來吧
回复

使用道具 举报

发表于 2012-11-10 22:32:38 | 显示全部楼层
把錯誤訊息貼上來吧
不好意思,可能是我昨天gcc没有安装好,今天测试编译通过!!!!
回复

使用道具 举报

发表于 2021-2-9 09:29:07 | 显示全部楼层
编译环境有没有
回复

使用道具 举报

发表于 2021-2-9 09:29:22 | 显示全部楼层
gcc错误2000
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-18 10:52

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表