Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildx failed when using cross platform #1639

Closed
sjiampojamarn opened this issue Feb 19, 2023 · 2 comments
Closed

buildx failed when using cross platform #1639

sjiampojamarn opened this issue Feb 19, 2023 · 2 comments

Comments

@sjiampojamarn
Copy link

sjiampojamarn commented Feb 19, 2023

I was able to build amd64 on amd64 hosts, as well as arm64 on arm64 hosts but not when trying to build amd64 containers on arm64 hosts. It happened only for some of my pipelines but not all. Weird. Here's an example that I got the failures.

$ uname -m
aarch64

$ docker  buildx version
github.com/docker/buildx v0.10.2 00ed17d

$ docker buildx inspect
Name:          builder
Driver:        docker-container
Last Activity: 2023-02-19 21:56:13 +0000 UTC

Nodes:
Name:      builder0
Endpoint:  unix:///var/run/docker.sock
Status:    running
Buildkit:  v0.11.3
Platforms: linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

$docker buildx build --platform linux/amd64 -f Dockerfile https://github.com/jellyfin/jellyfin.git#master
....
 => ERROR [builder 4/4] RUN dotnet publish Jellyfin.Server --disable-parallel --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 -p  37.0s
------
 > [builder 4/4] RUN dotnet publish Jellyfin.Server --disable-parallel --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 -p:DebugSymbols=f
alse -p:DebugType=none:
#0 15.52 MSBuild version 17.4.1+fedecea9d for .NET
#0 35.22 Segmentation fault (core dumped)
------
Dockerfile:75
--------------------
  73 |     # because of changes in docker and systemd we need to not build in parallel at the moment
  74 |     # see https://success.docker.com/article/how-to-reserve-resource-temporarily-unavailable-errors-due-to-tasksmax-setting
  75 | >>> RUN dotnet publish Jellyfin.Server --disable-parallel --configuration Release --output="/jellyfin" --self-contained --runtime linux-x64 -p:DebugSymbols=false -p:DebugType=none
  76 |
  77 |     FROM app
--------------------
ERROR: failed to solve: process "/bin/sh -c dotnet publish Jellyfin.Server --disable-parallel --configuration Release --output=\"/jellyfin\" --self-contained --runtime linux-x64 -p:DebugSymbols=false -p:DebugType=none" did not complete successfully: exit code: 139

Things I've already tried in btw

$ docker system prune -a
$ docker pull tonistiigi/binfmt
$ docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*
$ docker run --privileged --rm tonistiigi/binfmt --install all
$ docker buildx rm builder
$ docker buildx prune -a -f
$ docker buildx create --name builder --use

Appreciated any help, pointer here.

@sjiampojamarn
Copy link
Author

It turned out that dotnet 7.0 doesn't support QEMU
dotnet/runtime#13648 (comment)

https://gitlab.com/qemu-project/qemu/-/issues/249
is the related issue.

Closing this one as it's rather on the QEMU and dotnet side.

@JasonLandbridge
Copy link

This should now work with the latest dev build. Please see: PlexRipper/PlexRipper#363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants