Manager build error on ARM64 #104191
Labels
No Label
Good First Issue
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Job Type
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/flamenco#104191
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating System(s): Arch Linux ARM (in Docker with QEMU emulation)
Flamenco Version
Is Broken: main branch
Worked OK: probably never
Short description of error
The manager fails to build on
aarch64
systems. The worker builds correctly.Log snippet:
Exact steps for others to reproduce the error
npm i
inweb/app
make flamenco-manager
in the root of the git repoWhich version of Arch Linux were you using? And which version of Go? Which Linux kernel is used?
I had to retest since I didn't note these things.
I tested on two different systems. One
x86_64
CPU, but with QEMU User Mode emulation in Docker and one actualaarch64
system (Raspberry Pi 4).The
x86_64
system with emulation:go version go1.20.3 linux/arm64
6.2.13-zen-1-zen
(the kernel is not emulated with user mode emulation, so this is the host kernel)The Raspberry Pi:
go version go1.20.3 linux/arm64
6.1.25-1-rpi-ARCH
(Raspberry Pi Foundation kernel)Arch doesn't have versioned releases. Originally I wanted to write this off to the emulation, but it happens on a bare metal ARM machine too.
Do you have a link to a step by step of running a QEmu with emulated ARM CPU?
Sure thing.
If you already have Docker set up on your system, it's as easy as running
docker run --privileged --rm tonistiigi/binfmt --install all
. (Source)After that, your system is ready to execute binaries compiled for any of the architectures supported by QEMU. Rebooting the system unregisters the emulators again.
You can choose the architecture to run of any multi-arch container image with
--platform
.I maintain my own container images for building Arch packages and I used this command to run my build container:
But like I said, you can try this with any container that supports multiple architectures. As I'm writing this I'm trying to compile Flamenco on Ubuntu.
Ok, I just finished trying with Ubuntu, it ends the same way :/
This was with Ubuntu 22.04 and Go
go version go1.18.1 linux/arm64
.Could you give #104210 a try?
I think there might be an error in some makefile somewhere:
I just tried building with:
This avoids the need to pack the add-on, or use
yarn
to build the webapp. It's sufficient to test the problem that was reported here, and that the PR fixes (I hope).Also, I wasn't thinking. This is enough to build for linux/arm64 when on linux/amd64 (like I am):
That's super cool, I didn't know cross-compiling with Go was that easy!
I tried the build without the web app, but I got the same error as in #104191 (comment)
I also tried this in the same container as you (
golang:latest
) and that worked, so #104191 (comment) is probably unrelated.Are there any compromises that come with using
sys/unix
instead ofsyscall
?This built flamenco-manager for me when I hand patched the touch_linux.go file.
Without this I would get the following error building the arm64 target...
That error indicates you were still on the
main
branch? #104210 hasn't landed inmain
yet, so to test you need to switch branches. But, if you manually applied the patch, that's ok as well, just a bit more work.Not really, IMO it's even a better approach now.
👍 I want to get rid of the
Makefile
altogether anyway, but that's related to #102633 and tracked in the magefile branch.Yes, I hand patched main just to see if it helped while experimenting with arm64 build and reading this thread.
Indeed, I wrongly configured my PKGBUILD, expecting it to checkout that branch. When manually checking out the branch, it builds as expected. This was an error on my side.
Thanks for the report!