Bug #18294 | 4.1.16/4.1.18 generic RPM packages provides wrong zlib dependancy | ||
---|---|---|---|
Submitted: | 17 Mar 2006 5:41 | Modified: | 6 May 2006 20:49 |
Reporter: | K Hopkins | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.18 | OS: | Linux (SuSE Linux (not SLES)) |
Assigned to: | Kent Boortz | CPU Architecture: | Any |
[17 Mar 2006 5:41]
K Hopkins
[20 Mar 2006 1:44]
K Hopkins
Experimenting with other -devel files # rpm -qlp /misc/linux/DataBase/MySQL/4.1.18/MySQL-devel-4.1.18-0.glibc23.i386.rpm > /tmp/generic-4.1.18.txt warning: /misc/linux/DataBase/MySQL/4.1.18/MySQL-devel-4.1.18-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 # rpm -qlp /misc/linux/DataBase/MySQL/sles9/MySQL-devel-standard-4.1.18-0.sles9.i586.rpm > /tmp/sles9-4.1.18.txt warning: /misc/linux/DataBase/MySQL/sles9/MySQL-devel-standard-4.1.18-0.sles9.i586.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 # diff /tmp/generic-4.1.18.txt /tmp/sles9-4.1.18.txt | grep -v /ndb/ 30,60d29 < /usr/include/mysql/ndb 78d46 < /usr/lib/mysql/libmerge.a 90,92c58,61 < /usr/share/doc/MySQL-devel-4.1.18 < /usr/share/doc/MySQL-devel-4.1.18/EXCEPTIONS-CLIENT < /usr/share/man/man1/mysql_config.1.gz --- > /usr/lib/mysql/libz.a > /usr/lib/mysql/libz.la > /usr/share/doc/packages/MySQL-devel-standard > /usr/share/doc/packages/MySQL-devel-standard/EXCEPTIONS-CLIENT Why does the -devel pack for RHEL & SLES contain libz.la but the generic rpm -devel does not?
[10 Apr 2006 4:05]
Christoper Thompson
G'Day folks, Just a small observation. This may help to solve the problem, however, you will need to test it on your platform. I have tested this on RH-9, RHEl-3 & WB-ENT-3. It seems to work. Specifically, you will notice both spec files (generic & RHEL) have two blocks that control compile options. The first, from the 4.18 generic; # The --enable-assembler simply does nothing on systems that does not # support assembler speedups. sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ CC=\"${CC:-$MYSQL_BUILD_CC}\" \ CXX=\"${CXX:-$MYSQL_BUILD_CXX}\" \ CFLAGS=\"${MYSQL_BUILD_CFLAGS:-$RPM_OPT_FLAGS}\" \ CXXFLAGS=\"${MYSQL_BUILD_CXXFLAGS:-$RPM_OPT_FLAGS \ -felide-constructors -fno-exceptions -fno-rtti \ }\" \ ./configure \ $* \ --enable-assembler \ --enable-local-infile \ --with-mysqld-user=%{mysqld_user} \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --prefix=/ \ --with-extra-charsets=complex \ --exec-prefix=%{_exec_prefix} \ --libexecdir=%{_sbindir} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --localstatedir=%{mysqldatadir} \ --infodir=%{_infodir} \ --includedir=%{_includedir} \ --mandir=%{_mandir} \ --enable-thread-safe-client \ --with-readline ; # Add this for more debugging support # --with-debug # Add this for MyISAM RAID support: # --with-raid " The second, also from the 4.18 generic; BuildMySQL "--enable-shared \ --without-openssl \ --with-berkeley-db \ --with-innodb \ --with-ndbcluster \ --with-raid \ --with-archive-storage-engine \ --with-csv-storage-engine \ --with-example-storage-engine \ --with-blackhole-storage-engine \ --with-embedded-server \ --with-comment=\"MySQL Community Edition - Max (GPL)\" \ --with-server-suffix='-Max'" make test-force || true For conveniance, we will refer to all RPM spec files as 'rpm spec' files. For further conveniance, we will refer to the blocks as 'mysql build' & 'max build', for want of a better reference. The difference for the zlib option in the 'rpm spec' files is one line in the second block, AKA the 'max build' section. This line is '--with-zlib-dir=bundled' This, according to the provided documentation, uses the bundled version of the zlib '1.2.3' version supplied with the source. The important thing is to only add this option to the second block, AKA the 'max build' section. This option can be manually added to the 'spec' file after you have unpacked the src rpm, but before you start the compile. Should you have problems with a binary, then the modified source spec file method, may be for you. One further note. As I have a need to develop custom versions, I include in the top of my 'rpm spec' file, a few custom defines, usually after the existing block of (%defines), like this example; %define mysql_ext --enable-assembler --enable-local-infile \ %define max_ext --with-zlib-dir=bundled --with-openssl --with-isam \ Then, in the required block, in this example, the second block, AKA the 'max build' section, we add our custom define, thus; BuildMySQL "--enable-shared \ --without-openssl \ --with-berkeley-db \ --with-innodb \ --with-ndbcluster \ --with-raid \ --with-archive-storage-engine \ --with-csv-storage-engine \ --with-example-storage-engine \ --with-blackhole-storage-engine \ --with-embedded-server \ --with-comment=\"MySQL Community Edition - Max (GPL)\" \ --with-server-suffix='-Max' %{max_ext} " Note: the quotation at the end of the line in the first example was moved down to the line below, in the second example. Exercise care when playing, missing silly little things can consume time and hurt your brain. The important thing to note is the two compile blocks often require seperate options, hence the use of two sperate defines. This solution should be universal and seems to work with all versions of RPM in version 4xx. So, if all and sundry having problems could take test the 'zlib = bundled' solution, via the source rpm solution, let's see if it fixes the problem. You may need to update youre existing zlib (http://zlib.net/) prior to installing 'mysql' on some platforms. Should this be the case, please document it & let the guys & girls at MySQL know. Regards,
[10 Apr 2006 15:52]
Christoper Thompson
************************************************************************** Please note this is an addendum to the previous message. This is what happens when you fail to check things, regardless of the reasons. ** Please note that the generic RPM 'spec file' is missing the required library paths for the 'zlib' librarys. They are built, but not installed. An examination of the RHEL-3 'spec file', compared to the generic version, will show what I mean. Specifically, at the bottom of the file, in the; ' '%files -n MySQL-devel%{server_suffix}' section, you will note the differnce between the generic version and a platform specific version. A simple long term solution is the judicous use of a few more defines, wrapped in an {if..endif} block. The short term, one off solution, is to "cut and paste" or otherwise manually add, the required lines into your 'spec file'. Please note that it is quite safe to install RPM source code from any linux RPM platform to any other, in particular, for comparision purposes. The real trouble only starts if you attempt an 'RPMBUILD', if the source RPM is not suited to your platform, SO, DON'T do that. This appears to be a universal problem, so a long term solution needs a more review and tested, universal solution. Meanwhile, the cut and paste solution should work on most platforms. I will note any further conditons and outcomes, based on mine. (RHEL-3 / WB-ent-3 / RH-9) I will be likley installing / testing CENTOS-4 over easter. That is around week (3) (April 2006). I will advise any adverse, or other, outcomes. Regards, **************************************************************************
[11 Apr 2006 20:46]
Aaron
Hi, I would just like to say that I made a bug report for the same issue, I think. I did not see this bug report. Here is what my (now closed) bug report said: Description: Compiling PHP with MySQL support does not work. It gives this error: grep: /usr/lib/mysql/libz.la: No such file or directory /bin/sed: can't read /usr/lib/mysql/libz.la: No such file or directory libtool: link: `/usr/lib/mysql/libz.la' is not a valid libtool archive make: *** [libphp5.la] Error 1 This has been brought up in other bug reports. Those bug reports have been closed because the bug has apparently been fixed, but it HAS NOT been fixed. I am using MySQL client/devel 4.1.18 and it does not work. If I downgrade to 4.1.15, it works flawlessly. The other bug reports are here: http://bugs.mysql.com/bug.php?id=15223 http://bugs.mysql.com/bug.php?id=16595 PLEASE fix this. How to repeat: Install the latest MySQL RPMs and try to compile PHP. I am using Fedora (Core 3 and Core 4)
[28 Apr 2006 23:28]
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/5694
[6 May 2006 20:27]
Aaron
Woohoo! This is fixed in 4.1.19! I can confirm it as I just tested it and all is well. Thanks guys!
[6 May 2006 20:49]
Hartmut Holzgraefe
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at http://www.mysql.com/downloads/