lilo 发表于 2003-5-26 23:29:47

为什么我编译modules-init-tools会出错?

不管是0.9.11a还是12,最后都出现:

gcc -g -O2 -Wunused -Wall -Wcast-align -o insmod.static -static insmod.o
/usr/bin/ld:cannot find -lc
collect2: ld returned 1 exit status
make : *** 错误 1

这是怎么回事?
系统是MDK 9.1,由于编译的2.5.69启动结束要登陆时,键盘没反映,只能关电源,所以想先装这个看看。

Dragonfly 发表于 2003-5-27 01:45:01

i try 0.9.12 just now on my gentoo box, no problem at all.
u problem is because ld will use the library"libc.a",which will come from the standard search directories.
should in /usr/lib/libc.a. so check if u lib is ok.

Dragonfly 发表于 2003-5-27 01:54:12

anyother try, if u only meet problem here. u can try to modify that Makefile it generated, carefully remove all about insmod_static or insmod.static. then try again
basically, what u do is to ignore the insmod.static since most of the time we do not use it.

lilo 发表于 2003-5-27 08:45:35

没有libc.a.so这个文件,请问在哪个包里可以找到?

Dragonfly 发表于 2003-5-27 09:14:02

dragonfly lib # ls libc.a -l
-rw-r--r--    1 root   root      2517340 Dec4 12:49 libc.a

not libc.a.so.

where it is come form? i do not know, maybe glibc. i do not check it. anyway u need not taht insmod.static

lilo 发表于 2003-5-27 10:41:39

我删除Makefile里面有关insmod.static以后,make出现提示,说insmod.static needed by am_all,这个地方我不知道改哪里。

Dragonfly 发表于 2003-5-27 10:47:54

do u delete all about insmod static? not one place, but many.

maybe u should not try this method.

what linux u use? do u have glibc-devel-2.x.x-xx.x.rpm?

lilo 发表于 2003-5-27 11:30:31

我删除了关于insmod.static的所有地方啊,系统中装有glibc-devel-2.3.1-10mdk.rpm

lilo 发表于 2003-5-27 14:15:18

谢谢斑竹的细心解答,我已经成功修改Makefile文件,编译和安装成功了,但新内核仍然是到了登陆的时候就死机,光标还在闪动,必须按电源4秒才能关机。真搞不懂,启动过程比较快,也没出什么错啊(似乎还有一个提示QM。。什么的,没看清楚)

Dragonfly 发表于 2003-5-27 22:07:49

which new one u try?

lilo 发表于 2003-5-28 00:03:59

用的是2.5.69,config文件是你贴出来的,改了CPU类型,增加broadcom 1000M网卡模块和ATI raden驱动。机器是DELL Latitud D600, Pentium M 1.4G。每次都是启动到login提示就没反应了。键盘死掉,要长按电源键才可以关机。奇怪的是从此我的2.4.20启动可以用ACPI了,只是KDE里电池检测一点都不准。

Dragonfly 发表于 2003-5-28 00:24:01

compile new kernel does not have any impact one other one. maybe u mess them up?
ls -l /usr/src and post here.
latitud , a cute one. hehe. if come to keyboard and die, i wonder if it is u kbd problem. is there any other error reported before come to login?

lilo 发表于 2003-5-28 09:13:56

内核肯定没有搞错,因为我现在就是用旧内核。以下是我的lilo.conf :

boot=/dev/hda
map=/boot/map
vga=normal
default="WindowsXP"
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
        label="linux"
        root=/dev/hda2
        initrd=/boot/initrd.img
        append="quiet devfs=mount acpi=on"
        vga=788
        read-only
image=/boot/vmlinuz-2.5.69
        label="NewLinux"
        root=/dev/hda2
        initrd=/boot/initrd-2.5.69.img
        append="quiet devfs=mount acpi=off"
        read-only
image=/boot/vmlinuz
        label="failsafe"
        root=/dev/hda2
        initrd=/boot/initrd.img
        append="failsafe devfs=nomount acpi=off"
        read-only
other=/dev/hda1
        label="WindowsXP"
        table=/dev/hda

Dragonfly 发表于 2003-5-28 10:56:10

no idea, hehe.
页: [1]
查看完整版本: 为什么我编译modules-init-tools会出错?