Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am generating RPM for the fisrt time. I have created folder structure

mkdir -p tmp/rpm/{BUILD,BUILDROOT,RPMS/x86_64,SOURCES,SRPMS,SPECS} .

But when I generated my RPM, it generates my RPM with i586 extension. How to tell RPM to generate x86_64 extension

share|improve this question

2 Answers 2

rpmbuild doesn't do major-arch crosscompiling. Build your package on a x86-64 system, with x86-64 tools.

share|improve this answer

Your best option would be to use http://build.opensuse.org as it builds for both i386 and x86_64 as well as taking care of both RedHat, SuSE, CentOS and Debian.

The other thing to do if you don't want to use build.opensuse.org is to set the arch environment variable. The first option though is the easier.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.