Rpmrebuild fails on SFOS 4.4 armv7hl

I use SFOS 4.4 armv7hl installed on my device . I face a problem and failing when running rpmrebuild . It’s say setarch armv7hl unrecognised architecture.
I want to know how to fix that ?
Thank for all…

Device : Vince
Sailfish : 4.4.0.58
rpmrebuild : latest version from chum repos

Please give the exact command you use, and the exact error message.

even better, call it with --debug and post the result.

I try to build machines Vs machines

Debug

DEBUG: (check_i18ndomains)
DEBUG: (GenRpmQf)
DEBUG: (ChangeRpmQf) /%{ENHANCESFLAGS}/d
(GenRpmQf) remove tag line ENHANCESFLAGS
DEBUG: (ChangeRpmQf) /%{ENHANCESNAME}/d
(GenRpmQf) remove tag line ENHANCESNAME
DEBUG: (ChangeRpmQf) /%{ENHANCESVERSION}/d
(GenRpmQf) remove tag line ENHANCESVERSION
DEBUG: (ChangeRpmQf) /%{SUGGESTSFLAGS}/d
(GenRpmQf) remove tag line SUGGESTSFLAGS
DEBUG: (ChangeRpmQf) /%{SUGGESTSNAME}/d
(GenRpmQf) remove tag line SUGGESTSNAME
DEBUG: (ChangeRpmQf) /%{SUGGESTSVERSION}/d
(GenRpmQf) remove tag line SUGGESTSVERSION
DEBUG: (CheckTags)
DEBUG: (IsPackageInstalled)
DEBUG: (VerifyPackage) harbour-machines-vs-machines-sfos
DEBUG: (SpecGeneration)
DEBUG: (CreateBuildRoot)
DEBUG: (Processing)
DEBUG: (spec_concatenate)
DEBUG: (CheckArch)
DEBUG: (RpmArch)
DEBUG: change_arch=setarch armv7hl
DEBUG: (RpmBuild)
setarch: armv7hl: Unrecognized architecture
/usr/lib/rpmrebuild/rpmrebuild.sh: ERROR: (RpmBuild) pac
kage ‘harbour-machines-vs-machines-sfos’ build failed

I see, thanks.

I belieieve the problem is twofold:

  1. the rpmrebuild script compares rpm arch against uname arch, which on arm32 SFOS are different (32bit userland, 64bit kernel)
  2. the setarch command from util-linux only recignizes linux32 or linux64 as parameters.
1 Like

There is State of Repository 4.4.0.68_armv7hl for sailfishos:chum / MachinesVsMachines. - SailfishOS Open Build Service armv8el Not install-able for you? I ask since I’m the maintainer.

I did a quick hack to fix this on Show sailfishos:chum:testing / rpmrebuild - SailfishOS Open Build Service

@x-cell can you test if that works for you?

I updated rpmrebuild , but unfortunately the proplem is still persist.

Try to repackage advanced camera , but fail
The result is
rpmrebuild harbour-advanced-camera

(GenRpmQf) remove tag line ENHANCESFLAGS
(GenRpmQf) remove tag line ENHANCESNAME
(GenRpmQf) remove tag line ENHANCESVERSION
(GenRpmQf) remove tag line SUGGESTSFLAGS
(GenRpmQf) remove tag line SUGGESTSNAME
(GenRpmQf) remove tag line SUGGESTSVERSION
bash: missing ]
setarch: armv7hl: Unrecognized architecture
/usr/lib/rpmrebuild/rpmrebuild.sh: ERROR: (RpmBuild) pac
kage ‘harbour-advanced-camera’ build failed
/usr/lib/rpmrebuild/rpmrebuild.sh: ERROR: RpmBuild

@poetaster I had it installed via chum.
It’s about rpmrebuil fail in sailfish armv7hl

Debug

DEBUG: rpmrebuild version 2.16 : --debug harbour-advance
d-camera
DEBUG: (check_i18ndomains)
DEBUG: (GenRpmQf)
DEBUG: (ChangeRpmQf) /%{ENHANCESFLAGS}/d
(GenRpmQf) remove tag line ENHANCESFLAGS
DEBUG: (ChangeRpmQf) /%{ENHANCESNAME}/d
(GenRpmQf) remove tag line ENHANCESNAME
DEBUG: (ChangeRpmQf) /%{ENHANCESVERSION}/d
(GenRpmQf) remove tag line ENHANCESVERSION
DEBUG: (ChangeRpmQf) /%{SUGGESTSFLAGS}/d
(GenRpmQf) remove tag line SUGGESTSFLAGS
DEBUG: (ChangeRpmQf) /%{SUGGESTSNAME}/d
(GenRpmQf) remove tag line SUGGESTSNAME
DEBUG: (ChangeRpmQf) /%{SUGGESTSVERSION}/d
(GenRpmQf) remove tag line SUGGESTSVERSION
DEBUG: (CheckTags)
DEBUG: (IsPackageInstalled)
DEBUG: (VerifyPackage) harbour-advanced-camera
DEBUG: (SpecGeneration)
DEBUG: (CreateBuildRoot)
DEBUG: (Processing)
DEBUG: (spec_concatenate)
DEBUG: (CheckArch)
bash: missing ]
DEBUG: (RpmArch)
DEBUG: change_arch=setarch armv7hl
DEBUG: (RpmBuild)
setarch: armv7hl: Unrecognized architecture
/usr/lib/rpmrebuild/rpmrebuild.sh: ERROR: (RpmBuild) pac
kage ‘harbour-advanced-camera’ build failed
/usr/lib/rpmrebuild/rpmrebuild.sh: ERROR: RpmBuild

Missing bash

eh, sorry, typo in the fix.rpmrebuild-2.16-1.5.1.jolla.noarch.rpm from the above place should not have that.

Still, the issue is that setarch doesn’t know about the architecture. What’s the output of setarch --list? Here it’s:

 $ setarch --list
uname26
linux32
linux64

[EDIT:] nevermind, I hacked in a workaround for setarch, please test rpmrebuild-2.16-1.6.1.jolla.noarch.rpm

3 Likes

Thanks @nephros it work as should…
The result :

rpmrebuild harbour-advanced-camera
(GenRpmQf) remove tag line ENHANCESFLAGS
(GenRpmQf) remove tag line ENHANCESNAME
(GenRpmQf) remove tag line ENHANCESVERSION
(GenRpmQf) remove tag line SUGGESTSFLAGS
(GenRpmQf) remove tag line SUGGESTSNAME
(GenRpmQf) remove tag line SUGGESTSVERSION
result: /home/defaultuser/rpmbuild/RPMS/armv7hl/harbour-
advanced-camera-0.9.7-1.8.1.jolla.armv7hl.rpm

Where can we download rpmrebuild-2.16-1.6.1.jolla.noarch.rpm?
zypper install gets faulty rpmrebuild-2.16-1.1.1 only.

Which reminds me to push the fixed one. Which I just requested.