Issue
While building some RPM's from different spec files I get the above warning
Binaries arch (1) not matching the package arch (2).
The code and everything was given to me and I am very new to RPM's. I tried on the internet but didn't find anything close to it. Can someone give me a hint or explain what that warning mean.
Solution
I don't get all the details from your question, but probably something like this is happening:
- you got some 32bit binaries / libraries
- you package those on a 64bit system
- the produced rpm is thus (automatically) a some_name.x86_64.rpm
- now
rpmbuild
complains, because the produced rpm is a rpm for 64bit architecture, while the binaries contained inside are for 32bit systems.
The solution is to make sure that the produced rpm specifies the correct architecture needed:
BuildArch: i586
or something like that.
Note that you might get similar errors when packaging both 32bit and 64bit binaries in the same packages. The clean solution would then be to produce separate rpm packages for each architecture.
Answered By - Chris Maes Answer Checked By - Mary Flores (WPSolving Volunteer)