Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for openssl dependency in configure #20

Closed
lhunath opened this issue Nov 5, 2015 · 7 comments
Closed

Check for openssl dependency in configure #20

lhunath opened this issue Nov 5, 2015 · 7 comments

Comments

@lhunath
Copy link

lhunath commented Nov 5, 2015

OpenSSL is required for the build of scrypt, configure should check for its availability to avoid build errors such as:

libcperciva/crypto/crypto_aes.c:6:10: fatal error: 'openssl/aes.h' file not found
#include <openssl/aes.h>
@cperciva
Copy link
Member

cperciva commented Nov 5, 2015

That's what this bit in configure.ac is for:

AC_SEARCH_LIBS([AES_encrypt], [crypto],,
    AC_MSG_ERROR([function AES_ENCRYPT not found]))

Do you have OpenSSL installed but not its headers?

@lhunath
Copy link
Author

lhunath commented Nov 5, 2015

Correct, OS X El Capitan ships with the OpenSSL binaries but not the headers, presumably in an attempt to enforce their deprecation of OpenSSL.

@cperciva
Copy link
Member

cperciva commented Nov 5, 2015

Ick. Ok, I'll add some code to handle that.

@lhunath
Copy link
Author

lhunath commented Nov 5, 2015

As an aside, I've opted to do this before running configure, to ensure scrypt builds with homebrew's openssl if installed:

if hash brew 2>/dev/null; then
    opensslPath=$(brew --prefix openssl)
    export CFLAGS="$CFLAGS -I$opensslPath/include"
    export LDFLAGS="$LDFLAGS -L$opensslPath/lib"
fi

@aaron-baby
Copy link

@lhunath thanks for sharing

@bigendiansmalls
Copy link
Contributor

@gperciva I think this could be closed now, no?

@gperciva
Copy link
Member

Yes, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants