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

Building on aarch64 #1782

Closed
zzart opened this issue May 25, 2023 · 7 comments
Closed

Building on aarch64 #1782

zzart opened this issue May 25, 2023 · 7 comments
Labels
status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour.

Comments

@zzart
Copy link

zzart commented May 25, 2023

Summary

Getting

[analyzer] exec /cnb/lifecycle/analyzer: exec format error
ERROR: failed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 1

when trying to build the example app.


Reproduction

Steps

On raspberrypi

$ uname -a
Linux raspberrypi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux

Installed pack with

(curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.30.0-pre1/pack-v0.30.0-pre1-linux-arm64.tgz" | sudo tar -C /usr/local/bin/ --no-same-owner -xzv pack)

Then followed the instructions form https://buildpacks.io/docs/app-journey/

Current behavior
Expected behavior

App should build .
My initial report is here : dokku/dokku#5854


Environment

pack info
 pack report
Pack:
  Version:  0.30.0-pre1+git-18662b2.build-4267
  OS/Arch:  linux/arm64

Default Lifecycle Version:  0.16.0

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12

Config:
$ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.4
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.17.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 2
  Paused: 0
  Stopped: 2
 Images: 16
 Server Version: 23.0.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.61-v8+
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: aarch64
 CPUs: 4
 Total Memory: 7.629GiB
 Name: raspberrypi
 ID: 2f58712b-ce85-4f69-a914-6dad29d287df
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support

@zzart zzart added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels May 25, 2023
@joe-kimmel-vmw
Copy link
Contributor

Hi @zzart - thanks for checking out our pre-release! I think this is actually fixed in the very recently released pre.2. Can you confirm that if you update to "https://github.com/buildpacks/pack/releases/download/v0.30.0-pre2/pack-v0.30.0-pre2-linux-arm64.tgz" the issue is resolved?

@zzart
Copy link
Author

zzart commented May 26, 2023

hi @joe-kimmel-vmw thanks for quick response. I've tested pre.2. and still no luck.

~/samples/apps/java-maven $ pack build myapp --builder cnbs/sample-builder:jammy
jammy: Pulling from cnbs/sample-builder
Digest: sha256:6c7164e531a42dc71aa0fb5bba7333e49a9cab1bbc766c93b58358cff8968146
Status: Image is up to date for cnbs/sample-builder:jammy
jammy: Pulling from cnbs/sample-stack-run
Digest: sha256:a169a8c09f43afa7c50c17c91d6dbd319721f97bf7a36560eedc9d2331e491e0
Status: Image is up to date for cnbs/sample-stack-run:jammy
0.15.2: Pulling from buildpacksio/lifecycle
Digest: sha256:e9e6012cf38bf4904f15c0059fe8de9dc79a87279c9ae9b4f4b7a15e81103d7b
Status: Image is up to date for buildpacksio/lifecycle:0.15.2
===> ANALYZING
[analyzer] exec /cnb/lifecycle/analyzer: exec format error
ERROR: failed to build: executing lifecycle: failed with status code: 1
raspberrypi:~/samples/apps/java-maven $ pack report
Pack:
  Version:  0.30.0-pre2+git-b56634e.build-4601
  OS/Arch:  linux/arm64

Default Lifecycle Version:  0.17.0-pre.2

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12

Config:

@natalieparellano
Copy link
Member

Hey @zzart thanks for opening this issue - I think the problem is that even though you're running a pack that's compiled for arm64, the cnbs/sample-builder:jammy is amd64. We have long wanted to publish arm64 sample builders, (buildpacks/samples#114) but this is sadly still awaiting someone with the bandwidth to drive it to completion (if you are such a person we would love to have your help!).

I do know that some folks have had success with arm64 builds - @jericop or @dmikusa might be able to provide more info on how to source those builders.

@zzart
Copy link
Author

zzart commented May 31, 2023

Hey @natalieparellano thanks for a quick reply. I don't have a bandwidth for this type of work but I appreciate your explanation of the issue. I can surly offer some help when it comes to testing it.

@jjbustamante
Copy link
Member

Hi @zzart.

Maybe this links could be helpful for you if you are looking for ARM builders:

And this slack channel thread where we were discussing some stuff for ARM support

@jjbustamante
Copy link
Member

Duplicate of #1570

@jjbustamante jjbustamante marked this as a duplicate of #1570 Aug 14, 2023
@jjbustamante
Copy link
Member

We are working in different initiatives to add support for ARM architecture. I am closing this issue but we will keep track of it on #1570.

Also this RFC is going into the same direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

No branches or pull requests

4 participants