# Percona MySQL RPM Build - issue with numerous NOT FOUND modules

**URL:** <https://forums.percona.com/t/percona-mysql-rpm-build-issue-with-numerous-not-found-modules/3408>\
**Category:** Other MySQL® Questions\
**Created:** [April 17, 2014, 1:01am UTC](https://forums.percona.com/t/percona-mysql-rpm-build-issue-with-numerous-not-found-modules/3408 "2014-04-17T01:01:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chern](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Chern](https://forums.percona.com/u/Chern)\
**Post date:** [April 17, 2014, 1:01am UTC](https://forums.percona.com/t/percona-mysql-rpm-build-issue-with-numerous-not-found-modules/3408/1 "2014-04-17T01:01:31Z")

</div>

Hi,

I am new to the rpmbuild process and I’d like to build a RPM (using a rpmbuild) for the Percona MySQL 5.6.16 source codes and I obtained the source from this URL:  
[url][http://www.percona.com/downloads/[/url]](http://www.percona.com/downloads/%5B/url%5D) → select Percona Server version 5.6

I attempted to execute the RPM build using this command below:  
rpmbuild -bb percona-server.spec

However, from the results of the rpmbuild showed that there are “NOT FOUND” messages for numerous modules such as pthread\_attr\_\*, HAVE\_FLOATING\_H, HAVE\_NDIR\_H, HAVE\_IEEEFP\_H. Sample error messages listed below:  
– Looking for kqueue - not found  
– Looking for HAVE\_IEEEFP\_H - not found  
– Looking for TIOCSTAT - not found  
– Looking for FIONREAD - not found  
– Looking for EVFILT\_TIMER - not found  
– Looking for netinet/in6.h - not found  
– Looking for mbscmp - not found  
– Looking for strvis - not found  
– Looking for strunvis - not found

The generated script from the RPM build process produced a “Bad exit status” i.e.  
“RPM build errors:  
Bad exit status from /var/tmp/rpm-tmp.iTzX0v (%install)”

Could anyone help point out where I can obtain a complete source for 5.6.16 with all dependent modules available? And is there a more efficient to incorporate these modules instead of having to download and install them one at a time?

Also for those missing modules above, what is the syntax for including them into the spec file?

Thanks very much.

---

<div class="post-metadata">

**Author:** ![Chern](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Chern](https://forums.percona.com/u/Chern)\
**Post date:** [April 17, 2014, 1:05am UTC](https://forums.percona.com/t/percona-mysql-rpm-build-issue-with-numerous-not-found-modules/3408/2 "2014-04-17T01:05:02Z")

</div>

Here’s the generated script from the rpmbuild process:

#!/bin/sh

RPM\_SOURCE\_DIR=“/root/rpmbuild/SOURCES”  
RPM\_BUILD\_DIR=“/root/rpmbuild/BUILD”  
RPM\_OPT\_FLAGS=“-O2 -g -pipe -Wall -Wp,-D\_FORTIFY\_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc”  
RPM\_ARCH=“ppc64”  
RPM\_OS=“linux”  
export RPM\_SOURCE\_DIR RPM\_BUILD\_DIR RPM\_OPT\_FLAGS RPM\_ARCH RPM\_OS  
RPM\_DOC\_DIR=“/usr/share/doc”  
export RPM\_DOC\_DIR  
RPM\_PACKAGE\_NAME=“Percona-Server-56”  
RPM\_PACKAGE\_VERSION=“5.6.16”  
RPM\_PACKAGE\_RELEASE=“64”  
export RPM\_PACKAGE\_NAME RPM\_PACKAGE\_VERSION RPM\_PACKAGE\_RELEASE  
LANG=C  
export LANG  
unset CDPATH DISPLAY ||:  
RPM\_BUILD\_ROOT=“/root/rpmbuild/BUILDROOT/Percona-Server-56-5.6.16-64.ppc64”  
export RPM\_BUILD\_ROOT

PKG\_CONFIG\_PATH=“/usr/lib64/pkgconfig:/usr/share/pkgconfig”  
export PKG\_CONFIG\_PATH

set -x  
umask 022  
cd “/root/rpmbuild/BUILD”  
[“$RPM\_BUILD\_ROOT” != “/”] && rm -rf “${RPM\_BUILD\_ROOT}”  
mkdir -p `dirname "$RPM_BUILD_ROOT"`  
mkdir “$RPM\_BUILD\_ROOT”

cd ‘percona-server-5.6.16-64.2’  
LANG=C  
export LANG  
unset DISPLAY

RBR=$RPM\_BUILD\_ROOT  
MBD=$RPM\_BUILD\_DIR/percona-server-5.6.16-64.2

# Ensure that needed directories exists

install -d $RBR/etc/{logrotate.d,init.d}  
install -d $RBR/var/lib/mysql/mysql  
install -d $RBR/usr/share/mysql-test  
install -d $RBR/usr/share/percona-server/SELinux/RHEL4  
install -d $RBR/usr/include  
install -d $RBR/usr/lib64  
install -d $RBR/usr/share/man  
install -d $RBR/usr/sbin  
install -d $RBR/usr/lib64/mysql/plugin

(  
cd $MBD/release  
make DESTDIR=$RBR benchdir\_root=/usr/share install  
d=“`pwd`”  
cd $MBD/UDF  
make DESTDIR=$RBR benchdir\_root=/usr/share install  
cd “$d”  
)

# Install all binaries

(  
cd $MBD/release  
make DESTDIR=$RBR install  
)

# FIXME: at some point we should stop doing this and just install everything

# FIXME: directly into /usr/lib64/mysql - perhaps at the same time as renaming

# FIXME: the shared libraries to use libmysql\*-$major.$minor.so syntax

mv -v $RBR//usr/lib64/\*.a $RBR//usr/lib64/mysql/

# Install logrotate and autostart

install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql  
install -m 755 $MBD/release/support-files/mysql.server $RBR/etc/init.d/mysql

# Delete the symlinks to the libraries from the libdir. These are created by

# ldconfig(8) afterwards.

rm -f $RBR/usr/lib64/libmysqlclient\*.so.18

# Create a symlink “rcmysql”, pointing to the init.script. SuSE users

# will appreciate that, as all services usually offer this.

ln -s /etc/init.d/mysql $RBR/usr/sbin/rcmysql

# Touch the place where the my.cnf config file might be located

# Just to make sure it’s in the file list and marked as a config file

touch $RBR/etc/my.cnf

# Install SELinux files in datadir

install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te}   
$RBR/usr/share/percona-server/SELinux/RHEL4

# Remove man pages we explicitly do not want to package, avoids 'unpackaged

# files’ warning.

rm -f $RBR/usr/share/man/man1/make\_win\_bin\_dist.1\*

##############################################################################

# Post processing actions, i.e. when installed

##############################################################################

/usr/lib/rpm/find-debuginfo.sh --strict-build-id “/root/rpmbuild/BUILD/percona-server-5.6.16-64.2”

/usr/lib/rpm/check-buildroot

/usr/lib/rpm/redhat/brp-compress

/usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip  
/usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump  
/usr/lib/rpm/brp-python-bytecompile  
/usr/lib/rpm/redhat/brp-python-hardlink  
/usr/lib/rpm/redhat/brp-java-repack-jars
