Edge-home-orchestration-go: Build error occurred in arm architecture

Created on 28 Oct 2020  ·  10Comments  ·  Source: lf-edge/edge-home-orchestration-go

Describe the bug
During $./build.sh container arm or $./build.sh container arm64, I got the following build error.

**********************************
 Create Docker container
**********************************

Error: No such container: edge-orchestration
Error: No such image: edge-orchestration:baobab
docker build --tag edge-orchestration:baobab --file /home/t25kim/work/edge-home-orchestration-go/GoMain/Dockerfile --build-arg PLATFORM=arm32v7 .
Sending build context to Docker daemon  301.4MB
Step 1/17 : ARG PLATFORM
Step 2/17 : FROM $PLATFORM/ubuntu:16.04
 ---> 8eedc387cb89
Step 3/17 : ENV TARGET_DIR=/edge-orchestration
 ---> Using cache
 ---> 5f0a61e388ca
Step 4/17 : ENV HTTP_PORT=56001
 ---> Using cache
 ---> b067bb7683b3
Step 5/17 : ENV MDNS_PORT=5353
 ---> Using cache
 ---> 075a5c1d1c28
Step 6/17 : ENV MNEDC_PORT=8000
 ---> Using cache
 ---> c2bc2afb2a0a
Step 7/17 : ENV MNEDC_BROADCAST_PORT=3333
 ---> Using cache
 ---> 5730d8bb2687
Step 8/17 : ENV ZEROCONF_PORT=42425
 ---> Using cache
 ---> b6b101e9d328
Step 9/17 : ENV APP_MAIN_DIR=GoMain
 ---> Using cache
 ---> b6d791035071
Step 10/17 : ENV APP_BIN_DIR=$APP_MAIN_DIR/bin
 ---> Using cache
 ---> e178739df475
Step 11/17 : ENV APP_NAME=edge-orchestration
 ---> Using cache
 ---> e75f9b70dc2c
Step 12/17 : RUN apt update
 ---> Running in 244a90de8ea7
standard_init_linux.go:211: exec user process caused "exec format error"
The command '/bin/sh -c apt update' returned a non-zero code: 1
Makefile:94: recipe for target 'build-container' failed
make: *** [build-container] Error 1

To Reproduce
Steps to reproduce the behavior:
$./build.sh container arm or $./build.sh container arm64

bug

Most helpful comment

@MoonkiHong I reproduced this issue and as I wrote earlier (and created a commit) it would be correct for each platform to create its own Dockerfile (This will solve the current problem).
P.S. Without creating a separate configuration for each hardware platform, we will greatly complicate our build machine.

All 10 comments

In the end, this is related to the general policy to support the platform extension, that I raised as https://github.com/lf-edge/edge-home-orchestration-go/issues/127. @tdrozdovsky Any thought about this?

@MoonkiHong I reproduced this issue and as I wrote earlier (and created a commit) it would be correct for each platform to create its own Dockerfile (This will solve the current problem).
P.S. Without creating a separate configuration for each hardware platform, we will greatly complicate our build machine.

@MoonkiHong I reproduced this issue and as I wrote earlier (and created a commit) it would be correct for each platform to create its own Dockerfile (This will solve the current problem).
P.S. Without creating a separate configuration for each hardware platform, we will greatly complicate our build machine.

@tdrozdovsky Makes sense. What about considering the design of resolution after the Coconut release from yours?

@MoonkiHong I can fix this problem today. When have you Coconut release?
Of course a new build system can be proposed later (this task takes more time)

@tdrozdovsky Coconut release is by the end of October, this month. Let us start to resolve this issue from November. Thank you.

@MoonkiHong I will try to do this today so that the Coconut release will be without this issue. And also today I will eliminate one more inaccuracy with the documentation, which arose with the last commits. These will be different commits

@MoonkiHong I will try to do this today so that the Coconut release will be without this issue. And also today I will eliminate one more inaccuracy with the documentation, which arose with the last commits. These will be different commits

@tdrozdovsky Really appreciate your passionate contribution!

@tdrozdovsky Just for the checker, we can successfully build the package for arm without any code modification w.r.t. the proper guidance from
https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/, which means to apply a revision of the build environment. What about guiding this script properly in the regarding document then? (instead of a separate build system design)

@tdrozdovsky Just for the checker, we can successfully build the package for arm without any code modification w.r.t. the proper guidance from
https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/, which means to apply a revision of the build environment. What about guiding this script properly in the regarding document then? (instead of a separate build system design)

@t25kim Thank you for your another great suggestion and evaluation for this issue! (including the self build validation w.r.t. the guidance as well)

@MoonkiHong I have prepared changes to fix this issue, but still need to test. When everything is ready, I will create a PR.

Was this page helpful?
0 / 5 - 0 ratings