LinuxSir.cn,穿越时空的Linuxsir!

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

在进行glibc-cvs+nptl的编译过程中出现了问题?

[复制链接]
 楼主| 发表于 2003-12-27 15:23:43 | 显示全部楼层
Chapter 6 -- Installing sanitized kernel headers
------------------------------------------------

Right after installing Glibc, untar the glibc-kernheaders tarball
and cd to the extracted usr/include directory.

          cp -R asm-i386 /usr/include/asm   
          cp -R linux /usr/include
在nptl的hiting里面曾经有这一步,你应该也是按照这里面的提示所做的,如果你也有做的话,那么就是用了2.4的内核 头文件了。还有就是在编译glibc的时候,所用的那个glibc-kernheaders-2.4-8.41.tar.bz2
也是2.4的内核头文件。glibc现在还是要用到2.4内核头文件才能通过的。
Chapter 6 -- Installing 2.6 kernel headers
------------------------------------------

It is agreed that user space shouldn't use kernel headers, but use a
set of sanitized headers such as distributions use instead. Glibc is an
exception to this rule, and it needs to be built against the most
recent headers to make use of new kernel features. So we'll install
them to a prefix other than /usr/include and instruct Glibc to look
for them there.

          make mrproper &&
          make include/linux/version.h &&
          make include/asm &&
          mkdir /usr/src/glibcheaders &&
          cp -HR include/asm /usr/src/glibcheaders &&
          cp -R include/asm-generic /usr/src/glibcheaders &&
          cp -R include/linux /usr/src/glibcheaders &&
          touch /usr/src/glibcheaders/linux/autoconf.h
这个就是安装2.4内核头文件。在编译glibc之间做的。
发表于 2003-12-27 16:10:09 | 显示全部楼层
上面那几步我都没做,因为根本就没看到那样的文档。我用的是lfs-5.0-cvs,没有任何关于2.6的提示,我只是把里面的gcc,glibc和kernel都换成了最新的
我没有看nptl的hiting,只是简单的把libc/linuxthreads目录删除,就会自动编译nptl的
发表于 2003-12-27 16:14:48 | 显示全部楼层
所以可以肯定,我没有引入任何2.4的header
发表于 2003-12-27 16:26:30 | 显示全部楼层
最初由 ftyh 发表
Chapter 6 -- Installing sanitized kernel headers
------------------------------------------------

Right after installing Glibc, untar the glibc-kernheaders tarball
and cd to the extracted usr/include directory.

          cp -R asm-i386 /usr/include/asm   
          cp -R linux /usr/include
在nptl的hiting里面曾经有这一步,你应该也是按照这里面的提示所做的,如果你也有做的话,那么就是用了2.4的内核 头文件了。还有就是在编译glibc的时候,所用的那个glibc-kernheaders-2.4-8.41.tar.bz2
也是2.4的内核头文件。glibc现在还是要用到2.4内核头文件才能通过的。
Chapter 6 -- Installing 2.6 kernel headers
------------------------------------------

It is agreed that user space shouldn't use kernel headers, but use a
set of sanitized headers such as distributions use instead. Glibc is an
exception to this rule, and it needs to be built against the most
recent headers to make use of new kernel features. So we'll install
them to a prefix other than /usr/include and instruct Glibc to look
for them there.

          make mrproper &&
          make include/linux/version.h &&
          make include/asm &&
          mkdir /usr/src/glibcheaders &&
          cp -HR include/asm /usr/src/glibcheaders &&
          cp -R include/asm-generic /usr/src/glibcheaders &&
          cp -R include/linux /usr/src/glibcheaders &&
          touch /usr/src/glibcheaders/linux/autoconf.h
这个就是安装2.4内核头文件。在编译glibc之间做的。


根据说明,这个是安装2.6内核头文件,安装到/usr/src/glibcheaders,专门供编译glibc使用的;所以glibc是可以使用2.6头文件编译通过的
而安装在默认路径/usr/include下面的才是2.4的内核,是供除了glibc之外的应用程序使用的,当然glibc也可以用这个2.4的headers,除非编译时使用了--with-kernel-header=/usr/src/glibcheaders
 楼主| 发表于 2003-12-27 17:04:39 | 显示全部楼层
哦,原来你没有去看linuxfromscratch.org里面的hints呀,看来你比较高。我是按照 hints里面说明进行的。里面所讲到的,就如我刚刚所写的,确实是用到了2.4的内核头文件。至于你的问题看起来这样我就没法了。不好意思了。自己再试试吧。呵呵。看看有没有哪个高手做过。
 楼主| 发表于 2003-12-28 00:50:25 | 显示全部楼层
最初由 solar 发表
根据说明,这个是安装2.6内核头文件,安装到/usr/src/glibcheaders,专门供编译glibc使用的;所以glibc是可以使用2.6头文件编译通过的
而安装在默认路径/usr/include下面的才是2.4的内核,是供除了glibc之外的应用程序使用的,当然glibc也可以用这个2.4的headers,除非编译时使用了--with-kernel-header=/usr/src/glibcheaders


兄弟说的没错。我没有仔细看清。这个是用2.6内核的头文件进行glibc的编译。
我刚刚又认真看了一下,因为想想又试了一下,所以重做了一下。现在回过头来又再看了一下,确实是如兄弟所说的没错。前几次做的时候都没有仔细看看。
发表于 2003-12-28 01:35:58 | 显示全部楼层
我也找来nptl的hinting看了一下,里面说要支持nptl是一定要2.6的内核才行,2.4的话要打很多补丁。而glibc只有使用2.6的头文件才能支持2.6的特性,所以要真正支持nptl是一定要用2.6头文件的

前面有一个错误,--with-kernel-header=/usr/src/glibcheaders 应该是 --with-headers=/usr/src/glibcheaders
 楼主| 发表于 2003-12-28 09:01:33 | 显示全部楼层
那是,那是。
但有一些软件在2.6内核头文件里面也是还要打patch,不然编译不了。
比如util-linux-2.12
发表于 2004-2-4 16:52:06 | 显示全部楼层
最初由 ftyh 发表
那是,那是。
但有一些软件在2.6内核头文件里面也是还要打patch,不然编译不了。
比如util-linux-2.12


不知道兄弟现在能否编译inetutils成功。
我现在老是遇到那个unistd.h错误,我对比了kernel-2.6,kernel-2.4及glibc-kernelheaders的unistd.h文件,发现只有glibc-kernelheaders有对revoke的声明。
发表于 2004-2-4 19:00:50 | 显示全部楼层
现在的inetutils可以呀。
我昨天刚刚编译了一个全新的,2.6内核文件的。可以编译成功。
就是那个util-linux-2.12我也实在是编译不过,只能用2.4内核头文件才能编译成功。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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