ex_dtls won't compile

I'm sure this is a me issue, but I'm stumped. I've got a membrane project that worked on a different computer. Both are Macs Running mix deps.compile throws an error: ld: library 'ssl' not found clang: error: linker command failed with exit code 1 (use -v to see invocation) could not compile dependency :ex_dtls, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ex_dtls --force", update it with "mix deps.update ex_dtls" or clean it with "mix deps.clean ex_dtls" I've got openssl@3 installed via homebrew, and have the following env variables set export LDFLAGS="-L${BREW_CELLAR}/openssl@3/${OPENSSL_VERSION}/lib" export CFLAGS="-I${BREW_CELLAR}/openssl@3/${OPENSSL_VERSION}/include/" export CPPFLAGS="-I${BREW_CELLAR}/openssl@3/${OPENSSL_VERSION}/include/" What am I missing? Does ex_dtls actually need [email protected] instead? Thanks for the help.
3 Replies
TonyLikeSocks
TonyLikeSocksOP7mo ago
No idea why this worked, but export LIBRARY_PATH:/opt/homebrew/Cellar/openssl@3/3.3.0/lib Fixed it. That env variable isn't set on my other mac, so I'm puzzled as to why that worked.
Michał Śledź
Michał Śledź7mo ago
ExDTLS should try to look for openssl.pc file. There are specified all needed paths like INCLUDE_DIR, etc. Can you make sure your openssl.pc is in searchable by pkg_config? Then, you shouldn't need any of LDFLAGS, CFLAGS, CPPFLAGS and LIBRARY_PATH
TonyLikeSocks
TonyLikeSocksOP7mo ago
so making sure that LIBRARY_PATH is unset first, when I run:
pkg-config --cflags --libs openssl
-I/opt/homebrew/Cellar/openssl@3/3.3.0/include -L/opt/homebrew/Cellar/openssl@3/3.3.0 -lssl -lcrypto
pkg-config --cflags --libs openssl
-I/opt/homebrew/Cellar/openssl@3/3.3.0/include -L/opt/homebrew/Cellar/openssl@3/3.3.0 -lssl -lcrypto
Seems like it should work without the library path hack. 🤷‍♂️ I'm sure this is something with my system. It's odd; new mac, was just getting everything setup and moved over.
Want results from more Discord servers?
Add your server