[SciPy-user] bdist_rpm build error in scipy_core from CVS

Stephen Walton stephen.walton at csun.edu
Mon Jan 31 14:33:34 EST 2005


Fernando Perez wrote:

> Mmh, the 'no compatible archs...' message is coming straight from the 
> rpm command, not from make.py.  ...  I noticed the BuildArchitectures 
> flag in the atlas-base.spec file is set to i686.

OK, after some experimentation:  BuildArchitectures consists of a 
space-separated list of architectures for which the package building is 
allowed.  It really is not needed unless there's some reason the package 
can't build on some architectures or the package is scripts only, in 
which case setting BuildArchitectures to "noarch" is appropriate.

To get an appropriately named RPM, you use the "--target" switch to 
rpmbuild.  For example, I can run

rpmbuild --target=athlon -bb --rcfile rpmrc --clean --rmsource 
atlas-ATHLONSSE1_2.spec

on a P4 system after doing "python make.py spec".  This creates 
atlas-3.6.0-ATHLONSSE1_2.athlon.rpm as I expect.  But it doesn't really 
matter.  If I wind up with atlas-3.6.0-ATHLONSSE1_2.i686.rpm, it still 
installs fine on my dual CPU Athlon system.  And 
atlas-3.6.0-P4SSE2.athlon.rpm installs fine on a P4.  It might be 
simplest to just add "--target=noarch" to the rpmbuild in make.py to 
ensure rpmbuild always runs.  We're not actually compiling any code 
here, and the underlying architecture is set by the other part of the 
keywords.  This will create RPMs named things like 
atlas-3.6.0-P4SSE2.noarch.rpm.

> Otherwise, you could just make it another parameter of the expansion: 
> just put in there something like __BUILDARCH__ as the value, and add a 
> key for that to make.py.

Except that, as noted, the __BUILDARCH__ really needs to be the string 
after "--target=" in the rpmbuild command, so it isn't really an 
addition to the template.

Summary of my suggestions:  Delete BuildArchitectures from 
atlas-base.spec.  Add "--target=noarch" to the rpmbuild command in make.py.

Stephen




More information about the SciPy-User mailing list