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

docker build fails on M1 mac #3799

Open
thepiwo opened this issue Dec 16, 2021 · 3 comments
Open

docker build fails on M1 mac #3799

thepiwo opened this issue Dec 16, 2021 · 3 comments
Labels
area/build-system Issues or PRs related to the build system area/ci Issues or PRs related to continuous integration kind/improvement

Comments

@thepiwo
Copy link
Contributor

thepiwo commented Dec 16, 2021

  1. adjusted the builder to build on arm64: https://github.com/thepiwo/docker-builder/commit/c1650ec2bba9844d504daabd73039ed657eabd80
  2. aeternity core docker build fails with g++: error: unrecognized command line option '-m64' in the cuckoo compile
  3. adding ENV GPP_ARCH_FLAGS "-march=native -x c++" makes the build run without errors
  4. running the docker image fails
Exec: /home/aeternity/node/erts-10.7.2.3/bin/erlexec -boot /home/aeternity/node/releases/6.3.0+115.a5b4cfbf/aeternity -mode embedded -boot_var SYSTEM_LIB_DIR /home/aeternity/node/lib -config /home/aeternity/node/releases/6.3.0+115.a5b4cfbf/sys.config -args_file /home/aeternity/node/releases/6.3.0+115.a5b4cfbf/vm.args -- console -noinput
Root: /home/aeternity/node
/home/aeternity/node
2021-12-16 15:56:56.528257 supervisor_report   #{label=>{supervisor,start_error},report=>[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{on_load_function_failed,ecrecover}},{offender,[{pid,undefined},{id,kernel_safe_sup},{mfargs,{supervisor,start_link,[{local,kernel_safe_sup},kernel,safe]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
2021-12-16 15:56:56.528275 crash_report        #{label=>{proc_lib,crash},report=>[[{initial_call,{supervisor,kernel,['Argument__1']}},{pid,<0.1275.0>},{registered_name,[]},{error_info,{exit,{on_load_function_failed,ecrecover},[{init,run_on_load_handlers,0,[]},{kernel,init,1,[{file,"kernel.erl"},{line,189}]},{supervisor,init,1,[{file,"supervisor.erl"},{line,295}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{ancestors,[kernel_sup,<0.1250.0>]},{message_queue_len,0},{messages,[]},{links,[<0.1252.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,265}],[]]}
2021-12-16 15:56:57.537260 crash_report        #{label=>{proc_lib,crash},report=>[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.1249.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,ecrecover}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,138}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{ancestors,[<0.1248.0>]},{message_queue_len,1},{messages,[{'EXIT',<0.1250.0>,normal}]},{links,[<0.1248.0>,<0.1247.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,193}],[]]}
2021-12-16 15:56:57.540270 std_info            #{label=>{application_controller,exit},report=>[{application,kernel},{exited,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,ecrecover}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,ecrecover}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,ecrecover}}},{kernel,start,[normal,[]]}}})
@thepiwo thepiwo added the need/triage New issues which need to be categorized label Dec 16, 2021
@thepiwo
Copy link
Contributor Author

thepiwo commented Jan 28, 2022

added a flag switch in aecuckoo: aeternity/aecuckoo#4
added ecrecover prebuilt for linux arm64: aeternity/ecrecover-prebuilt#4
added ecrecover plugin switch for updated prebuilt: aeternity/rebar3-ecrecover-prebuilt-plugin#2
updated dependencies: #3845
updated builder dockerfile: aeternity/docker-builder#44

@thepiwo
Copy link
Contributor Author

thepiwo commented Jan 28, 2022

published an example image thats cross compatible at thepiwo/aeternity:m1

build using buildx docker buildx build --platform linux/amd64,linux/arm64 -t thepiwo/aeternity:m1 --push .

docker pull thepiwo/aeternity:m1
docker run -it --rm thepiwo/aeternity:m1

@dincho
Copy link
Member

dincho commented Apr 1, 2022

All deps seems merged now, posted a comment in #3845 to move this forward.

@dincho dincho added kind/feature Issues or PRs related to a new feature area/ci Issues or PRs related to continuous integration kind/improvement area/build-system Issues or PRs related to the build system and removed kind/feature Issues or PRs related to a new feature need/triage New issues which need to be categorized labels Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-system Issues or PRs related to the build system area/ci Issues or PRs related to continuous integration kind/improvement
Projects
None yet
Development

No branches or pull requests

2 participants