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

bin/test is not working on Mac M1 #412

Open
leeduckgo opened this issue Mar 14, 2023 · 5 comments
Open

bin/test is not working on Mac M1 #412

leeduckgo opened this issue Mar 14, 2023 · 5 comments

Comments

@leeduckgo
Copy link

===> Verifying dependencies...
CMake Deprecation Warning at CMakeLists.txt:29 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


Consolidate compiler generated dependencies of target randomx
[100%] Built target randomx
make: `/Users/liaohua/arweave/apps/arweave/c_src/../priv/arweave.so' is up to date.
make: `/Users/liaohua/arweave/apps/ar_sqlite3/c_src/../priv/ar_sqlite3_driver' is up to date.
===> Analyzing applications...
===> Compiling arweave
===> Compiling ar_sqlite3
===> Running tests...
{"init terminating in do_boot",{undef,[{ar_mine_randomx,vdf_sha2_nif,[<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1>>,<<34,225,70,181,196,3,57,108,142,87,198,163,187,45,40,166,58,13,37,77,56,205,218,234,210,13,110,77,156,97,62,221>>,24,0,2],[]},{ar_vdf,compute2,3,[{file,"/Users/liaohua/arweave/apps/arweave/src/ar_vdf.erl"},{line,16}]},{timer,tc,1,[{file,"timer.erl"},{line,166}]},{ar,benchmark_vdf,0,[{file,"/Users/liaohua/arweave/apps/arweave/src/ar.erl"},{line,689}]},{ar,start,1,[{file,"/Users/liaohua/arweave/apps/arweave/src/ar.erl"},{line,560}]},{ar,tests,2,[{file,"/Users/liaohua/arweave/apps/arweave/src/ar.erl"},{line,731}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{ar_mine_randomx,vdf_sha2_nif,[,,24,0,2],[]},{ar_vdf,compute2,3,[{_},{_}]},{timer,tc,1,[{_},{_}]},{ar,benchmark_vdf,0,[{_},{_}]},{ar,start,1,[{_},{_}]},{ar,tests,2

Crash dump is being written to: erl_crash.dump...done

Erl version: Erlang/OTP 24
Machine: Mac M1

@leeduckgo
Copy link
Author

leeduckgo commented Mar 14, 2023

Try after compiled:

$ ./start

WARN: ************************************************************************
WARN: Your maximum number of open file descriptors is currently set to 256.
WARN: We recommend setting that limit to 1000000 or higher.
WARN:
WARN: Otherwise, consider setting your max_connections setting to something
WARN: lower than your file descriptor limit.
WARN: ************************************************************************

Launching Erlang Virtual Machine...
Exec: /Users/liaohua/arweave/_build/testnet/rel/arweave/erts-12.0.3/bin/erlexec -noinput +Bd -boot /Users/liaohua/arweave/_build/testnet/rel/arweave/releases/2.6.3.0/start -mode embedded -boot_var SYSTEM_LIB_DIR /Users/liaohua/arweave/_build/testnet/rel/arweave/lib -config /Users/liaohua/arweave/_build/testnet/rel/arweave/releases/2.6.3.0/sys.config -args_file /Users/liaohua/arweave/_build/testnet/rel/arweave/releases/2.6.3.0/vm.args -- foreground +MBas aobf +MBlmbcs 512 +Ktrue +A20 +SDio20 +sbwtvery_long +sbwtdcpuvery_long +sbwtdiovery_long +swtvery_low +swtdcpuvery_low +swtdiovery_low +Bi -run ar main
Root: /Users/liaohua/arweave/_build/testnet/rel/arweave
/Users/liaohua/arweave/_build/testnet/rel/arweave
=ERROR REPORT==== 14-Mar-2023::14:23:14.589859 ===
Error in process <0.703.0> on node 'arweave@127.0.0.1' with exit value:
{{badmatch,{error,{load_failed,"Failed to load NIF library: 'dlopen(/Users/liaohua/arweave/_build/testnet/rel/arweave/lib/arweave-2.6.3.0/priv/arweave.so, 0x0002): tried: '/Users/liaohua/arweave/_build/testnet/rel/arweave/lib/arweave-2.6.3.0/priv/arweave.so' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))'"}}},
 [{ar_mine_randomx,init_nif,0,
                   [{file,"/Users/liaohua/arweave/apps/arweave/src/ar_mine_randomx.erl"},
                    {line,448}]},
  {init,'-run_on_load_handlers/2-fun-0-',1,[]}]}

=SUPERVISOR REPORT==== 14-Mar-2023::14:23:14.589937 ===
    supervisor: {local,kernel_sup}
    errorContext: start_error
    reason: {on_load_function_failed,ar_mine_randomx}
    offender: [{pid,undefined},
               {id,kernel_safe_sup},
               {mfargs,{supervisor,start_link,
                                   [{local,kernel_safe_sup},kernel,safe]}},
               {restart_type,permanent},
               {significant,false},
               {shutdown,infinity},
               {child_type,supervisor}]

=CRASH REPORT==== 14-Mar-2023::14:23:14.590620 ===
  crasher:
    initial call: supervisor:kernel/1
    pid: <0.699.0>
    registered_name: []
    exception exit: {on_load_function_failed,ar_mine_randomx}
      in function  init:run_on_load_handlers/0
      in call from kernel:init/1 (kernel.erl, line 189)
      in call from supervisor:init/1 (supervisor.erl, line 330)
      in call from gen_server:init_it/2 (gen_server.erl, line 423)
      in call from gen_server:init_it/6 (gen_server.erl, line 390)
    ancestors: [kernel_sup,<0.674.0>]
    message_queue_len: 0
    messages: []
    links: [<0.676.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 28
    reductions: 256
  neighbours:

=CRASH REPORT==== 14-Mar-2023::14:23:15.592734 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.673.0>
    registered_name: []
    exception exit: {{shutdown,
                         {failed_to_start_child,kernel_safe_sup,
                             {on_load_function_failed,ar_mine_randomx}}},
                     {kernel,start,[normal,[]]}}
      in function  application_master:init/4 (application_master.erl, line 142)
    ancestors: [<0.672.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.674.0>,normal}]
    links: [<0.672.0>,<0.671.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 376
    stack_size: 28
    reductions: 191
  neighbours:

=INFO REPORT==== 14-Mar-2023::14:23:15.596011 ===
    application: kernel
    exited: {{shutdown,
                 {failed_to_start_child,kernel_safe_sup,
                     {on_load_function_failed,ar_mine_randomx}}},
             {kernel,start,[normal,[]]}}
    type: permanent

^C{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,ar_mine_randomx}}},{kernel,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,ar_mine_randomx}}},{kernel,start,[normal,[]

Crash dump is being written to: erl_crash.dump...done
Arweave Heartbeat: The Arweave server has terminated. It will restart in 15 seconds.
Arweave Heartbeat: If you would like to avoid this, press control+c to kill the server.

@ldmberman
Copy link
Member

Hi @leeduckgo, we have just merged the M1 port - fetch the latest master, remove the _build folder and retry.

@leeduckgo
Copy link
Author

Hi @leeduckgo, we have just merged the M1 port - fetch the latest master, remove the _build folder and retry.

erl_crash.dump.zip

Retry it but still not working TAT. ↑ the logs see above

@ldmberman
Copy link
Member

Ah, I think you need to fetch the submodule - git submodule update --init

@leeduckgo
Copy link
Author

Sorry, Try it yet but not working well, I will try to debug this weekend🤣.

Ah, I think you need to fetch the submodule - git submodule update --init

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