| Bug #69158 | RPM Requires: missing packages on RHEL 6 (and probably 5) | ||
|---|---|---|---|
| Submitted: | 6 May 2013 16:30 | Modified: | 9 Jul 2013 13:59 |
| Reporter: | Simon Mudd (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Packaging | Severity: | S3 (Non-critical) |
| Version: | 5.5.23 | OS: | Any |
| Assigned to: | Balasubramanian Kandasamy | CPU Architecture: | Any |
[6 May 2013 16:31]
Simon Mudd
The patches here are against a mysql-5.5.23.spec file that had been patched to match 5.5.31.
[9 May 2013 7:07]
MySQL Verification Team
Hello Simon, Thanks for reporting this. Verified as described. Thanks, Umesh
[9 May 2013 7:08]
MySQL Verification Team
How to repeat:
-- Setup OL6 VM and rpm build environment ( install rpmbuild, gcc-c++ gperf readline-devel zlib-devel etc)
rpm -i MySQL-5.5.23-1.el6.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -ba mysql.5.5.23.spec
-rw-r--r-- pb2user/wheel 323 2012-03-30 00:37 mysql-5.5.23/INSTALL-WIN-SOURCE
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.9tMV6m
+ umask 022
+ cd /data/ushastry/rpmbuild/BUILD
+ cd mysql-5.5.23
+ set -eu
+ touch optional-files-devel
+ export PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/data/ushastry/bin
+ PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/data/ushastry/bin
+ export CC=gcc
+ CC=gcc
+ export CXX=gcc
+ CXX=gcc
+ export 'CFLAGS=-O2 -g'
+ CFLAGS='-O2 -g'
+ export 'CXXFLAGS=-O2 -g -felide-constructors -fno-exceptions -fno-rtti'
+ CXXFLAGS='-O2 -g -felide-constructors -fno-exceptions -fno-rtti'
+ export LDFLAGS=
+ LDFLAGS=
+ export CMAKE=cmake
+ CMAKE=cmake
+ export MAKE_JFLAG=
+ MAKE_JFLAG=
+ mkdir debug
+ cd debug
++ echo ' -O2 -g '
++ sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' -e 's/^ //' -e 's/ $//'
+ CFLAGS=-g
++ echo ' -O2 -g -felide-constructors -fno-exceptions -fno-rtti '
++ sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' -e 's/^ //' -e 's/ $//'
+ CXXFLAGS='-g -felide-constructors -fno-exceptions -fno-rtti'
+ cmake ../mysql-5.5.23 -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM -DCMAKE_BUILD_TYPE=Debug -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DFEATURE_SET=community '-DCOMPILATION_COMMENT=MySQL Community Server - Debug (GPL)' -DMYSQL_SERVER_SUFFIX=
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/gcc
-- Check for working CXX compiler: /usr/bin/gcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void *
-- Check size of void * - done
-- Looking for include files HAVE_LIBAIO_H
-- Looking for include files HAVE_LIBAIO_H - not found.
-- Looking for io_queue_init in aio
-- Looking for io_queue_init in aio - not found
CMake Error at cmake/build_configurations/mysql_release.cmake:126 (MESSAGE):
aio is required on Linux, you need to install the required library:
Debian/Ubuntu: apt-get install libaio-dev
RedHat/Fedora/Oracle Linux: yum install libaio-devel
SuSE: zypper install libaio-devel
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
Call Stack (most recent call first):
CMakeLists.txt:96 (INCLUDE)
-- Configuring incomplete, errors occurred!
error: Bad exit status from /var/tmp/rpm-tmp.9tMV6m (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.9tMV6m (%build)
[27 Jun 2013 13:30]
Balasubramanian Kandasamy
Thank you for the bug report. This issue has been fixed now.
[9 Jul 2013 13:59]
Paul DuBois
Noted in 5.5.33 changelog. RPM source packages did not list libaio-devel as a dependency, causing builds to fail.

Description: I try to rebuild a patched MySQL 5.5.23.src.rpm and get build errors during the build. It seems the following packages are not included in the RPM BuildRequires: section: cmake libaio-devel This can break auto-build environments as the required Build packages can be queried and installed as needed so missing these is not helpful, even if manually installing the needed packages can be done pretty easily. How to repeat: Using a minimal installed system try to build MySQL (on CentOS/RHEL 6). Notice how the build starts and only later you get a message like this: For cmake: .... + cmake ../mysql-5.5.23 -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM -DCMAKE_BUILD_TYPE=Debug -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DFEATURE_SET=community '-DCOMPILATION_COMMENT=MySQL Community Server - Debug (GPL)' -DMYSQL_SERVER_SUFFIX= /home/sjmudd/RPM/TMP/rpm-tmp.uf02Fd: line 90: cmake: command not found error: Bad exit status from /home/sjmudd/RPM/TMP/rpm-tmp.uf02Fd (%build) libaio-devel: -- Looking for io_queue_init in aio -- Looking for io_queue_init in aio - not found CMake Error at cmake/build_configurations/mysql_release.cmake:126 (MESSAGE): aio is required on Linux, you need to install the required library: Debian/Ubuntu: apt-get install libaio-dev RedHat/Fedora/Oracle Linux: yum install libaio-devel SuSE: zypper install libaio-devel If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake. Suggested fix: 1. Please consider adjusting the spec file so that these Build dependencies are made more explicit. 2. If possible avoid creating a different spec file name with each new MySQL version as the changes made from one release to another are harder to track. You have this all under source control so tracking changes in the spec file between 5.5.23 and say 5.5.31 should not be difficult. The following seems to help for CentOS 6: # # Macros we use which are not available in all supported versions of RPM @@ -167,7 +167,7 @@ %if "%rhelver" == "6" %define distro_description Red Hat Enterprise Linux 6 %define distro_releasetag rhel6 - %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel + %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools %else %{error:Red Hat Enterprise Linux %{rhelver} is unsupported}