Failed to build rpm from source

I want to build a package from source, basically all I did was downloading Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm and adding -DWITH_INNODB_MEMCACHED=ON to spec file.
[URL=“http://www.percona.com/forums/redir/downloads/Percona-Server-5.6/Percona-Server-5.6.12-rc60.4/source/Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm”]http://www.percona.com/redir/downloads/Percona-Server-5.6/Percona-Server-5.6.12-rc60.4/source/Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm[/URL]

rpmbuild -i …/Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm
rpmbuild -ba SPECS/percona-server.spec

but once I run rpmbuild -ba, i get the following:

– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlcheck.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_client_test_embedded.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlhotcopy.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlimport.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlbinlog.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql-test-run.pl.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_secure_installation.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqldumpslow.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/myisampack.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/myisam_ftdump.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_client_test.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_zap.1
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man8/mysqld.8
– Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/mysql/solaris/postinstall-solaris

  • mv -v ‘/home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64//usr/lib64/.a’ /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64//usr/lib64/mysql/
    mv: cannot stat `/home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64//usr/lib64/
    .a’: No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.GLCsVU (%install)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.GLCsVU (%install)

==============================================
/var/tmp/rpm-tmp.GLCsVU:

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

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

*centos 6.4
*tried to build as non-privilege user and as root.