I've successfully rebuilt Red Hat EL PHP 5.2.10 RPMs using mock on a CentOS 5.4 i386. I wanted to be able to build both x86_64 and i386 versions so I reinstalled my builder system with CentOS 5.4 x86_64. Now I can build the PHP RPM successful for x86_64, but i386 fails with the following during configure /usr/bin/net-snmp-config: line 43: net-snmp-config-x86_64: command not found For the commands I am using mock -r centos-5-x86_64 php-5.2.10-1.el5s2.src.rpm mock -r centos-5-i386 php-5.2.10-1.el5s2.src.rpm I went into the shell on the i386 build environment mock -r centos-5-i386 shell The contents of /usr/bin/net-snmp-config has arch=`arch` echo $arch | grep -q i.86 ...... if [ "$arch" = "x86_64" ] ; then net-snmp-config-x86_64 $* exit 0 fi When I run arch from the mock shell I get x86_64. Shouldn't it see the correct architecture inside of mock? I thought that was the point of mock so I could build both i386 and x86_64 versions on the same system. Thanks, Ryan
On Mon, 2010-05-03 at 13:40 -0400, Ryan Wagoner wrote: Replying to you off list because this is a topic for the fedora devel list.> Shouldn't it see the correct architecture inside of mock? I thought > that was the point of mock so I could build both i386 and x86_64 > versions on the same system.Try this: If using mock version older than 0.8.8 or on a system with python 2.4, and building i386 packages on x86_64, prepend setarch i386 to the mock command line: setarch i386 mock -r <configfile> --rebuild package-1.2-3.src.rpm [1] If I were you I would not depend on using mock. I have had erronious things hapen with builds at different times. I still resort to the old tried and true Self Hosting Building. I'm not saying mock is a bad tool of choice. It is good at making chroot installs to check packages though. Having said that the above does not work try the build on pure i386 on a self hosting machine. John [1] http://fedoraproject.org/wiki/Extras/MockTricks