ld error trying to compile modutils-2.4.21-18.src.rpm or module-init-tools-0.9.12-pre1.tar.gz
James McDonald
james
Mon May 17 11:47:03 PDT 2004
Folks.
I am having trouble compiling a new set of modutils for my mandrake 9 box
I have been trying to compile a 2.5.68 series kernel and have found that
the the module utilities have changed from the 2.4.x series.
I am running glibc-2.3.2 compiled and installed in /opt
The following error appears when attempting to compile
module-init-tools-0.9.12-pre1 and the modutils src.rpm.
gcc -g -O2 -Wunused -Wall -Wcast-align -L/opt/lib -L/usr/lib -L=/lib
-L=/lib/i686 -o insmod.static -static insmod.o
/opt/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [insmod.static] Error 1
I didn't get much joy from a google but the man page of ld shows that
the -lc is looking for libc.a which is a statically linked library I
cannot find anywhere on my system
man ld {
ld -o <output> /lib/crt0.o hello.o -lc
This tells ld to produce a file called output as the result of
linking
the file "/lib/crt0.o" with "hello.o" and the library "libc.a",
which
will come from the standard search directories. (See the
discussion of
the -l option below.)
}
Can anyone enlighten me as to what I have to do to get libc.a on my
system and or if I have to recompile glibc to produce it (which I don't
think I do because it doesn't exist in the standard mdk9.0 rpms)?
Much appreciated.
James McDonald
More information about the Linux-users
mailing list