Obsolete nosetarch option
Created by: holymonson
setarch is mainly used for building i686 packages on x86_64, while it disturbs building ARM packages on x86_64, so the nosetarch option (-s) was introduced. But there is a better way that we could always precheck the setarch support list, and do it only when available.
This could fix the partial implement of setarch refered on #41 .
Close #41
Merge request reports
Activity
69 69 70 70 rm -rf --one-file-system "${chroots}/${repo}-${arch}" 71 71 (umask 0022; mkdir -p "${chroots}/${repo}-${arch}") 72 setarch "${arch}" mkarchroot \ Created by: deep-42-thought
Why does setarch make problems on arm? The only thing which I encountered, was, that the labeling was different (alarms "armv6h" should be run via
setarch armv6l
, alarms "armv7h" should be run viasetarch armv6l
) - of course, this will not work on an x86_64 host - but removing setarch completely will not fix this. Check out #45 for an alternative solution.Created by: deep-42-thought
but removing setarch completely will not fix this.
It will. Thanks to binfmt-qemu-static and binfmt-qemu-static, we can run aarch64 elfbin directly on x86_64 host, so removing it will be good enough for us.
Oh, I see - I always thought, archlinuxarm was built on a cluster of raspberry pis and co. How does setarch inside binfmt-qemu-static behave? e.g.: is it ok so call an aarch64
setarch aarch64
via binfmt-qemu-static? (Just some random thought, that probably will not work).I would really like to see this compatible with #45 - e.g. it would be great to not nuke the aliases defined there.
Created by: holymonson
How does setarch inside binfmt-qemu-static behave? e.g.: is it ok so call an aarch64
setarch aarch64
via binfmt-qemu-static? (Just some random thought, that probably will not work).binfmt-qemu-static registers a binary format which transparently translates aarch64 elfbin to x86_64. while setarch confines CPU features to act like another architecture. They are 2 different approaches, and they don't work together at all.
I would really like to see this compatible with #45 - e.g. it would be great to not nuke the aliases defined there.
I won't say incompatible, but they aren't related. #45 wouldn't solve my problem, and I don't know yours.
I won't say incompatible, but they aren't related. #45 wouldn't solve my problem, and I don't know yours.
I recently stumbled upon the same problem for riscv64. For my case #45 does provide with a workaround here:
echo "x86_64" > /usr/share/devtools/setarch-aliases.d/riscv64
With #45 applied, setarch is called with x86_64 on the host instead, so that it doesn't interfere with qemu-user-static. This is effectively the same as removing setarch altogether for the defined arches.