Closed jhw closed 1 year ago
Hello! It's probably not a wrong path issue, but rather a flag that is missing or incorrect for M1 or arm64. When the library is a shared library it should add the -shared
flag to the ld
command. Perhaps that's not the correct flag in your environment.
I unfortunately do not have that platform to test.
You can try again adding V=1
at the end of the make
commands you run to get more output. V=2
or V=3
will get you even more output.
OK noted. Thank you very much, I will try and resolve elsewhere.
Hello
I'm having problems linking Erlang to a shared C library (dylib on Mac) using
erlang.mk
, and would really like a small amount of helpI think it's a path issue, but I could be wrong
I'm running a Mac M1 with Erlang installed via
kerl
The C library is called Sunvox, a small software synth
https://warmplace.ru/soft/sunvox/sunvox_lib.php
My
c_src
structure is as follows -I have been careful to use the ARM version of the
dylib
, not the x86 versionc_src/sunvox_nif.c
looks as follows -My
Makefile
looks as follows -DYLD_LIBRARY_PATH
is set as follows -Running
make clean && make
does the following -It feels like compilation works fine but the linker can't find code for the erlang nif functions used in
sunvox_nif.c
I notice that
erlang.mk
generatesc_src/env.mk
-These all seem valid; here's what's in each -
Anything important missing from the above?
All help gratefully received. Thank you