找回密码
 注册
查看: 746|回复: 1

LFS5.1下module-init-tools编译问题

[复制链接]
发表于 2004-6-11 18:22:57 | 显示全部楼层 |阅读模式
刚安装完成了LFS5.1,启动的时候发现2.4.26的内核编译的不行,读fstab的时候提示不支持ext3和vfat,明明是编译进内核了的。无奈,只好用以前在rhl9编译的2.6.0-test11,没问题了。于是我想安装2.6.6,不过在module-init-tools-0.9.14的make时候,出现下列错误[code:1]In file included from moduleops.c:15:
moduleops_core.c: In function `calculate_deps32':
moduleops_core.c:118: error: `STT_REGISTER' undeclared (first use in this function)
moduleops_core.c:118: error: (Each undeclared identifier is reported only once
moduleops_core.c:118: error: for each function it appears in.)
In file included from moduleops.c:23:
moduleops_core.c: In function `calculate_deps64':
moduleops_core.c:118: error: `STT_REGISTER' undeclared (first use in this function)
make: *** [moduleops.o] Error 1[/code:1]
不知道是缺少什么头文件。此module-init-tools在rhl9下编译没问题,请指导,谢谢。
 楼主| 发表于 2004-6-29 13:08:49 | 显示全部楼层
Now I am pleased with my resolution.

I have installed LFS 5.1 and Gnome2.6 a few weeks ago.
I tried to install module-init-tools-0.9.14, for the purpose of fixing the problem that my ATI 128 rage module cannot be loaded automatically under the kernel 2.6.0. Then I was installing the kernel again. However, during making the package, I got the errors as below:

-----------------------------------------------------------------------------------------------
source='moduleops.c' object='moduleops.o' libtool=no \
depfile='.deps/moduleops.Po' tmpdepfile='.deps/moduleops.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"module-init-tools\" -DVERSION=\"0.9.14\"  -I. -I.     -g -O2 -Wunused -Wall -Wcast-align -c `test -f 'moduleops.c' || echo './'`moduleops.c
In file included from moduleops.c:15:
moduleops_core.c: In function `calculate_deps32':
moduleops_core.c:118: error: `STT_REGISTER' undeclared (first use in this function)
moduleops_core.c:118: error: (Each undeclared identifier is reported only once
moduleops_core.c:118: error: for each function it appears in.)
In file included from moduleops.c:23:
moduleops_core.c: In function `calculate_deps64':
moduleops_core.c:118: error: `STT_REGISTER' undeclared (first use in this function)
make: *** [moduleops.o] Error 1
------------------------------------------------------------------------------------------------

Here I noticed the error 'STT_REGISTER' so that I looked it up into some relative *.h files (e.g files in /usr/include), but no such string. Ok, using the command:

----------------------------------------
for i in /usr/include/*.h; do
grep 'STT' $i
done
-----------------------------------------

I got some files contianing the STT. One of these files was elf.h, in which at the line 1138, there was:

---------------------------------------------------------------------------------------------------
1138 #define STT_SPARC_REGISTER      13      /* Global register reserved to a pp. */
---------------------------------------------------------------------------------------------------

I was doubt about this line. So I opened the same file under the Red Hat Linux 9, the line was:

------------------------------------------------------------------------------------------------
1125 #define STT_REGISTER      13      /* Global register reserved to a pp. */
------------------------------------------------------------------------------------------------

So I backupped the elf.h under the LFS, then changed then line as that in RHL. Now complied again, no errors.
回复

使用道具 举报

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

本版积分规则

GMT+8, 2025-2-15 12:43 , Processed in 0.020475 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

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