Closed sgfn closed 7 months ago
Hi @balena, what do you think about @sgfn's proposition?
Could we open a PR with proposed changes @balena ?
Hi @Rados13 and @sgfn, sorry the delay to respond.
Definitely it seems a reasonable solution, if you have time, please open a PR so this change can be easily merged and a new version pushed to Hex.
Hi, It appears that because of the structure of the Makefile, having
LDFLAGS
set in the env makes the compilation of Sippet fail on Apple Silicon.In our app, we're using Sippet as well as
fast_tls
. The issue is,fast_tls
needsLDFLAGS
to contain the path to the OpenSSL library (i.e.LDFLAGS=-L/opt/homebrew/opt/openssl/lib
), and will not compile otherwise. When we try to compile everything at once, though, linking of Sippet fails because the Makefile uses conditional variable assignment?=
and does not overwrite/append toLDFLAGS
if it is already set -- which is the case.As far as I've tested, the only linker flag necessary for Sippet to compile successfully with this setup is
-undefined suppress
.The most straightforward way of alleviating this issue I can think of is to always append the
-undefined suppress
flag, since it is necessary to link anyway. This is a simple fix, and doesn't change the general behaviour of the Makefile:Please let me know whether you're OK with this solution, and I'll be happy to make the relevant PR.
Logs from the failed linking for reference: