bitcoin: Guix build fails on M4 macOS host with Ubuntu in UTM
Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
Since #32431 my macOS (M4 using UTM) Guix builds no longer work:
HOSTS="x86_64-linux-gnu" contrib/guix/guix-build
...
guix shell: error: while setting up the build environment: cannot set armhf-linux personality: Invalid argument
This seems to be something else than what I encountered on my native AMD Ubuntu machine: https://github.com/bitcoin/bitcoin/pull/32431#issuecomment-2966089437
But perhaps a common factor is that this PR pulled in a lot of new guix packages.
Expected behaviour
Guix build should work, it does on c8abd972818f83d90bf50b250131f338034460ef.
Steps to reproduce
See below
Relevant log output
$ HOSTS="x86_64-linux-gnu" contrib/guix/guix-build
Checking that we can connect to the guix-daemon...
Hint: If this hangs, you may want to try turning your guix-daemon off and on
again.
make: Entering directory '/home/sjors/bitcoin/depends'
make[1]: Entering directory '/home/sjors/bitcoin/depends'
make[1]: Leaving directory '/home/sjors/bitcoin/depends'
make: Leaving directory '/home/sjors/bitcoin/depends'
INFO: Building fed41b75fbfa for platform triple x86_64-linux-gnu:
...using reference timestamp: 1749642062
...running at most 10 jobs
...from worktree directory: '/home/sjors/bitcoin'
...bind-mounted in container to: '/bitcoin'
...in build directory: '/home/sjors/bitcoin/guix-build-fed41b75fbfa/distsrc-fed41b75fbfa-x86_64-linux-gnu'
...bind-mounted in container to: '/distsrc-base/distsrc-fed41b75fbfa-x86_64-linux-gnu'
...outputting in: '/home/sjors/bitcoin/guix-build-fed41b75fbfa/output/x86_64-linux-gnu'
...bind-mounted in container to: '/outdir-base/x86_64-linux-gnu'
ADDITIONAL FLAGS (if set)
ADDITIONAL_GUIX_COMMON_FLAGS: --max-jobs=4 --no-substitutes
ADDITIONAL_GUIX_ENVIRONMENT_FLAGS:
ADDITIONAL_GUIX_TIMEMACHINE_FLAGS:
The following derivations will be built:
/gnu/store/5kpjfn7qg25c4w1q3cczl565x0yi8mpb-python-lief-0.16.6.drv
/gnu/store/04dcmhmlhgj2pgnyspb88lm5j9rwbd60-python-typing-extensions-4.9.0.drv
/gnu/store/nd7dcikf5dnq113cxmb1r4w0q8ijs1qq-typing_extensions-4.9.0.tar.gz.drv
/gnu/store/25adw1ck5fvbgvrx405c0l6kjag49j9z-python-importlib-metadata-5.2.0.drv
...
/gnu/store/c985sj9mqmk3qvsd55b0g11hlv26krbk-msgpack-1.0.4.tar.gz.drv
/gnu/store/x8vm49yz0k8wm3w2hgishy5q1svkcfaw-python-pymongo-4.1.1.drv
/gnu/store/6dv3fazv5hnhwvgfnnykm0f2lwnajgsq-pymongo-4.1.1.tar.gz.drv
building /gnu/store/ck789yrq1xslycd986zdh5fq8dknl3r3-rust-actix-derive-0.5.0.tar.gz.drv...
building /gnu/store/2xasv0pcv8gw6lafag6bkjfqkmlbj02f-rust-actix-http-1.0.1.tar.gz.drv...
building /gnu/store/qifi4hb8hjm6bk6nv4664fyw7cb25fgp-rust-actix-http-2.2.0.tar.gz.drv...
building /gnu/store/gm8l3rn479p9hf3zs1vj9pzchvcj42f8-rust-actix-macros-0.1.3.tar.gz.drv...
The following builds are still in progress:
/gnu/store/qifi4hb8hjm6bk6nv4664fyw7cb25fgp-rust-actix-http-2.2.0.tar.gz.drv
/gnu/store/ck789yrq1xslycd986zdh5fq8dknl3r3-rust-actix-derive-0.5.0.tar.gz.drv
building /gnu/store/grpq0sq301rwsz6h4vbdx9sgvi64wai4-Python-2.7.18.tar.xz.drv...
The following builds are still in progress:
/gnu/store/grpq0sq301rwsz6h4vbdx9sgvi64wai4-Python-2.7.18.tar.xz.drv
/gnu/store/qifi4hb8hjm6bk6nv4664fyw7cb25fgp-rust-actix-http-2.2.0.tar.gz.drv
The following builds are still in progress:
/gnu/store/grpq0sq301rwsz6h4vbdx9sgvi64wai4-Python-2.7.18.tar.xz.drv
/gnu/store/qifi4hb8hjm6bk6nv4664fyw7cb25fgp-rust-actix-http-2.2.0.tar.gz.drv
building /gnu/store/sf5wwnpy8mr9l8iic2xz5bmg3bppjrj9-asynctest-0.13.0.tar.gz.drv...
building /gnu/store/hiqwnz4mhiad1zcqyf250b1ws0s36djc-attrs-21.2.0.tar.gz.drv...
The following builds are still in progress:
/gnu/store/hiqwnz4mhiad1zcqyf250b1ws0s36djc-attrs-21.2.0.tar.gz.drv
/gnu/store/sf5wwnpy8mr9l8iic2xz5bmg3bppjrj9-asynctest-0.13.0.tar.gz.drv
/gnu/store/grpq0sq301rwsz6h4vbdx9sgvi64wai4-Python-2.7.18.tar.xz.drv
note: keeping build directory `/tmp/guix-build-Python-2.7.18.tar.xz.drv-2'
note: keeping build directory `/tmp/guix-build-bash.drv-2'
note: keeping build directory `/tmp/guix-build-asynctest-0.13.0.tar.gz.drv-2'
note: keeping build directory `/tmp/guix-build-attrs-21.2.0.tar.gz.drv-2'
guix shell: error: while setting up the build environment: cannot set armhf-linux personality: Invalid argument
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
master@fed41b75fbfa6d14cce852863271b1fb0206eef0
Operating system and version
MacOS 15.5 with UTM, guest (virtualized) Ubuntu 24.10 (aarch64
Machine specifications
M4
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 18 (18 by maintainers)
The new machine also gives me the “cannot set armhf-linux personality” error.
It seems to happen after successfully building one package (with
--max-jobs=1). Each time you doguix buildit’ll build another package and throw this error.If I switch back to c8abd972818f83d90bf50b250131f338034460ef then
guix buildjust works. At least after I fix the app armor issue:In
/etc/apparmor.d/guix:And then
sudo apparmor_parser -r /etc/apparmor.d/guixBut the following fails regardless:
But this one does work:
I’ll see if I can narrow down the culprit package to one of these and/or one of their dependencies:
It happens for every
--systemI tried so far.Maybe the issue has nothing to do with the specific new packages installed in #32431, but rather an inability of my guix system to add any new packages. I’ll try to test that scenario somehow…
It doesn’t seem that simple either, e.g. I can add something random and it builds fine:
Does running the following work:
@willcl-ark I’m using UTM: https://mac.getutm.app (not Podman or Docker)
Definitely not a fresh machine, it’s been making guix builds for while. I could make a fresh one if you can’t reproduce, but it’s a bit of a pain to setup a guix environment from scratch.
Ok I’ve tried this again twice more:
…and both runs, whilst a little slower than previously, completed successfully.
@Sjors was your container totally fresh for your run, or has it been restored from some kind of saved state?