LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: johnlight

Why cannot my Host System compile source code completely?

[复制链接]
发表于 2006-2-21 00:19:14 | 显示全部楼层
从我遇到的另一个问题推断,错误信息
     undefined reference to `yyparse'
的出现一定是与 yyparse 相关的库链接不正确导致的。

我当时遇到的问题是,由于不明原因导致
          /usr/lib
下改到 /lib 下的一些库的链接被破坏掉了,例如原来的库
/usr/lib/libm.so.2 被系统调整到 /lib 下,而在 /usr/lib 建立了一个链接
/usr/lib/libm.so -> ../../lib/libm.so.2
而由于不清楚的原因导致 /usr/lib/libm.so 被破坏掉长度为0,从而出现编译 libpng 等包时出现系统找不到动态库,出错信息是:
undefined reference to `pow'
等等。

我举这个例子是想说明,你的出错信息可能是找不到与 yyparse 相关的库,至于为何找不到,你可以分析一下。
回复 支持 反对

使用道具 举报

发表于 2006-2-21 18:15:44 | 显示全部楼层
可能跟我第一次出的错是一样的, 它把 yyparse.y 做成了一个

yyparse.c
main(){}

这样的文件,没有用 flex 还是 bison .

从 kernel.org 来的 2.1x.9x 版本 ,之前做工具链时,一定要加上 flex 和 bison .
回复 支持 反对

使用道具 举报

发表于 2006-3-4 22:00:59 | 显示全部楼层
各位请帮忙看看

我是按照
youbest 的大作
http://www.linuxsir.cn/bbs/showthread.php?t=244052

做的。
make 时出了问题。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2006-3-4 23:18:36 | 显示全部楼层
好象是一开始就出错,难道主系统上没有安装gcc?
是用LiveCD做的吗?
回复 支持 反对

使用道具 举报

发表于 2006-3-5 07:35:09 | 显示全部楼层
把 config.log 中间错误的那一段贴出来。。不然我们猜也擦不出什么
回复 支持 反对

使用道具 举报

发表于 2006-3-5 10:52:19 | 显示全部楼层
谢谢大家

Post by youbest
好象是一开始就出错,难道主系统上没有安装gcc?
是用LiveCD做的吗?


我用的是 liveCD 6.1.4,binutils2.16.1.tar.bz2

Post by 终极幻想
把 config.log 中间错误的那一段贴出来。。不然我们猜也擦不出什么?

config.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:595: checking host system type
configure:616: checking target system type
configure:634: checking build system type
configure:689: checking for a BSD compatible install
configure:742: checking whether ln works
configure:766: checking whether ln -s works
configure:1809: checking for gcc
configure:1922: checking whether the C compiler (gcc  ) works
configure:1938: gcc -o conftest    conftest.c  1>&5
configure:1964: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1969: checking whether we are using GNU C
configure:1978: gcc -E conftest.c
configure:1997: checking whether gcc accepts -g
configure:2064: checking for gnatbind
configure:2129: checking whether compiler driver understands Ada
configure:2162: checking how to compare bootstrapped objects
configure:2260: checking for correct version of gmp.h
configure:2273: gcc -c -g -O2   conftest.c 1>&5
configure:2263:17: gmp.h: No such file or directory
configure: In function `main':
configure:2267: error: `choke' undeclared (first use in this function)
configure:2267: error: (Each undeclared identifier is reported only once
configure:2267: error: for each function it appears in.)
configure:2267: error: parse error before "me"
configure: failed program was:
#line 2262 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

#if __GNU_MP_VERSION < 3
choke me
#endif

; return 0; }
configure:2786: checking for bison
configure:2821: checking for bison
configure:2856: checking for gm4
configure:2856: checking for gnum4
configure:2856: checking for m4
configure:2891: checking for flex
configure:2926: checking for flex
configure:2961: checking for makeinfo
configure:3607: checking for i686-pc-linux-gnu-ar
configure:3640: checking for ar
configure:3679: checking for i686-pc-linux-gnu-as
configure:3712: checking for as
configure:3751: checking for i686-pc-linux-gnu-dlltool
configure:3784: checking for dlltool
configure:3823: checking for i686-pc-linux-gnu-ld
configure:3856: checking for ld
configure:3895: checking for i686-pc-linux-gnu-nm
configure:3928: checking for nm
configure:3967: checking for i686-pc-linux-gnu-ranlib
configure:4000: checking for ranlib
configure:4039: checking for i686-pc-linux-gnu-windres
configure:4072: checking for windres
configure:4111: checking for i686-pc-linux-gnu-objcopy
configure:4144: checking for objcopy
configure:4183: checking for i686-pc-linux-gnu-objdump
configure:4216: checking for objdump
configure:4262: checking for i686-pc-linux-gnu-ar
configure:4295: checking for ar
configure:4334: checking for i686-pc-linux-gnu-as
configure:4367: checking for as
configure:4406: checking for i686-pc-linux-gnu-dlltool
configure:4439: checking for dlltool
configure:4478: checking for i686-pc-linux-gnu-ld
configure:4511: checking for ld
configure:4550: checking for i686-pc-linux-gnu-nm
configure:4583: checking for nm
configure:4622: checking for i686-pc-linux-gnu-ranlib
configure:4655: checking for ranlib
configure:4694: checking for i686-pc-linux-gnu-windres
configure:4727: checking for windres
configure:4812: checking whether to enable maintainer-specific portions of Makefiles
configure:4859: checking if symbolic links between directories work
回复 支持 反对

使用道具 举报

发表于 2006-3-5 10:56:32 | 显示全部楼层
验证一下你下载的那个 iso 是否正确。。。

试试用 binutils-2.16.1 替换 2.15.x.x.x。
回复 支持 反对

使用道具 举报

发表于 2006-3-5 11:15:23 | 显示全部楼层
Post by 终极幻想
验证一下你下载的那个 iso 是否正确。。。

试试用 binutils-2.16.1 替换 2.15.x.x.x。


我之前用liveCD里的binutils-2.15*不行才用的binutils-2.16.1的。
不过
binutils-2.16.1我是在
http://ftp.lfs-matrix.net/pub/lfs/lfs-packages/development/
下载的。验证码也对。

我下到别的机子上用FTP拖过来的时转换成bin了再拖过来。
回复 支持 反对

使用道具 举报

发表于 2006-3-5 12:47:45 | 显示全部楼层
是刚开始 还是第二次的?
回复 支持 反对

使用道具 举报

发表于 2006-3-5 13:15:55 | 显示全部楼层
Post by 终极幻想
是刚开始 还是第二次的?


我用VPC装的,每次不行我都重新删除分区再彼一时来一次。
回复 支持 反对

使用道具 举报

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

本版积分规则

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