Open iamgenchi opened 2 years ago
meet the same problem on mac,
@iamgenchi, @oday0311 I recommend you install gcc-10, then build via CFLAGS=-m64 CC=gcc-10 AR=gcc-10-ar CXX=g++-10 ./rebar3 ...
gcc@10: The x86_64 architecture is required for this software. Mac M1 can't installed
Try CFLAGS="-Wno-pointer-sign -Wno-implicit-function-declaration" ./rebar3 compile
~THIS WORKED FOR ME~
God a new delayed compile error. I have no luck getting this to work. Ideas?
Erlang spec:
▶ erl
Erlang/OTP 25 [erts-13.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] [dtrace]
`c++ -O3 -arch x86_64 -finline-functions -fPIC -I /usr/local/Cellar/erlang/25.0_1/lib/erlang/erts-13.0/include/ -I /usr/local/Cellar/erlang/25.0_1/lib/erlang/lib/erl_interface-5.3/include -std=c++11 -Wall -c -o prometheus_process_collector_nif.o prometheus_process_collector_nif.cc
c++ -O3 -arch x86_64 -finline-functions -fPIC -I /usr/local/Cellar/erlang/25.0_1/lib/erlang/erts-13.0/include/ -I /usr/local/Cellar/erlang/25.0_1/lib/erlang/lib/erl_interface-5.3/include -std=c++11 -Wall -c -o prometheus_process_info_macos.o prometheus_process_info_macos.cc
cc prometheus_process_collector_nif.o prometheus_process_info_macos.o -arch x86_64 -flat_namespace -undefined suppress -shared -L /usr/local/Cellar/erlang/25.0_1/lib/erlang/lib/erl_interface-5.3/lib -lei -lstdc++ -o /Users/jonasthoresen/Documents/arweave/_build/default/lib/prometheus_process_collector/c_src/../priv/prometheus_process_collector.so
=ERROR REPORT==== 20-Jun-2022::23:27:49.521771 ===
beam/beam_load.c(148): Error loading module enc:
please re-compile this module with an Erlang/OTP 25 compiler
escript: exception error: undefined function enc:main/1
in function escript:run/2 (escript.erl, line 750)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
===> Hook for compile failed!´´´`
@fremgang you can install Erlang/OTP 23 by running brew install erlang@23
and follow the post install actions by brew.
MacBookPro Processor 2.4 GHz 8-Core Intel Core i9 MacOS Monterey 12.1