LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: myduron

用户lfs在第一遍编译Glibc-2.3.2出错,请帮忙!

[复制链接]
 楼主| 发表于 2003-11-27 07:47:24 | 显示全部楼层

make错误

In file included from ../linuxthreads/internals.h:29,
                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/unix/sysv/linux/i386/system.c:24:
../linuxthreads/descr.h:43:40: linuxthreads_db/thread_dbP.h: No such file or directory
In file included from ../linuxthreads/internals.h:29,
                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/unix/sysv/linux/i386/system.c:24:
../linuxthreads/descr.h:164: error: parse error before "td_eventbuf_t"
../linuxthreads/descr.h:164: warning: no semicolon at end of struct or union
../linuxthreads/descr.h:184: error: parse error before '}' token
../linuxthreads/descr.h:184: warning: empty declaration
../linuxthreads/descr.h: In function `thread_self':
../linuxthreads/descr.h:250: error: invalid use of undefined type `struct _pthread_descr_struct'
In file included from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
                 from ../sysdeps/unix/sysv/linux/i386/system.c:24:
../linuxthreads/internals.h: At top level:
../linuxthreads/internals.h:159: error: parse error before "__pthread_threads_events"
../linuxthreads/internals.h:159: warning: type defaults to `int' in declaration of `__pthread_threads_events'
../linuxthreads/internals.h:159: warning: data definition has no type or storage class
../linuxthreads/internals.h: In function `invalid_handle':
../linuxthreads/internals.h:178: error: dereferencing pointer to incomplete type../linuxthreads/internals.h:178: error: dereferencing pointer to incomplete type../linuxthreads/internals.h: In function `nonexisting_handle':
../linuxthreads/internals.h:183: error: dereferencing pointer to incomplete type../stdio-common/_itoa.h: At top level:
../stdio-common/_itoa.h:40: warning: inlining failed in call to `_itoa_word'
../stdio-common/_itoa.h:76: warning: called from here
make[2]: *** [/mnt/lfs/sources/lfs-packages/glibc-build/stdlib/system.o] Error 1make[2]: Leaving directory `/mnt/lfs/sources/lfs-packages/glibc-2.3.2/stdlib'
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/lfs-packages/glibc-2.3.2'
make: *** [all] Error 2

请帮我看看!!
发表于 2003-11-27 08:04:37 | 显示全部楼层
../linuxthreads/descr.h:43:40: linuxthreads_db/thread_dbP.h: No such file or directory
还是没有解压对.
 楼主| 发表于 2003-11-27 08:46:52 | 显示全部楼层

谢谢斑竹

我重新解压了,configure没有问题,但是make之后出来错误:

collect2: ld returned 1 exit status
make[1]: *** [/mnt/lfs/sources/lfs-packages/glibc-build/libc.so] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/lfs-packages/glibc-2.3.2'
make: *** [all] Error 2

make check之后的错误:

collect2: ld returned 1 exit status
make[2]: *** [/mnt/lfs/sources/lfs-packages/glibc-build/libc.so] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/lfs-packages/glibc-2.3.2/iconv'
make[1]: *** [iconv/tests] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/lfs-packages/glibc-2.3.2'
make: *** [check] Error 2

请问如何解决?
发表于 2003-11-27 08:51:54 | 显示全部楼层
贴错误信息,不是你这样贴的.
看一看lfs book里面关于怎样寻求帮助吧.
发表于 2003-11-27 11:06:28 | 显示全部楼层

打了补丁没?

http://www.linuxsir.cn/forum.php?mod=viewthread&tid=75333


Then I found that this command,
patch -Np1 -i ../glibc-2.3.2-sscanf-1.patch
must be run in the following dir:
root@box:/mnt/lfs/sources/glibc-2.3.2#

At first I run the that patch in this dir:
root@box:/mnt/lfs/sources/glibc-build#
It can't finished succeful!
发表于 2003-11-27 11:11:02 | 显示全部楼层

how to 贴错误信息

