knative / func

Knative Functions client API and CLI
Apache License 2.0
284 stars 139 forks source link

[bug] Func build fails on jetson with /cnb/lifecycle/creator: exec format error #2447

Open csantanapr opened 4 months ago

csantanapr commented 4 months ago

Func build fails on jetson with /cnb/lifecycle/creator: exec format error

Environment: hardware: Jetson NX OS: Ubuntu Arch: arm64 Kernel: Linux jetson 5.15.136-tegra #1 SMP PREEMPT Wed Jul 3 22:31:57 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

cat /etc/os-release 

PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Reproduce: Install knative, kn, func, 1.15 Create func using getting started docs

func create -l go hello

Run it

func run

A registry for function images is required. For example, 'docker.io/tigerteam'.
? Registry for function images: docker.io/csantanapr
Note: building a function the first time will take longer than subsequent builds
Building function image
Still building
Still building
Error: executing lifecycle: failed with status code: 1

Built it

func build --verbose
A registry for function images is required. For example, 'docker.io/tigerteam'.
? Registry for function images: docker.io/csantanapr
Note: building a function the first time will take longer than subsequent builds
Building function image
Pulling image ghcr.io/knative/builder-jammy-tiny:0.0.240
0.0.240: Pulling from knative/builder-jammy-tiny
Digest: sha256:821791b42f74d8672304c8d27f227d2f9582638b048954a531f66d36465043e0
Status: Image is up to date for ghcr.io/knative/builder-jammy-tiny:0.0.240
CheckReadAccess succeeded for the run image index.docker.io/paketobuildpacks/run-jammy-tiny:latest
Selected run image index.docker.io/paketobuildpacks/run-jammy-tiny:latest
Pulling image index.docker.io/paketobuildpacks/run-jammy-tiny:latest with platform linux/amd64
latest: Pulling from paketobuildpacks/run-jammy-tiny
Digest: sha256:703d6c7b862e3056afd1e4dc29b59039082da337d9d862137186049e2a36e3ee
Status: Image is up to date for paketobuildpacks/run-jammy-tiny:latest
Creating builder with the following buildpacks:
-> paketo-community/rust@0.47.0
-> paketo-buildpacks/procfile@5.7.0
-> paketo-buildpacks/syft@1.46.0
-> paketo-community/cargo@0.11.1
-> paketo-community/rust-dist@1.27.1
-> paketo-community/rustup@1.11.0
-> dev.knative-extensions.go@0.0.6
-> paketo-buildpacks/go@4.8.0
-> paketo-buildpacks/ca-certificates@3.6.8
-> paketo-buildpacks/environment-variables@4.5.7
-> paketo-buildpacks/git@1.0.8
-> paketo-buildpacks/go-build@2.2.1
-> paketo-buildpacks/go-dist@2.5.0
-> paketo-buildpacks/go-mod-vendor@1.0.29
-> paketo-buildpacks/image-labels@4.5.6
-> paketo-buildpacks/procfile@5.6.9
-> paketo-buildpacks/watchexec@2.9.0
-> paketo-buildpacks/java-native-image@9.1.0
-> paketo-buildpacks/bellsoft-liberica@10.5.5
-> paketo-buildpacks/ca-certificates@3.6.8
-> paketo-buildpacks/datadog@5.7.0
-> paketo-buildpacks/environment-variables@4.5.7
-> paketo-buildpacks/executable-jar@6.8.5
-> paketo-buildpacks/gradle@7.9.0
-> paketo-buildpacks/image-labels@4.5.6
-> paketo-buildpacks/leiningen@4.7.1
-> paketo-buildpacks/maven@6.15.14
-> paketo-buildpacks/native-image@5.12.9
-> paketo-buildpacks/procfile@5.6.9
-> paketo-buildpacks/quarkus@0.2.5
-> paketo-buildpacks/sbt@6.12.13
-> paketo-buildpacks/spring-boot@5.27.11
-> paketo-buildpacks/syft@1.45.0
-> paketo-buildpacks/upx@3.4.8
-> paketo-buildpacks/java@12.1.0
-> paketo-buildpacks/apache-tomcat@7.15.3
-> paketo-buildpacks/apache-tomee@1.8.2
-> paketo-buildpacks/azure-application-insights@5.18.3
-> paketo-buildpacks/bellsoft-liberica@10.5.5
-> paketo-buildpacks/ca-certificates@3.6.8
-> paketo-buildpacks/clojure-tools@2.8.17
-> paketo-buildpacks/datadog@5.7.0
-> paketo-buildpacks/dist-zip@5.6.10
-> paketo-buildpacks/encrypt-at-rest@4.5.18
-> paketo-buildpacks/environment-variables@4.5.7
-> paketo-buildpacks/executable-jar@6.8.5
-> paketo-buildpacks/google-stackdriver@9.0.1
-> paketo-buildpacks/gradle@7.9.0
-> paketo-buildpacks/image-labels@4.5.6
-> paketo-buildpacks/jattach@1.6.1
-> paketo-buildpacks/java-memory-assistant@1.4.11
-> paketo-buildpacks/leiningen@4.7.1
-> paketo-buildpacks/liberty@4.0.4
-> paketo-buildpacks/maven@6.15.14
-> paketo-buildpacks/node-engine@3.2.2
-> paketo-buildpacks/procfile@5.6.9
-> paketo-buildpacks/quarkus@0.2.5
-> paketo-buildpacks/sbt@6.12.13
-> paketo-buildpacks/spring-boot@5.27.11
-> paketo-buildpacks/syft@1.45.0
-> paketo-buildpacks/watchexec@2.9.0
-> paketo-buildpacks/yarn@1.3.2
-> paketo-buildpacks/procfile@5.7.0
Using build cache volume pack-cache-csantanapr_hello_latest-c3f36a18fda4.build
Running the creator on OS linux from image pack.local/builder/6f6e786d646676636b65:latest with:
Container Settings:
  Args: /cnb/lifecycle/creator -daemon -launch-cache /launch-cache -log-level debug -app /workspace -cache-dir /cache -run-image index.docker.io/paketobuildpacks/run-jammy-tiny:latest -gid 0 -uid 0 index.docker.io/csantanapr/hello:latest
  System Envs: CNB_PLATFORM_API=0.13
  Image: pack.local/builder/6f6e786d646676636b65:latest
  User: root
  Labels: map[author:pack]
Host Settings:
  Binds: pack-cache-csantanapr_hello_latest-c3f36a18fda4.build:/cache /var/run/docker.sock:/var/run/docker.sock pack-cache-csantanapr_hello_latest-c3f36a18fda4.launch:/launch-cache pack-layers-tsplqvehws:/layers pack-app-dvltmfuvqu:/workspace
  Network Mode: host
exec /cnb/lifecycle/creator: exec format error

Error: failed to build the function: executing lifecycle: failed with status code: 1
Cali0707 commented 4 months ago

/cc @matejvasek @lkingland

maxforasteiro commented 2 months ago

+1 here, having the same problem.