On 10/14/07, Walter Barnes <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm trying to install the latest version of pciutils and it doesn't seem to 
> like my installation of zlib. Here's the log output:
>
> Checking for zlib support... yes (auto-detected)
> <snip>
> cc -lz lspci.o common.o lib/libpci.a -o lspci
> lib/libpci.a(names.o): In function `pci_load_name_list':
> names.c:(.text+0x4e1): undefined reference to `gzopen'

That's unfortunate. In pciutils, the automatic make generated
compiling/linking commands are used. What happens is that it does
something like this:

$(CC) $(LDFLAGS) objects -o name

The problem is that the configuration puts -lz in LDFLAGS. Since it
comes on the command line before the objects, the linker thinks it's
not needed and prunes it. If it were to be listed after libpci.a, the
linker would see that it's needed (to provide gzopen, etc.) and keep
it.

As a workaround, try this:

make PREFIX=/usr LDLIBS=-lz

That properly adds libraries just before the -o part. If that helps,
I'll try to poke the maintainer to fix that up better.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to