module-init-tools 3.1 build error

Robert Connolly robert at linuxfromscratch.org
Thu Aug 25 15:35:38 PDT 2005


ld(1) uses /etc/ld.so.conf, plus /lib and /usr/lib are hardcoded in ld(1).

Module-init-tools links to libz with '-lz -static' by default, and so it looks 
for libz.a in /usr/lib. The nostatic patch makes it link normally/dynamically 
because we (at LFS) have our libz.so in /lib so its always available.

Looking at your error, the only thing I can think of is that the nostatic 
patch wasn't applied. Unless maybe there's more information you can add.

Does 'ls -l /lib/libz.so*' show a good symlink and the library?

Does 'readelf -d /lib/libz.so.1.2.2 | grep soname' show "libz.so.1"?

Also try removing the module-init-tools source, unpacking again, repatching, 
and retrying. And maybe run 'ldconfig', but you shouldn't have to.

robert

On August 25, 2005 09:32 am, Dan wrote:
> I think I used it, as I FBBG :), although not sure.
> Is there anything more I could do to prevent it? Where does it expect
> libz.so to be?
>
> --- Robert Connolly <robert at linuxfromscratch.org> wrote:
> > There is a nostatic patch for module-init-utils which uses
> > /lib/libz.so.
> >
> > robert
> >
> > On August 25, 2005 05:55 am, Hidden forU wrote:
> > > Hi,
> > >
> > > I'm building HLFS and even though I'm not sure, I think there's a
> >
> > bug
> >
> > > in zlib install.
> > >
> > > I get errors when trying to build module-init-tools 3.1 with zlib
> > > support: ( I know I should put whole listing but I've booted from
> >
> > LFS
> >
> > > livecd and don't have clipboard... )
> > > /usr/bin/ld: cannot find -lz
> > > collect2: ld returned 1 exit status
> > > make: *** [lsmod] Error 1
> > >
> > > I was trying to symlink libz.so almost everywhere, but didn't
> >
> > help.
> >
> > > When I searched .configure to find where it looks for libz
> >
> > library, I
> >
> > > read:
> > > # If zlib is required, libz must be linked static, modprobe is in
> > > # /sbin, libz is in /usr/lib and may not be available when it is
> >
> > run.
> >
> > > AFAIK hlfs doesn't install static library... When I looked into
> >
> > LFS,
> >
> > > static lib is installed.
> > >
> > > Can anyone help me? Should I install static lib too?
> > > TIA
> > >   D.
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam protection around
> > > http://mail.yahoo.com
> >
> > --
> > http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
> > FAQ: http://www.linuxfromscratch.org/faq/
> > Unsubscribe: See the above information page
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



More information about the hlfs-dev mailing list