zq97_0 发表于 2003-10-12 23:20:22

是不是2.6的内核太新,导致很多程序无法编译????????

我已经把我的RH9内核升级为了2.6-test6,并且能正常用。我在升级后的同时,也将/usr/include内的文件和2.6-test6元代吗文件昨了相应的影射。现在的问题是当我编译一些从网上下的软件时,大部分软件在用2.6内核头文件时都会报错。导致无法完成编译。
是不是2.6的内核真的太新,现在的很多软件的元代吗和它不兼容。

1860ly 发表于 2003-10-13 09:17:03

不会吧 我很想升级一下试试啊~~~~我的也是rh9啊
你的显卡驱动还可以用吗???????

bart 发表于 2003-10-13 09:37:49

不应该把/usr/include下面的kernel部分link到运行的kernel下面。这一点普遍存在误解。正确的做法是:在/usr/include/{linux, asm}里面保留编译glibc时候使用的kernel header.详细原因可以参考:

I would suggest that people who compile new kernels should: - not have a single symbolic link in sight (except the one that the kernel build itself sets up, namely the "linux/include/asm" symlink that is only used for the internal kernel compile itself)

And yes, this is what I do. My /usr/src/linux still has the old 2.2.13 header files, even though I haven't run a 2.2.13 kernel in a _loong_ time. But those headers were what glibc was compiled against, so those headers are what matches the library object files.

And this is actually what has been the suggested environment for at least the last five years. I don't know why the symlink business keeps on living on, like a bad zombie. Pretty much every distribution still has that broken symlink, and people still remember that the linux sources should go into "/usr/src/linux" even though that hasn't been true in a _loong_ time.

-- by Linus

zq97_0 发表于 2003-10-13 09:57:50

楼上的意思是如想用2.6的头文件,就要在2.6下重译gcc和glibc啦?

bart 发表于 2003-10-13 15:50:39

why should you use 2.6 headers?

zq97_0 发表于 2003-10-14 20:45:53

总觉得在2.6的下面用2.4的头文件译的程序有的不舒服。再有,我也想在把我的gcc和glibc升升级。
--------------------------------------------------------------------

bart 发表于 2003-10-15 11:35:29

hoho, 原来是这样。其实我也一直有这种心理啊 :oops:

2.4到2.6的差别不说,就连2.4各个版本里面也有变化。比如,现在2.4.22多了crypto支持,要是不把/usr/include里面的kernel header改了,就没办法编译那些用到crypto的程序了(哪个?我还没见过 :lol: )。真想编译glibc算了...
可是,考虑一下重新编译升级glibc的后果吧,所有dynamic link到glibc的东西都要重新编译,(是不是啊?吓死我了,吓死我了...) 作为LFS用户,最怕就是这个了。
...
所以嘛,还是保留现状了,呵呵。(懒惰的借口)

conke 发表于 2003-10-15 15:34:30

You should re-compile glibc to use new kernelheader.

zq97_0 发表于 2003-10-15 20:12:58

考虑一下重新编译升级glibc的后果吧,所有dynamic link到glibc的东西都要重新编译,(是不是啊?吓死我了,吓死我了...) 作为LFS用户,最怕就是这个了。

_________________________________________________________________________
真的有这么糟。看来我的想想。

conke 发表于 2003-10-16 00:57:34

哈哈哈,你说呢?

smartyin 发表于 2003-10-16 15:27:39

不会吧,一般的程序应该没有问题的哈,只有那些与内核有关的,比如说涉及到内核模块的程序才会出问题阿!
我就遇到了PCTel的內猫驱动不能用的问题哈!
呵呵

zq97_0 发表于 2003-10-16 19:20:51

我想问一下,如果重译了glibc,正常情况下有几成的程序要重译(向对余完全安装的RH9)

conke 发表于 2003-10-17 01:08:18

从理论上讲都不需要重新编译--如果用与原系统上版本号相同的glibc源码包的话。因为那样生成的.so文件的版本也是一样的!虽然你已使用了新的kernelheaders!
如果出现某些应用程序因此而不能用的话,那不是glibc本身的问题,而是app与kernel的兼容性问题。

zq97_0 发表于 2003-10-17 09:12:53

谢谢大家了。我决定重译我的glibc,在2.6的下面用2.4的头文件译的程序不舒服。

FH 发表于 2003-10-18 12:48:01

glibc 一般都是带versioning的,不能跨主版本号使用,但跨副版本号向下兼容是可以的。另外、如果是使用redhat9的话,可以去rhn下载rawhide的nptl-devel 与nptl,以提高posix thread的效能。还要用上rawhide最新的glibc。这是没有问题的。不要随便编译glibc,特别是需要稳定性的系统。
页: [1] 2
查看完整版本: 是不是2.6的内核太新,导致很多程序无法编译????????