<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>I'm trying to build an i686 RPM package on a x86_64 Linux machine.</div><div><br></div><div><span style="font-size: 12pt; ">I have a set(CPACK_RPM_PACKAGE_ARCHITECTURE i686)</span></div><div><span style="font-size: 12pt; ">but I get an error at CPack time:</span></div><div><span style="font-size: 12pt; ">error: No compatible architectures found for build</span></div><div><br></div><div><span style="font-size: 12pt; ">I can get it to work if I also use setarch when calling rpmbuild giving it the CPack generated RPM spec file, like so:</span></div><div><span style="font-size: 12pt; ">setarch i686 rpmbuild --bb --define "_topdir $PWD" --buildroot $PWD/<mypath> SPECS/myspec.spec</span></div><div><span style="font-size: 12pt; "><br></span></div><div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">Doing the equivalent for a Debian package seemed to work by simply setting</span></div><div><span style="font-size: 12pt;" data-mce-style="font-size: 12pt;">set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)</span></div></div><div><span style="font-size: 12pt; "><br></span></div><div><span style="font-size: 12pt; ">Is there some way to make this work automatically within cpack?</span></div><div><span style="font-size: 12pt; "><br></span></div><div><span style="font-size: 12pt; ">Thanks,</span></div><div><span style="font-size: 12pt; ">Clint</span></div></div></body></html>