Building packages fails with "unrecognized architecture"

Development on core packages and the distribution goes on in here.

Building packages fails with "unrecognized architecture"

Postby tchelovek » Tue Sep 28, 2021 8:42 am

Having stumbled on broken packages

https://archlinuxarm.org/forum/viewtopic.php?f=15&t=15552
https://archlinuxarm.org/forum/viewtopic.php?f=15&t=15537

I tried to build the packages in question from

https://github.com/archlinuxarm/PKGBUILDs

following the advice from

https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot

natively on my odroid-c1+

There are two issues encountered:

1. Although the wiki mentions that passing arguments to makepkg is achieved by listing them after the end.of-options-market (--).

Issuing

$this->bbcode_second_pass_code('', 'makechrootpkg -c -r $CHROOT -- --A --skippgpcheck')

gets me

$this->bbcode_second_pass_quote('', '=')=> Synchronizing chroot copy [/home/fhem/chroot/root] -> [fhem]...done
==> ERROR: systemd is not available for the 'armv7h' architecture.
==> ERROR: Could not download sources.


Adding the architecture to the PKGBUILD

$this->bbcode_second_pass_code('', 'arch=('x86_64' 'armv7h')')

fixes that, only to end in

2.

$this->bbcode_second_pass_quote('', '=')=> Synchronizing chroot copy [/home/fhem/chroot/root] -> [fhem]...done
==> Making package: systemd 248.3-2 (Tue Sep 28 10:28:37 2021)
==> Retrieving sources...
-> Updating systemd-stable git repo...
Fetching origin
-> Updating systemd git repo...
Fetching origin
remote: Enumerating objects: 544, done.
remote: Counting objects: 100% (372/372), done.
remote: Compressing objects: 100% (122/122), done.
remote: Total 279 (delta 236), reused 196 (delta 157), pack-reused 0
Receiving objects: 100% (279/279), 47.59 KiB | 487.00 KiB/s, done.
Resolving deltas: 100% (236/236), completed with 68 local objects.
From https://github.com/systemd/systemd
+ 70417a0c3b...0a075e7a6f refs/pull/20712/merge -> refs/pull/20712/merge (forced update)
+ 19f2645cf5...de952e350d refs/pull/20799/merge -> refs/pull/20799/merge (forced update)
+ a4cdd089fa...80ef02df3a refs/pull/20802/merge -> refs/pull/20802/merge (forced update)
+ 81cbf5c613...ed9c9b73e5 refs/pull/20824/merge -> refs/pull/20824/merge (forced update)
-> Found 0001-Use-Arch-Linux-device-access-groups.patch
-> Found 0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch
-> Found initcpio-hook-udev
-> Found initcpio-install-systemd
-> Found initcpio-install-udev
-> Found arch.conf
-> Found loader.conf
-> Found splash-arch.bmp
-> Found systemd-user.pam
-> Found systemd-hook
-> Found 20-systemd-sysusers.hook
-> Found 30-systemd-binfmt.hook
-> Found 30-systemd-catalog.hook
-> Found 30-systemd-daemon-reload.hook
-> Found 30-systemd-hwdb.hook
-> Found 30-systemd-sysctl.hook
-> Found 30-systemd-tmpfiles.hook
-> Found 30-systemd-udev-reload.hook
-> Found 30-systemd-update.hook
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
systemd-stable ... Skipped
systemd ... Skipped
0001-Use-Arch-Linux-device-access-groups.patch ... Passed
0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch ... Passed
initcpio-hook-udev ... Passed
initcpio-install-systemd ... Passed
initcpio-install-udev ... Passed
arch.conf ... Passed
loader.conf ... Passed
splash-arch.bmp ... Passed
systemd-user.pam ... Passed
systemd-hook ... Passed
20-systemd-sysusers.hook ... Passed
30-systemd-binfmt.hook ... Passed
30-systemd-catalog.hook ... Passed
30-systemd-daemon-reload.hook ... Passed
30-systemd-hwdb.hook ... Passed
30-systemd-sysctl.hook ... Passed
30-systemd-tmpfiles.hook ... Passed
30-systemd-udev-reload.hook ... Passed
30-systemd-update.hook ... Passed
setarch: armv7h: Unrecognized architecture
==> ERROR: Build failed, check /home/fhem/chroot/fhem/build


$this->bbcode_second_pass_code('', 'setarch --list')

responds with

$this->bbcode_second_pass_quote('', 'u')name26
linux32
linux64
armv7l
armv8l
armh
arm
arm64
aarch64


What am I missing here ?
ODROID C1 ( armv7h ), Raspberry Pi 2B+ ( armv7h ), 2 x Raspberry Pi B+ ( armv6h ), Raspberry Pi4 (armv7l)
tchelovek
 
Posts: 17
Joined: Sat Mar 07, 2015 1:33 pm
Location: Yes
Top

Re: Building packages fails with "unrecognized architecture"

Postby tchelovek » Tue Sep 28, 2021 9:42 am

Wel,l I found

https://github.com/AladW/aurutils/issues/810

sounds like the problem I run into, applying it just gets me a new error:

