anoma / green

https://anoma.github.io/anoma/
MIT License
7 stars 0 forks source link

Burrito output binary not running #397

Closed murisi closed 2 months ago

murisi commented 7 months ago

customer: @mariari performer: deadline: null estimated: null started: null actual: null completed: null confirmed: null dependencies:


Running make release followed by ./burrito_out/anoma_linux on openSUSE Tumbleweed on an AMD CPU produces the following error:

17:32:22.237 [warning] The on_load function for module rocksdb returned:
{:error,
 {:load_failed,
  ~c"Failed to load NIF library: 'Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by $HOME/.local/share/.burrito/anoma_erts-14.2.1_0.11.0/lib/rocksdb-1.8.0/priv/liberocksdb.so)'"}}

Changing the latter command to LD_LIBRARY_PATH=/lib64 ./burrito_out/anoma_linux changes the error to:

17:33:04.487 [warning] The on_load function for module rocksdb returned:
{:error,
 {:load_failed,
  ~c"Failed to load NIF library: 'Error relocating $HOME/.local/share/.burrito/anoma_erts-14.2.1_0.11.0/lib/rocksdb-1.8.0/priv/liberocksdb.so: __cxa_thread_atexit_impl: symbol not found'"}}

On my machine, these issues are fixed by changing the Makefile as follows:

-ENV = CC="$(CWD)/zig-cc" CFLAGS='-target x86_64-linux-gnu.2.20' CXX="$(CWD)/zig-c++" CXXFLAGS='-target x86_64-linux-gnu.2.20'
+ENV = CC="$(CWD)/zig-cc" CFLAGS='-target x86_64-linux-musl' CXX="$(CWD)/zig-c++" CXXFLAGS='-target x86_64-linux-musl'

It seems that these issues stem from $HOME/.local/share/.burrito/anoma_erts-14.2.1_0.11.0/erts-14.2.1/bin/erlexec using musl libc and our NIFs using GNU libc when the set of symbols exported by each libc is different.

juped commented 2 months ago

Closed as a subtask of anoma/anoma-archive#1265