Bug #14151 | Adding --with-zlib-dir on FreeBSD 4.x causes build failure | ||
---|---|---|---|
Submitted: | 19 Oct 2005 20:26 | Modified: | 22 Jul 2007 17:53 |
Reporter: | Luke Hollins | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.0.15, 5.0-13-rc | OS: | FreeBSD (FreeBSD 4.7, 4.11) |
Assigned to: | Joerg Bruehe | CPU Architecture: | Any |
[19 Oct 2005 20:26]
Luke Hollins
[24 Oct 2005 15:22]
Valeriy Kravchuk
Thank you for a problem report. I've tried to repeat it on our FreeBSD 4.7 machine with 5.1.15 GA official sources. Everything looks just as you described. I've performed the following commands: gunzip < mysql-5.0.15.tar.gz | tar xvf - cd mysql-5.0.15 ./configure --with-zlib-dir=/usr --prefix=/usr/home/mysqldev/valeriy/dbs/5.0 make and got just the error messages you informed about: md5.c:71: syntax error before `PROTO_LIST' md5.c:72: syntax error before `PROTO_LIST' md5.c:74: syntax error before `PROTO_LIST' md5.c:127: syntax error before `*' md5.c: In function `my_MD5Init': md5.c:129: `context' undeclared (first use in this function) md5.c:129: (Each undeclared identifier is reported only once md5.c:129: for each function it appears in.) md5.c: At top level: md5.c:144: syntax error before `*' ... But please, explain, why you set /usr as --with-zlib-dir value? Do you really have zlib in /usr? If it was a mistake, then why do you expect that configure should produce a working builds with any arbitrary values?
[24 Oct 2005 21:42]
Luke Hollins
I do have zlib in /usr , I had the configure option --with-zlib-dir=/usr set because in the past I had another zlib the ldconfig search path and wanted MySQL to pickup the /usr copy.
[25 Oct 2005 11:18]
Valeriy Kravchuk
OK. In my case there was a zlib files in include/ and lib/ subdirectoriers of /usr, so it is a bug: gcc ... -I. -I. -I.. -I/usr/include -I../include -I../include -I. ... -c md5.c Here /usr/include is listed before the ../include, and /usr/include/md5.h is used always because of that.
[10 Apr 2006 16:03]
Christoper Thompson
************************************************************************** Please note the contents of #18294 This is much the same problem. Also, this 'zlib' problem needs a fix, as other packages that use MySQL, such as PHP, need the 'zlib libarys' correctly installed in MySQL. The reason PHP needs it, is the PHP (vers. 4.18+) applications that use LAMP & ZLIB, need it. Regards, **************************************************************************
[18 Jul 2007 12:17]
Joerg Bruehe
I don't have a BSD available locally, will try on Linux first. Starting based on MySQL 5.0.46 + first changes for 5.0.48 on a SuSE 10.2 machine with this setting: joerg@trift-lap:~> rpm -qa | grep zlib zlib-devel-1.2.3-33 zlib-1.2.3-33 joerg@trift-lap:~> rpm -ql zlib-1.2.3-33 zlib-devel-1.2.3-33 | xargs ls -ld lrwxrwxrwx 1 root root 13 1. Feb 19:41 /lib/libz.so.1 -> libz.so.1.2.3 -rwxr-xr-x 1 root root 72020 25. Nov 2006 /lib/libz.so.1.2.3 -rw-r--r-- 1 root root 9544 25. Nov 2006 /usr/include/zconf.h -rw-r--r-- 1 root root 66259 25. Nov 2006 /usr/include/zlib.h -rw-r--r-- 1 root root 6859 25. Nov 2006 /usr/include/zutil.h lrwxrwxrwx 1 root root 6 1. Feb 20:43 /usr/lib/libgz.a -> libz.a lrwxrwxrwx 1 root root 14 1. Feb 19:41 /usr/lib/libgz.so.1 -> /lib/libz.so.1 -rw-r--r-- 1 root root 87916 25. Nov 2006 /usr/lib/libz.a lrwxrwxrwx 1 root root 14 1. Feb 20:43 /usr/lib/libz.so -> /lib/libz.so.1 drwxr-xr-x 2 root root 4096 1. Feb 19:41 /usr/share/doc/packages/zlib -rw-r--r-- 1 root root 42928 18. Jul 2005 /usr/share/doc/packages/zlib/ChangeLog -rw-r--r-- 1 root root 5696 18. Jul 2005 /usr/share/doc/packages/zlib/README -rw-r--r-- 1 root root 9336 2. Jun 2003 /usr/share/doc/packages/zlib/algorithm.txt -rw-r--r-- 1 root root 2082 25. Nov 2006 /usr/share/man/man3/zlib.3.gz joerg@trift-lap:~>
[18 Jul 2007 16:44]
Joerg Bruehe
I cannot repeat the problem, using a setup as described in my previous entry. Regardless whether I use ./configure or ./configure --with-zlib-dir=/usr both the configure and the compile/link phase will access the zlib header and library files from /usr/include and /usr/lib. I will try to find a FreeBSD environment and try there, but I would also like to get feedback whether that is still a problem with current versions. (And yes, I am sorry we did not turn to this bug report sooner - all I can say is that we haven't been idle.)
[19 Jul 2007 10:48]
Joerg Bruehe
I was misled, because I had got the notion that the value of the "--with-zlib-dir=" option had not been honored, and my tests showed it was. I also checked FreeBSD 4.7 and found the value was honored, "./configure --with-zlib-dir=/usr" failed because the zlib installed on the system was too old, it is version 1.1 while the MySQL server requires 1.2 with function "zlibCompileFlags()". It took some time till I found that the real issue is not about using zlib, it is the conflict about selecting the proper file "md5.h" (the system-provided version in "/usr/include", or the one coming with the MySQL sources). BTW: The hint to bug 18294 is misleading, that really was a zlib issue.
[19 Jul 2007 17:32]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/31185 ChangeSet@1.2532, 2007-07-19 14:14:03+02:00, joerg@trift-lap.none +8 -0 Avoid the name conflict between the system-provided "md5.h" and the MySQL one by renaming "include/md5.h" to "include/my_md5.h". Fixes bug#14151.
[20 Jul 2007 12:02]
Joerg Bruehe
Expected to be included in 5.0.48 and 5.1.21 (subject to testing on all platforms).
[22 Jul 2007 9:41]
Bugs System
Pushed into 5.0.48
[22 Jul 2007 9:43]
Bugs System
Pushed into 5.1.21-beta
[22 Jul 2007 17:53]
Paul DuBois
No changelog entry needed.