I'm having a problem making the mysql module for ser. When I type make modules everything compiles fine except for the mysql.so, it returns an error saying: " /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status" If I remove the -lz it makes but can't be loaded correctly by ser. Any help would be greatly appreciated.
Below is the makefile I'm using:
# $Id: Makefile,v 1.22 2003/09/16 18:55:07 janakj Exp $ # # WARNING: do not run this directly, it should be run by the master Makefile
include ../../Makefile.defs auto_gen= NAME=mysql.so
# mysql.h locations (freebsd,openbsd solaris) DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \ -I$(LOCALBASE)/mysql/include -I/usr/pkg/include
# libmysqlclient locations on RH/Suse, Solaris /OpenBSD, FreeBSD # (Debian does the right thing and puts it in /usr/lib) LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \ -L$(LOCALBASE)/mysql/lib/mysql/ -L/usr/pkg/lib/mysql \ -L$(LOCALBASE)/mysql/lib \ -lmysqlclient -lz
include ../../Makefile.modules
Thanks for any help, Zack Medlin
Hi Zack,
most probably you don't have the zlib installed or it's not into your system ld.cache. This library is required for mysql module compilation.
Best regards, Marian
Medlin, Zack wrote:
I'm having a problem making the mysql module for ser. When I type make modules everything compiles fine except for the mysql.so, it returns an error saying: " /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status" If I remove the -lz it makes but can't be loaded correctly by ser. Any help would be greatly appreciated.
Below is the makefile I'm using:
# $Id: Makefile,v 1.22 2003/09/16 18:55:07 janakj Exp $ # # WARNING: do not run this directly, it should be run by the master Makefile
include ../../Makefile.defs auto_gen= NAME=mysql.so
# mysql.h locations (freebsd,openbsd solaris) DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \ -I$(LOCALBASE)/mysql/include -I/usr/pkg/include
# libmysqlclient locations on RH/Suse, Solaris /OpenBSD, FreeBSD # (Debian does the right thing and puts it in /usr/lib) LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \ -L$(LOCALBASE)/mysql/lib/mysql/ -L/usr/pkg/lib/mysql \ -L$(LOCALBASE)/mysql/lib \ -lmysqlclient -lz
include ../../Makefile.modules Thanks for any help, Zack Medlin
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
That's not the error I usually get but what I have found helps quite a bit for me is symlink the mysql header files into /usr/include. Most config scripts and make files don't look in /usr/inlcude/mysql. To fix it simply do the following:
cd /usr/include ln -s mysql/* .
Like I said it may not solve your problem but it might help or get rid of the next one you may run into. Good luck
----------------------------------------
Michael Shuler
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] On Behalf Of Medlin, Zack Sent: Monday, November 15, 2004 1:18 PM To: serusers@lists.iptel.org Subject: [Serusers] Ser mysql Make error
I'm having a problem making the mysql module for ser. When I type make modules everything compiles fine except for the mysql.so, it returns an error saying: " /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status" If I remove the -lz it makes but can't be loaded correctly by ser. Any help would be greatly appreciated.
Below is the makefile I'm using:
# $Id: Makefile,v 1.22 2003/09/16 18:55:07 janakj Exp $ # # WARNING: do not run this directly, it should be run by the master Makefile
include ../../Makefile.defs auto_gen= NAME=mysql.so
# mysql.h locations (freebsd,openbsd solaris) DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/include/mysql \ -I$(LOCALBASE)/mysql/include -I/usr/pkg/include
# libmysqlclient locations on RH/Suse, Solaris /OpenBSD, FreeBSD # (Debian does the right thing and puts it in /usr/lib) LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \ -L$(LOCALBASE)/mysql/lib/mysql/ -L/usr/pkg/lib/mysql \ -L$(LOCALBASE)/mysql/lib \ -lmysqlclient -lz
include ../../Makefile.modules
Thanks for any help, Zack Medlin