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

(OpenBSD 5.7) configure: error: Detected LibreSSL: This is NOT supported, and may break consensus compatibility! #6486

Closed
ghost opened this issue Jul 28, 2015 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 28, 2015

No description provided.

@luke-jr
Copy link
Member

luke-jr commented Jul 28, 2015

Yes, install OpenSSL instead.

@ghost
Copy link
Author

ghost commented Jul 28, 2015

OpenSSL installed, but does not solve the problem.

@luke-jr
Copy link
Member

luke-jr commented Jul 28, 2015

Please post config.log and what version of OpenSSL you are using.

@ghost
Copy link
Author

ghost commented Jul 28, 2015

225 KB (229.387 B)
http://vpaste.net/ni5IC

@ghost
Copy link
Author

ghost commented Jul 28, 2015

I compile it --with-libressl flag.

@luke-jr
Copy link
Member

luke-jr commented Jul 29, 2015

The paste is incomplete; what version of OpenSSL is this?

@ghost
Copy link
Author

ghost commented Jul 29, 2015

OpenSSL 1.0.1k

@laanwj
Copy link
Member

laanwj commented Sep 27, 2015

The problem here, it appeared, is that OpenBSD, when you use pkg_add openssl installs openssl as the pkg-config package eopenssl:

orion@lethe:~/bitcoin$ pkg-config --libs --cflags openssl  
-I/usr/include -L/usr/lib -lssl -lcrypto
orion@lethe:~/bitcoin$ pkg-config --libs --cflags eopenssl 
-I/usr/local/include -L/usr/local/lib/eopenssl -lssl -lcrypto

But couldn't even work around this with the painful:

./configure ... SSL_CFLAGS="$(pkg-config --cflags eopenssl)" SSL_LIBS="$(pkg-config --libs eopenssl)" CRYPTO_CFLAGS="$(pkg-config --cflags eopenssl)" CRYPTO_LIBS="$(pkg-config --libs eopenssl)"

config.log shows:

configure:26667: checking for a supported OpenSSL version
configure:26682: eg++ -o conftest -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter  -Wstack-protector -fstack-protector-all -fPIE  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2   -Wl,-z,relro -Wl,-z,now -pie conftest.cpp  -L/usr/local/lib/eopenssl -lssl -lcrypto -L/usr/local/lib/eopenssl -lssl -lcrypto >&5
conftest.cpp: In function 'int main()':
conftest.cpp:68:14: error: 'RAND_egd' was not declared in this scope
 RAND_egd(NULL);
              ^

Multiple problems here, which I could eventually work around:

  • The libressl check ignores SSL_CFLAGS/CRYPTO_CFLAGS: fixed in build: set CXXFLAGS for libressl probe #6729
  • pkg-config --cflags eopenssl returns -I/usr/local/include, should be -I/usr/local/include/eopenssl (upstream issue)

After applying #6729, explicitly specifying the locations works:

./configure ... SSL_CFLAGS="-I/usr/local/include/eopenssl" SSL_LIBS="-L/usr/local/lib/eopenssl -lssl" CRYPTO_CFLAGS="-I/usr/local/include/eopenssl" CRYPTO_LIBS="-L/usr/local/lib/eopenssl -lcrypto"

I can forgive you for eventually going with --with-libressl flag.

Edit: Happy we can drop the libressl check after switching to secp256k1 verification...

Edit.2: this fixes compiling; for running e.g. the tests you need export LD_LIBRARY_PATH="/usr/local/lib/eopenssl"

@dcousens
Copy link
Contributor

Can be closed?

@laanwj laanwj closed this as completed Nov 20, 2015
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants