LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 5962|回复: 25

Why cannot my Host System compile source code completely?

[复制链接]
发表于 2006-2-17 13:07:36 | 显示全部楼层 |阅读模式
First, I am sorry for asking questions in English, since my current system doesn't support Chinese.

To build one LFS, I installed a Ubuntu on my laptop as the host system, on which I am working. After installation, I began to build the LFS followed by <<Linux From Scratch Version 6.1>>.   
Unfortunately, the building procedure was blocked on compiling the source code of binutils-2.15.94.0.2.2 package. Following is the error message:
......
ar.o(.text+0x24): In function `mri_emul':
/home/lfs/binutils-2.15.94.0.2.2/binutils/ar.c:148: undefined reference to `yyparse'
collect2: ld returned 1 exit status
make[3]: *** [ar] Error 1
make[3]: Leaving directory `/home/lfs/binutils-2.15.94.0.2.2/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/lfs/binutils-2.15.94.0.2.2/binutils'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/home/lfs/binutils-2.15.94.0.2.2/binutils'
make: *** [all-binutils] Error 2

I copied the same source code package to another PC with solaris 10 systautoconf-2.5em, and it can be compiled successfully.

I returned to the host system, and tried to compiled other packages. The autoconf-2.59, automake-1.9.6, and  libtool-1.5.22 all can be compiled and installed well, but the texinfo-4.8 packaged failed either. And it's error message seemed like the binutils', as follow:
......
terminal.o(.text+0xdf): In function `terminal_begin_using_terminal':
/home/moonheart/texinfo-4.8/info/terminal.c:152: undefined reference to `tputs'
terminal.o(.text+0xfb):/home/moonheart/texinfo-4.8/info/terminal.c:136: undefined reference to `tputs'
terminal.o(.text+0x1bf): In function `terminal_end_using_terminal':
/home/moonheart/texinfo-4.8/info/terminal.c:180: undefined reference to `tputs'
terminal.o(.text+0x1db):/home/moonheart/texinfo-4.8/info/terminal.c:167: undefined reference to `tputs'
terminal.o(.text+0x21e): In function `terminal_goto_xy':
/home/moonheart/texinfo-4.8/info/terminal.c:236: undefined reference to `tgoto'
terminal.o(.text+0x238):/home/moonheart/texinfo-4.8/info/terminal.c:236: undefined reference to `tputs'
terminal.o(.text+0x316): In function `terminal_clear_to_eol':
/home/moonheart/texinfo-4.8/info/terminal.c:275: undefined reference to `tputs'
terminal.o(.text+0x366): In function `terminal_clear_screen':
/home/moonheart/texinfo-4.8/info/terminal.c:287: undefined reference to `tputs'
terminal.o(.text+0x3b6): In function `terminal_up_line':
/home/moonheart/texinfo-4.8/info/terminal.c:299: undefined reference to `tputs'
terminal.o(.text+0x406): In function `terminal_down_line':
/home/moonheart/texinfo-4.8/info/terminal.c:311: undefined reference to `tputs'
terminal.o(.text+0x456):/home/moonheart/texinfo-4.8/info/terminal.c:323: more undefined references to `tputs' follow
terminal.o(.text+0x5b1): In function `terminal_delete_lines':
/home/moonheart/texinfo-4.8/info/terminal.c:366: undefined reference to `tgoto'
terminal.o(.text+0x5c6):/home/moonheart/texinfo-4.8/info/terminal.c:366: undefined reference to `tputs'
terminal.o(.text+0x627): In function `terminal_insert_lines':
/home/moonheart/texinfo-4.8/info/terminal.c:394: undefined reference to `tputs'
terminal.o(.text+0x651):/home/moonheart/texinfo-4.8/info/terminal.c:390: undefined reference to `tgoto'
terminal.o(.text+0x666):/home/moonheart/texinfo-4.8/info/terminal.c:390: undefined reference to `tputs'
terminal.o(.text+0x820): In function `terminal_get_screen_size':
/home/moonheart/texinfo-4.8/info/terminal.c:494: undefined reference to `tgetnum'
terminal.o(.text+0x873):/home/moonheart/texinfo-4.8/info/terminal.c:482: undefined reference to `tgetnum'
terminal.o(.text+0x90d): In function `terminal_initialize_terminal':
/home/moonheart/texinfo-4.8/info/terminal.c:540: undefined reference to `tgetent'
terminal.o(.text+0x928):/home/moonheart/texinfo-4.8/info/terminal.c:554: undefined reference to `tgetstr'
terminal.o(.text+0x980):/home/moonheart/texinfo-4.8/info/terminal.c:580: undefined reference to `tgetstr'
terminal.o(.text+0x995):/home/moonheart/texinfo-4.8/info/terminal.c:581: undefined reference to `tgetstr'
terminal.o(.text+0x9aa):/home/moonheart/texinfo-4.8/info/terminal.c:582: undefined reference to `tgetstr'
terminal.o(.text+0x9bf):/home/moonheart/texinfo-4.8/info/terminal.c:583: undefined reference to `tgetstr'
terminal.o(.text+0x9d4):/home/moonheart/texinfo-4.8/info/terminal.c:586: more undefined references to `tgetstr' follow
terminal.o(.text+0xb5b): In function `terminal_initialize_terminal':
/home/moonheart/texinfo-4.8/info/terminal.c:618: undefined reference to `tgetflag'
terminal.o(.text+0xb90):/home/moonheart/texinfo-4.8/info/terminal.c:629: undefined reference to `tgetstr'
terminal.o(.text+0xba5):/home/moonheart/texinfo-4.8/info/terminal.c:630: undefined reference to `tgetstr'
terminal.o(.text+0xbba):/home/moonheart/texinfo-4.8/info/terminal.c:631: undefined reference to `tgetstr'
terminal.o(.text+0xbcf):/home/moonheart/texinfo-4.8/info/terminal.c:632: undefined reference to `tgetstr'
terminal.o(.text+0xbe4):/home/moonheart/texinfo-4.8/info/terminal.c:634: undefined reference to `tgetstr'
terminal.o(.text+0xbf9):/home/moonheart/texinfo-4.8/info/terminal.c:635: more undefined references to `tgetstr' follow
terminal.o(.text+0xcd8): In function `terminal_initialize_terminal':
/home/moonheart/texinfo-4.8/info/terminal.c:621: undefined reference to `tgetflag'
terminal.o(.text+0xcfc):/home/moonheart/texinfo-4.8/info/terminal.c:595: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[3]: *** [ginfo] Error 1
make[3]: Leaving directory `/home/moonheart/texinfo-4.8/info'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/moonheart/texinfo-4.8/info'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/moonheart/texinfo-4.8'
make: *** [all] Error 2

Would you please tell me the reason ? Thx !
发表于 2006-2-17 13:19:31 | 显示全部楼层
试试用binutils-2.16.1看看.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-17 13:48:09 | 显示全部楼层
Thanks ! binutils-2.16.1 works well.
I still hope to know the real reason why binutils-2.15.94.0.2.2 makes those trouble. Can I get the answer?
回复 支持 反对

使用道具 举报

发表于 2006-2-17 13:56:19 | 显示全部楼层
那你就自己比较一下两个的代码区别吧。。或者看看 Changelog。
回复 支持 反对

使用道具 举报

发表于 2006-2-17 21:31:54 | 显示全部楼层
不知道你用的是哪个发行版,我是Debian testing。我把我的编译binutils-2.15.9,4.0.2.2过程说一下:
刚开始编译是,也是出现undefined reference to `yyparse'。
用google搜索了一下,安装了bison,flex,m4后。重新编译仍然是同样错误。
后来我又安装了libgmp3-dev,重新编译后通过。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-20 13:14:25 | 显示全部楼层

Thx to PA9000

Thx to PA9000:
        I thought that the problem is some programs' version.
回复 支持 反对

使用道具 举报

发表于 2006-2-20 17:17:54 | 显示全部楼层
binutils-2.1x.9x.x 和 binutils-2.16.1 好像不是一个代码树,
2.16.9x 不一定比 2.16.1 新.

binutils-2.1x.9x.x 都是 www.kernel.org 的, 可能是开发版
binutils-2.16.1 是 ftp.gnu.org 的.

一个明显的不同就是 binutils-2.1x.9x.x 引入了 flex ,bison 依赖.

用了binutils-2.1x.9x.x 这个版本的容易出问题. 我好不容易才用 2.16.9x 把lfs 启动,似乎有很多问题,一气之下换了 2.16.1.
回复 支持 反对

使用道具 举报

发表于 2006-2-20 17:23:49 | 显示全部楼层
我觉得是一个代码树的。不过一个是 beta,一个是stable。

2.16.1 是 stable,2.16.9x.x 是 beta。
回复 支持 反对

使用道具 举报

发表于 2006-2-20 18:07:49 | 显示全部楼层
我看过 binutils-2.1x.9x.x 的 Changelog ,跟 2.16.1 的分支早在几年前.
回复 支持 反对

使用道具 举报

发表于 2006-2-20 18:30:56 | 显示全部楼层
我没有仔细看过,谢谢兄弟更正。
回复 支持 反对

使用道具 举报

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

本版积分规则

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