Bug #54379 --with-zlib-dir configure option not lib64 aware
Submitted: 9 Jun 2010 18:56 Modified: 3 Oct 2014 11:02
Reporter: Todd Rinaldo Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1.47 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[9 Jun 2010 18:56] Todd Rinaldo
Description:
When trying to build mysql against an external zlib, you're only asked to provide a prefix. configure only checks $prefix/lib for zlib. This is a broken assumption on systems that put their 64 bit libraries in lib64. 

How to repeat:
from centos 5 64bit...
./configure --with-zlib-dir=/usr

Suggested fix:
configure should instead ask for zlib include and lib paths separately and/or look in lib64 and lib32 directories. The first option is probably more flexible.
[9 Jun 2010 19:01] Todd Rinaldo
A work around to fool configure is to touch $prefix/lib/libz.a, but it's kinda an evil fix. To be honest, I'd prefer configure simply trust that the provided CFLAGS will allow configure and make to link to zlib as needed. I'm not sure why this is customized in this way. Is there a reason for it?

Thanks.
[10 Jun 2010 5:26] Sveta Smirnova
Thank you for the report.

Verified as described by reading code: configure doesn't search for zlib in lib64 if no CPPFLAGS/LIBS given.

> To be honest, I'd prefer configure simply trust that the provided CFLAGS will allow
configure and make to link to zlib as needed.

You can do it.
[10 Jun 2010 15:36] Todd Rinaldo
> Verified as described by reading code: configure doesn't search for zlib in
> lib64 if no CPPFLAGS/LIBS given.
The point of the search, I assume is to determine if a lib/rpath needs to be added at compile, correct?

> > To be honest, I'd prefer configure simply trust that the provided CFLAGS will allow
> configure and make to link to zlib as needed.
> You can do it.

Yes but only if I first fool this test by touching libz.a in the lib directory.
[3 Oct 2014 10:02] Hartmut Holzgraefe
autotools specific, so can be closed?
[3 Oct 2014 11:01] Ståle Deraas
Posted by developer:
 
Thanks Hartmut for pointing out.