$this->bbcode_second_pass_quote('', '=')=> Synchronizing chroot copy [/home/fhem/chroot/root] -> [fhem]...done
==> Making package: systemd 248.3-2 (Tue Sep 28 11:36:57 2021)
==> Retrieving sources...
-> Updating systemd-stable git repo...
Fetching origin
-> Updating systemd git repo...
Fetching origin
-> Found 0001-Use-Arch-Linux-device-access-groups.patch
-> Found 0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch
-> Found initcpio-hook-udev
-> Found initcpio-install-systemd
-> Found initcpio-install-udev
-> Found arch.conf
-> Found loader.conf
-> Found splash-arch.bmp
-> Found systemd-user.pam
-> Found systemd-hook
-> Found 20-systemd-sysusers.hook
-> Found 30-systemd-binfmt.hook
-> Found 30-systemd-catalog.hook
-> Found 30-systemd-daemon-reload.hook
-> Found 30-systemd-hwdb.hook
-> Found 30-systemd-sysctl.hook
-> Found 30-systemd-tmpfiles.hook
-> Found 30-systemd-udev-reload.hook
-> Found 30-systemd-update.hook
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
systemd-stable ... Skipped
systemd ... Skipped
0001-Use-Arch-Linux-device-access-groups.patch ... Passed
0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch ... Passed
initcpio-hook-udev ... Passed
initcpio-install-systemd ... Passed
initcpio-install-udev ... Passed
arch.conf ... Passed
loader.conf ... Passed
splash-arch.bmp ... Passed
systemd-user.pam ... Passed
systemd-hook ... Passed
20-systemd-sysusers.hook ... Passed
30-systemd-binfmt.hook ... Passed
30-systemd-catalog.hook ... Passed
30-systemd-daemon-reload.hook ... Passed
30-systemd-hwdb.hook ... Passed
30-systemd-sysctl.hook ... Passed
30-systemd-tmpfiles.hook ... Passed
30-systemd-udev-reload.hook ... Passed
30-systemd-update.hook ... Passed
/chrootbuild: line 3: 3 Killed sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
==> ERROR: Build failed, check /home/fhem/chroot/fhem/build
ODROID C1 ( armv7h ), Raspberry Pi 2B+ ( armv7h ), 2 x Raspberry Pi B+ ( armv6h ), Raspberry Pi4 (armv7l)
tchelovek
 
Posts: 17
Joined: Sat Mar 07, 2015 1:33 pm
Location: Yes
Top

Re: Building packages fails with "unrecognized architecture"

Postby graysky » Tue Sep 28, 2021 10:39 am

You are mostly there, command is to append -- -A not -- --A

Example building systemd on my aarch64 box:
$this->bbcode_second_pass_code('', '% MAKEFLAGS=-j20 makechrootpkg -C /var/cache/pacman/pkg -r /scratch/armc8 -- -A')

FYI, I use this helper script for builds on my machine: https://github.com/graysky2/bin/blob/master/arm-build You can adapt it to your systems (assuming nfs export and distcc) or just use the key commands for your build.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Building packages fails with "unrecognized architecture"

Postby tchelovek » Wed Sep 29, 2021 11:09 am

Thanks for your reply, graysky,


$this->bbcode_second_pass_quote('', 'Y')ou are mostly there, command is to append -- -A not -- --A


True enough, while I cited the wrong form, rest assured that I tried almost all variations
of -- -A, including quotation marks.

I have tried this on several machines
(Raspberry Pi 3 B+ - armv6h, Raspberry Pi 4 - aarch64, odroid-c1+ armv7h) with the same result.

If makepkg is invoked directly, -A does the trick, if invoked through makechrootpkg it doesn't.



$this->bbcode_second_pass_quote('', 'E')xample building systemd on my aarch64 box:
CODE: SELECT ALL
% MAKEFLAGS=-j20 makechrootpkg -C /var/cache/pacman/pkg -r /scratch/armc8 -- -A


What is the MAKEFLAGS=-j20 for ? According to my googling it limits the number of simultaneously running jobs for a child make. Is this achieving anything marvellous ?

What is /var/cache/pacman/pkg doing ? According to makechrootpkg --help there is no argument to the -C option and the chroot is given by -r <chrootdir>.

$this->bbcode_second_pass_quote('', 'F')YI, I use this helper script for builds on my machine: https://github.com/graysky2/bin/blob/master/arm-build You can adapt it to your systems (assuming nfs export and distcc) or just use the key commands for your build.


Thanks for the script, I will look into it.

The second issue seems to be armv7h specific, I can run makepkg as well as makechrootpkg without problems on the aarch64 as well as the armv6h machines. It would be nice if somebody could confirm or else point out what I am missing.

P.S. a note to the forum admin: I can reply but not quote. When trying to quote I get informed that this message is too old and therefore locked.
ODROID C1 ( armv7h ), Raspberry Pi 2B+ ( armv7h ), 2 x Raspberry Pi B+ ( armv6h ), Raspberry Pi4 (armv7l)
tchelovek
 
Posts: 17
Joined: Sat Mar 07, 2015 1:33 pm
Location: Yes
Top

Re: Building packages fails with "unrecognized architecture"

Postby graysky » Wed Sep 29, 2021 2:07 pm

-- -A works for me, not sure what to tell you.

I use MAKEFLAGS=-j20 because I built with distcc and my x86_64 machine has 32 cores.

You're right about the -C arg, ignore it. I will change the script to relect.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to Arch Linux ARM

Who is online

Users browsing this forum: No registered users and 4 guests