Alex Greg wrote:
Hi all. I am trying to install mySql on Solaris 2.6. I am getting the
following error during 'make':
ld: fatal: library -lz: not found ld: fatal: File processing errors. No output written to
.libs/libmysqlclient.so.10.0.0
make[2]: *** [libmysqlclient.la] Error 1 make[2]: Leaving directory `/virtual/mysql-3.23.58/libmysql' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/virtual/mysql-3.23.58' make: *** [all] Error 2
(from http://curl.haxx.se/mail/archive-2003-11/0018.html)
"It means that it didn't find the zlib library at link time. The configure script found it and enabled the use of it, but when it came to linking it somehow doesn't find it.
You can fix this by setting up your LD_LIBRARY_PATH (or similar) to include the path of your zlib."
-- Alex
Presumably, you are using gcc to compile and Solaris ld to link. That's fine, but the problem is that Solaris ld doesn't looks in /usr/local/lib (I'm assuming that's where you put zlib) by default. You can set LD_LIBRARY_PATH, but that really isn't the Solaris way. It works, sometimes, but not quite in the same way as other systems (e.g. Linux). In any case, it isn't needed if you pass the proper flags. It's been a while since I built anything under Solaris 2.6, but my memory is that you need to set the -L and -R flags. So, assuming your zlib is in /usr/local/lib, you need to set
LDFLAGS="-L/usr/local/lib -R/usr/local/lib"
before you run configure. -L sets the link time library path and -R sets the run time library path. This way, both ld and the program you build will look in /usr/local/lib in addition to /usr/lib, without the need to set LD_LIBRARY_PATH. See `man ld` for details.
Michael
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]