Skip to content
Snippets Groups Projects

Rework Cross Compile Type

All threads resolved!

See individual commit messages for details

Related: https://docs.postmarketos.org/pmbootstrap/cross_compiling.html

Edited by Oliver Smith

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • 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!
  • Newbyte
  • Newbyte
  • Making this an enum seems reasonable to me!

  • Oliver Smith added 12 commits

    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

    Compare with previous version

  • Oliver Smith changed the description

    changed the description

  • Oliver Smith resolved all threads

    resolved all threads

  • Oliver Smith marked this merge request as ready

    marked this merge request as ready

    • 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).

  • Oliver Smith resolved all threads

    resolved all threads

  • Caleb Connolly
  • Thanks for this cleanup and adding the integration tests! Overall looks great.

  • Caleb Connolly added 3 commits

    added 3 commits

    • cb285480 - types: fix warning due to module name
    • 7439df5f - fixup! pmb.types.CrossCompileType: split up None
    • 6fe4e631 - FIXUP: build: abstract CrossCompile type logic

    Compare with previous version

  • Caleb Connolly marked this merge request as draft from ollieparanoid/pmbootstrap@7439df5f

    marked this merge request as draft from ollieparanoid/pmbootstrap@7439df5f

  • Caleb Connolly added 10 commits

    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

    Compare with previous version

  • Oliver Smith approved this merge request

    approved this merge request

  • Oliver Smith marked this merge request as ready

    marked this merge request as ready

  • Oliver Smith resolved all threads

    resolved all threads

  • Caleb Connolly approved this merge request

    approved this merge request

  • Oliver Smith added 9 commits

    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

    Compare with previous version

  • Oliver Smith resolved all threads

    resolved all threads

  • Oliver Smith enabled an automatic merge when all merge checks for dcc4137e pass

    enabled an automatic merge when all merge checks for dcc4137e pass

  • merged

  • Oliver Smith mentioned in merge request !2567 (closed)

    mentioned in merge request !2567 (closed)

  • Please register or sign in to reply
    Loading