-lz & -lgz

-lz & -lgz

Post by Dave K » Sun, 21 Oct 2001 07:24:58



I'm trying to install the DBD::mysql Perl module, but I'm getting an
error I'm not sure how to deal with.  They have to do with the linker
flags -lz and -lgz.

I was not able to find either libz or libgz at the Debian packages
site.  A Google search was no help.  Where can I find these libraries,
in either .deb or tar.gz/.tgz form?

I assume that these flags refer to libz and libgz, but I've come
across stuff to suggest that -lz really refers to zlib, not libz.
Which is it?

Thanks,

Dave

P.S. Below is the full output from perl Makefile.PL and make.

This is an experimental version of DBD::mysql. For production
environments you should prefer the Msql-Mysql-modules.

I will use the following settings for compiling and testing:

  testpassword  (default) =
  testhost      (default) =
  testuser      (default) =
  nocatchstderr (default) = 0
  libs          (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz
  cflags        (guessed) = -I/usr/local/mysql/include
  testdb        (default) = test

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Note (probably harmless): No library found for -lgz
Using DBI 1.20 installed in /usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI
Writing Makefile for DBD::mysql

make:

cc -c -I/usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI -I/usr/local/mysql/include -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.0902\" -DXS_VERSION=\"2.0902\" -fpic -I/usr/local/lib/perl5/5.6.1/i586-linux/CORE  dbdimp.c
cc -c -I/usr/local/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBI -I/usr/local/mysql/include -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"2.0902\" -DXS_VERSION=\"2.0902\" -fpic -I/usr/local/lib/perl5/5.6.1/i586-linux/CORE  mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/local/mysql/lib:/usr/lib" /usr/local/bin/perl myld cc  -shared -L/usr/local/lib dbdimp.o mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so   -L/usr/local/mysql/lib -lmysqlclient -lz  
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status

An error occurred while linking the DBD::mysql driver. The error
message seems to indicate that you don't have a libz.a, libgz.a,
libz.so or libgz.so. This is typically resolved by:

1.) You may try to remove the -lz or -lgz flag from the libs list
    by using the --libs switch for "perl Makefile.PL".
2.) On Red Hat Linux install libz-devel
3.) On other systems, please contact the mailing list


For further hints, see INSTALL.html, section Linker flags.
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1

 
 
 

-lz & -lgz

Post by Juergen Hein » Sun, 21 Oct 2001 07:38:12



> I'm trying to install the DBD::mysql Perl module, but I'm getting an
> error I'm not sure how to deal with.  They have to do with the linker
> flags -lz and -lgz.

> I was not able to find either libz or libgz at the Debian packages
> site.  A Google search was no help.  Where can I find these libraries,
> in either .deb or tar.gz/.tgz form?

> I assume that these flags refer to libz and libgz, but I've come
> across stuff to suggest that -lz really refers to zlib, not libz.
> Which is it?

[-]
-lX means [lib]X[.a|.so|.sa|...]

I don't use Debian, but the best may be to read the instructions
as DBD::mysql might require a specific version.

BTW the library name is lib[g]z but the package's name is zlib,
Juergen

--
\ Real name     : Juergen Heinzl                \       no flames      /


 
 
 

-lz & -lgz

Post by Erik Max Franci » Sun, 21 Oct 2001 08:00:38



> LD_RUN_PATH="/usr/local/mysql/lib:/usr/lib" /usr/local/bin/perl myld
> cc  -shared -L/usr/local/lib dbdimp.o mysql.o  -o
> blib/arch/auto/DBD/mysql/mysql.so   -L/usr/local/mysql/lib
> -lmysqlclient -lz
> /usr/bin/ld: cannot find -lz

It means it can't find libz.a/libz.so.  Install it, or provide it with
the right path (via the -L option) and try again.

--

 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Age ain't nothing but a number
\__/ Aaliyah
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!

 
 
 

-lz & -lgz

Post by chris alber » Sun, 21 Oct 2001 23:55:05



> I'm trying to install the DBD::mysql Perl module, but I'm getting an
> error I'm not sure how to deal with.  They have to do with the linker
> flags -lz and -lgz.

> I was not able to find either libz or libgz at the Debian packages
> site.  A Google search was no help.  Where can I find these libraries,
> in either .deb or tar.gz/.tgz form?

> I assume that these flags refer to libz and libgz, but I've come
> across stuff to suggest that -lz really refers to zlib, not libz.
> Which is it?

> Thanks,

David,
http://packages.debian.org/stable/devel/zlib1g-dev.html

Chris