Rework Cross Compile Type
See individual commit messages for details
Related: https://docs.postmarketos.org/pmbootstrap/cross_compiling.html
Merge request reports
Activity
- Resolved by Oliver Smith
This is a draft, because it breaks cross-native2 while initializing chroots somehow, I need to look into it another day - or maybe somebody else is interested in picking this up?
reproduce:
- checkout pmaports!6297 (merged) to have postmarketos-mkinitfs use cross-native2
- try to build it for a foreign arch
fails with:
(162586) [18:30:55] (native) % cd /home/pmos/build; busybox su pmos -c SUDO_APK='abuild-apk --no-progress' CHOST=aarch64 CBUILDROOT=/mnt/sysroot CFLAGS=-Wl,-rpath-link=/mnt/sysroot/usr/lib CGO_CFLAGS=--sysroot=/mnt/sysroot CGO_LDFLAGS=--sysroot=/mnt/sysroot GOARCH=arm64 CCACHE_DISABLE=1 GOCACHE=/home/pmos/.cache/go-build HOME=/home/pmos abuild -d -D postmarketOS -f ; >>> postmarketos-mkinitfs: Building pmos/postmarketos-mkinitfs 2.6.1-r1 (using abuild 3.12.0-r4) started Sun, 09 Mar 2025 17:30:55 +0000 >>> postmarketos-mkinitfs: Checking sanity of /home/pmos/build/APKBUILD... >>> postmarketos-mkinitfs: Cleaning up srcdir >>> postmarketos-mkinitfs: Cleaning up pkgdir >>> postmarketos-mkinitfs: Cleaning up tmpdir >>> postmarketos-mkinitfs: Fetching https://gitlab.postmarketos.org/postmarketOS/postmarketos-mkinitfs/-/archive/2.6.1/postmarketos-mkinitfs-2.6.1.tar.gz abuild-fetch: /var/cache/distfiles/postmarketos-mkinitfs-2.6.1.tar.gz.lock: Permission denied >>> ERROR: postmarketos-mkinitfs: fetch failed (162586) [18:30:55] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (162586) [18:30:55] NOTE: The failed command's output is above the ^^^ line in the log file: /home/user/.local/var/pmbootstrap/log.txt (162586) [18:30:55] ERROR: Couldn't build aarch64/postmarketos-mkinitfs-2.6.1-r1.apk!
- Resolved by Newbyte
- Resolved by Oliver Smith
mentioned in commit ollieparanoid/pmbootstrap@4aca8996
mentioned in commit ollieparanoid/pmbootstrap@14b3ae18
mentioned in commit ollieparanoid/pmbootstrap@6c5cdbc7
mentioned in commit ollieparanoid/pmbootstrap@2f84d6be
mentioned in commit ollieparanoid/pmbootstrap@773e4abb
mentioned in commit ollieparanoid/pmbootstrap@0acd3a57
mentioned in commit ollieparanoid/pmbootstrap@e7354938
added 12 commits
-
f49fdd90...6465a6aa - 5 commits from branch
postmarketOS:master
- e7354938 - build: print !tracedeps warning for cross-native 1
- 2f84d6be - pmb.build: fix internal cross compiling names
- 14b3ae18 - pmb/build/autodetect: remove deprecated comment
- 4aca8996 - pmb.build.backend.run_abuild: remove cross default
- 6c5cdbc7 - pmb.types.CrossCompileType: split up None
- 773e4abb - pmb.build.package: log the cross compile type
- 0acd3a57 - CI: test different cross compilation methods
Toggle commit list-
f49fdd90...6465a6aa - 5 commits from branch
- Resolved by Oliver Smith
I've reworded the MR and fixed the bug it had earlier. Locally it now passes these:
# unnecessary pmbootstrap build hello-world --force # crossdirect pmbootstrap build hello-world --arch=aarch64 --force # cross-native pmbootstrap build arch-bin-masquerade --arch=aarch64 --force # cross-native2 pmbootstrap build postmarketos-mkinitfs --arch=aarch64 --force # qemu-only pmbootstrap --no-cross build hello-world --arch=aarch64 --force
CI just failed for an unrelated reason postmarketos#101 (closed). CI should of course pass, but this can already be reviewed (maybe re-trigger it if it fails again).
- Resolved by Oliver Smith
marked this merge request as draft from ollieparanoid/pmbootstrap@7439df5f
mentioned in commit ollieparanoid/pmbootstrap@2b4a4fc4
mentioned in commit ollieparanoid/pmbootstrap@2b63152f
mentioned in commit ollieparanoid/pmbootstrap@f187fc67
mentioned in commit ollieparanoid/pmbootstrap@7bf7356c
mentioned in commit ollieparanoid/pmbootstrap@42b4465a
mentioned in commit ollieparanoid/pmbootstrap@5ce714e5
mentioned in commit ollieparanoid/pmbootstrap@d64c3bce
added 10 commits
-
6fe4e631...7f886967 - 2 commits from branch
postmarketOS:master
- d64c3bce - build: print !tracedeps warning for cross-native 1
- 42b4465a - pmb.build: fix internal cross compiling names
- 7bf7356c - pmb/build/autodetect: remove deprecated comment
- 2b63152f - pmb.build.backend.run_abuild: remove cross default
- 5ce714e5 - pmb.types.CrossCompileType: split up None
- 2b4a4fc4 - pmb.build.package: log the cross compile type
- f187fc67 - CI: test different cross compilation methods
- 1fce93e5 - FIXUP: build: abstract CrossCompile type logic
Toggle commit list-
6fe4e631...7f886967 - 2 commits from branch
mentioned in commit ollieparanoid/pmbootstrap@0625ece5
mentioned in commit ollieparanoid/pmbootstrap@b2eb8122
mentioned in commit ollieparanoid/pmbootstrap@9e0c4a83
mentioned in commit ollieparanoid/pmbootstrap@bef3b433
mentioned in commit ollieparanoid/pmbootstrap@dcc4137e
mentioned in commit ollieparanoid/pmbootstrap@215a0de0
mentioned in commit ollieparanoid/pmbootstrap@0eaedba6
mentioned in commit ollieparanoid/pmbootstrap@53d70519
added 9 commits
-
58119697 - 1 commit from branch
postmarketOS:master
- 53d70519 - build: print !tracedeps warning for cross-native 1
- 9e0c4a83 - pmb.build: fix internal cross compiling names
- b2eb8122 - pmb/build/autodetect: remove deprecated comment
- 0625ece5 - pmb.build.backend.run_abuild: remove cross default
- bef3b433 - pmb.types.CrossCompileType: split up None
- 215a0de0 - pmb.build.package: log the cross compile type
- 0eaedba6 - CI: test different cross compilation methods
- dcc4137e - FIXUP: build: abstract CrossCompile type logic
Toggle commit list-
58119697 - 1 commit from branch
enabled an automatic merge when all merge checks for dcc4137e pass
mentioned in merge request !2567 (closed)