About mock and cross compiling 64 - 32 bit

Sjoerd Mullender sjoerd at acm.org
Fri Aug 10 20:47:42 UTC 2007


On 08/10/2007 09:49 PM, Fernando Apesteguía wrote:
> Hi all,
> 
> I have a .src.rpm package I made from a .tgz. It builds perfectly in
> my FC6 64 bits. Now I want to generate the 32 bit package. I tried
> with the simple:
> 
> setarch i386 rpmbuild ... ... .... package.src.rpm but it didn't work.
> It still generates a 64 bit binary package. So as I read previously in
> the list, I moved to mock.
> 
> Mock was installed and configured properly. The point is that when I try:
> setarch i386 mock --debug package.src.rpm
> 
> I got from the configure script the following:
> -----------------------------------------
> checking for PACKAGE... configure: error: The pkg-config script could
> not be found or is too old.  Make sure it
> is in your PATH or set the PKG_CONFIG environment variable to the full
> path to pkg-config.
> -----------------------------------------
> 
> It seems to me that this is a problem with the chroot configuration. I
> would like to know where to find more information about how to solve
> this. I can't find information, just the small wiki page in
> fedoraproject.org. Man page doesn't give me more information.
> 
> Any mock-experienced user around here?
> 
> Thanks in advance.
> 
> PS: The .tar.gz in which is based the .src.rpm compiles perfectly on
> both 32 and 64 bit platforms.
> 

The mock syntax would be:

mock -r fedora-7-i386 package.src.rpm

You must specify the correct configuration, which includes the architecture.

-- 
Sjoerd Mullender





More information about the users mailing list