give more information is the way!
发表于 2003-11-27 11:12:14 | 显示全部楼层
其实啊,error1 error2那些都没用,关键是error1前面的两三行,你正好给省略了。
 楼主| 发表于 2003-11-27 11:34:03 | 显示全部楼层

谢谢大家!

我删除了glibc-2.3.2和glibc-build目录,重新操作,基本没有问题了。主要是粗心造成的,我想仔细一点应该没有问题!谢谢大家帮忙!

关于提问技巧,摘自原书:
----------------------------------------------

怎样寻求帮助

如果你在使用本书的过程中遇到了问题,并且这个问题不在FAQ(常见问题) (http://www.linuxfromscratch.org/faq)中,你将发现在Internet Relay Chat (IRC) 和邮件列表上的大多数人会乐于提供帮助。LFS邮件列表的概述可以在 Chapter 1 - Mailing lists. 中找到。为了便于我们解决你的问题,请在寻求帮助时提供尽可能多的信息。
要说明的事项

除了一个关于你所遇到的问题的简短解释,有一些重要的事项应在你寻求帮助时说明:

    *      你所使用的书的版本 (是 5.0),
    *      你用来创建LFS的主系统及其版本,
    *      带给你麻烦的包或某节,
    *      你收到的确切出错信息或症状,
    *      你是否没有用书中的方法。

(注意:如果你没有用书中的方法,并不意味着我们不会帮助你。毕竟,LFS就是关于选择的。说明这个情况将利于我们找到问题的其它可能原因。)
配置错误

当运行配置脚本(configure)时出现了错误,看一看config.log的最后一行,这个文件可能包含没有打印在屏幕上的出错信息。在寻求帮助时附带上相关的行。
编译错误

为了帮助我们找到错误的原因,屏幕输出和几个文件的内容是很有用的。从./configure开始到make运行时的屏幕输出都是有用的。不要盲目地附带上所有东西,但也不要只带上很少的东西。下面是一个make时屏幕输出的例子:

gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\"
-DLOCALEDIR=\"/mnt/lfs/usr/share/locale\" -DLIBDIR=\"/mnt/lfs/usr/lib\"
-DINCLUDEDIR=\"/mnt/lfs/usr/include\" -DHAVE_CONFIG_H -I. -I.
-g -O2 -c getopt1.c
gcc -g -O2 -static -o make ar.o arscan.o commands.o dir.o expand.o file.o
function.o getopt.o implicit.o job.o main.o misc.o read.o remake.o rule.o
signame.o variable.o vpath.o default.o remote-stub.o version.o opt1.o
-lutil job.o: In function `load_too_high':
/lfs/tmp/make-3.79.1/job.c:1565: undefined reference to `getloadavg'
collect2: ld returned 1 exit status
make[2]: *** [make] Error 1
make[2]: Leaving directory `/lfs/tmp/make-3.79.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/lfs/tmp/make-3.79.1'
make: *** [all-recursive-am] Error 2

在这种情况下,很多人只把下面的带上:

make [2]: *** [make] Error 1

以及后面部分。这些信息对于我们诊断问题是不够的,因为它只说了出了某种问题,并没有说出了什么问题。上面例子中的所有部分都应该附带上,因为它包含了所执行的命令和该命令的出错信息。

Eric S. Raymond写了有一篇很好的文章,关于如何从网上寻求帮助(不限于LFS),可以从 http://www.tuxedo.org/~esr/faqs/ ... 问题的方法。
测试套件问题

许多软件包都提供了测试套件,根据它们的重要程序,我们可能会推荐你运行。有的软件包肯定会产生错误,如果你遇到这种情况,请查看 LFS Wiki 页 http://wiki.linuxfromscratch.org ... 地继续下去。
发表于 2003-11-27 13:11:50 | 显示全部楼层
是啊,在编译出错以后,最好删除原来解压的源码,再重新解压。
看看:
http://lfs.linuxsir.cn/htdocs/faq 吧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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