source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

macOS Sierra: "Library not found for -lcrypto"

Open noodlecollie opened this issue 7 years ago • 2 comments

Building the single-player code with XCode 8.2.1 on Sierra results in the error "Library not found for -lcrypto", along with a warning that the sp/src/lib/common/osx32 directory cannot be found. Copying the sp/src/lib/common/linux32 directory (which contains libcrypto.a) and renaming it to osx32 seems to work around the issue.

Is this a misconfiguration issue on my part, or have there been changes to the toolchain in macOS that now require this new folder? I don't often compile on Mac so have virtually no experience with it all.

noodlecollie avatar Mar 27 '17 11:03 noodlecollie

same problem here. it doesn't work with mp either.

tpan496 avatar Apr 21 '17 22:04 tpan496

The issue seems to lie with OpenSSL and I've managed to fix this issue by doing this: Get OpenSSL by opening the Terminal and typing brew install openssl. When that's done, head to it's install directory (in my case it's /usr/local/opt/openssl/lib/). Then copy libcrypto.a and paste it into /sp/src/lib/common/osx32 (create the osx32 folder if it doesn’t exist), now try compiling. This is what fixed it for me.

GamerDude27 avatar Mar 04 '18 16:03 GamerDude27