Problems compiling Perl LFS 5.0 chapter 5
marco at mctrex.net
Wed Feb 4 09:13:34 PST 2004
> On Tue, 3 Feb 2004, Marco Teeuwen wrote:
>> Hi guys,
>> can anybody tell me what's going wrong here? I'm using a set of
>> homegrown scripts to automate LFS compilation but I'm having trouble
>> compiling Perl. On some systems it works, on others it doesn't. The
>> host systems all use SuSE 8.2 or 9.0.
>> Use which C compiler? [cc]
>> cannot find -lc
>> collect2: ld returned 1 exit status
>> Uh-oh, the C compiler 'cc' doesn't seem to be working.
> Well, -lc translates into "link against libc.so". It should be present
> in /tools/lib. Trouble is, most of chapter 5 ought to have been linked
> against it, all the way from "locking in glibc".
>> gcc is installed, but it still complains about it. I think some RPM is
>> missing, but I can't seem to find out what it is.
>> Any help?
>> Marco Teeuwen
> You've said you are writing scripts, so my main assumption is that
> something in the scripts is wrong. Do you have /tools/lib/libc.so ?
> Exceptionally, it's an ascii ld script, if you cat it you can see the
> reference to /tools/lib/libc.so.6.
> If that's missing, you've got big problems. If it's present, have you
> linked against it up to now ? For example, does `ldd /tools/bin/bash'
> show it linking to /tools/lib/libncurses.so.5, /tools/lib/libdl.so.2,
> /tools/lib/libc.so.6, and /tools/lib/ld-linux.so.2 ?
> You're doing this on multiple boxes : when it works, have you
> successfully built chapter 6 or are you trying to do them all together ?
> If you have got past this, what is different about either your methods
> or the host installations ? They're your scripts, and only you know how
> you've used them, I'm trying to ask questions to get you to consider
> what might be involved. Do you have any conditional processing - I know
> it's dead easy to screw this up and be unaware until the odd case comes
> along. Good luck.
> I'd be _very_ surprised if this problem is caused by something missing
> on some of the hosts, perl is usually ok at checking for what it needs.
> Brighton tops UK Jedi league
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
I'm indeed missing /tools/lib/libc.so. Actually, I'm missing all the files
you suggested doing ldd against. The /tools/lib directory looks awfully
empty, just 6 files... I'm going to run the glibc and locking-glibc
scripts by hand to see if anything goes wrong. At least now I have a place
to look at.
The boxes that succeeded compiling have indeed passed chapter 6. But they
didn't have this problem. It might have to do with differences between
SuSE 8.2 and 9.0, but I'm just not sure what those differences might be.
The box I'm having problems with has a complement install of all
development packages, that's the unexpected about it. I'm going to check
the output of the glibc and locking-glibc scripts and see if anything goes
Can you tell me from which package the libraries you mentioned are? is
More information about the lfs-support