Skip to content

Commit bb882d0

Browse files
committed
Merge pull request #6732
a3874c7 doc: no longer require use of openssl in OpenBSD build guide (Wladimir J. van der Laan) 5978388 build: remove libressl check (Wladimir J. van der Laan)
2 parents f297042 + a3874c7 commit bb882d0

File tree

2 files changed

+6
-45
lines changed

2 files changed

+6
-45
lines changed

configure.ac

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -700,27 +700,12 @@ else
700700
fi
701701
fi
702702

703-
CFLAGS_TEMP="$CFLAGS"
703+
CXXFLAGS_TEMP="$CXXFLAGS"
704704
LIBS_TEMP="$LIBS"
705-
CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"
705+
CXXFLAGS="$CXXFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"
706706
LIBS="$LIBS $SSL_LIBS $CRYPTO_LIBS"
707707
AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),)
708-
709-
AC_MSG_CHECKING(for a supported OpenSSL version)
710-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
711-
#include <openssl/rand.h>
712-
]],
713-
[[RAND_egd(NULL);]])],
714-
[AC_MSG_RESULT(yes)],
715-
[
716-
AC_ARG_WITH([libressl],
717-
[AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])],
718-
[AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])],
719-
[AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])]
720-
)]
721-
)
722-
723-
CFLAGS="$CFLAGS_TEMP"
708+
CXXFLAGS="$CXXFLAGS_TEMP"
724709
LIBS="$LIBS_TEMP"
725710

726711
BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)

doc/build-openbsd.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,6 @@ config_opts="runtime-link=shared threadapi=pthread threading=multi link=static v
7070
./b2 -d0 -j4 ${config_opts} --prefix=${BOOST_PREFIX} install
7171
```
7272

73-
### OpenSSL
74-
75-
OpenBSD uses a replacement of OpenSSL: LibreSSL. This can cause compatibility issues, hence `./configure` will bark if you try to compile with this library:
76-
77-
Detected LibreSSL: This is NOT supported, and may break consensus compatibility!
78-
79-
To install a 'real' OpenSSL use:
80-
81-
pkg_add openssl
82-
83-
Any program linked against this library can only be used after setting the dynamic library path:
84-
85-
export LD_LIBRARY_PATH="/usr/local/lib/eopenssl"
86-
87-
(otherwise there will be an error about not being able to find `libcrypto.so.1.0`)
88-
89-
Alternatively, pass `--with-libressl` to `./configure`, however as the warning says, this is NOT supported, and may cause problems syncing the chain, or the node to fork off the network in unexpected circumstances.
90-
9173
### Building BerkeleyDB
9274

9375
BerkeleyDB is only necessary for the wallet functionality. To skip this, pass `--disable-wallet` to `./configure`.
@@ -124,28 +106,24 @@ export AUTOCONF_VERSION=2.69 # replace this with the autoconf version that you i
124106
export AUTOMAKE_VERSION=1.15 # replace this with the automake version that you installed
125107
./autogen.sh
126108
```
109+
Make sure `BDB_PREFIX` and `BOOST_PREFIX` are set to the appropriate paths from the above steps.
127110

128111
To configure with wallet:
129112
```bash
130113
./configure --with-gui=no --with-boost=$BOOST_PREFIX \
131114
CC=egcc CXX=eg++ CPP=ecpp \
132-
SSL_CFLAGS="-I/usr/local/include/eopenssl" SSL_LIBS="-L/usr/local/lib/eopenssl -lssl" \
133-
CRYPTO_CFLAGS="-I/usr/local/include/eopenssl" CRYPTO_LIBS="-L/usr/local/lib/eopenssl -lcrypto" \
134115
LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
135116
```
136117

137118
To configure without wallet:
138119
```bash
139120
./configure --disable-wallet --with-gui=no --with-boost=$BOOST_PREFIX \
140-
CC=egcc CXX=eg++ CPP=ecpp \
141-
SSL_CFLAGS="-I/usr/local/include/eopenssl" SSL_LIBS="-L/usr/local/lib/eopenssl -lssl" \
142-
CRYPTO_CFLAGS="-I/usr/local/include/eopenssl" CRYPTO_LIBS="-L/usr/local/lib/eopenssl -lcrypto"
121+
CC=egcc CXX=eg++ CPP=ecpp
143122
```
144123

145124
Build and run the tests:
146125
```bash
147126
gmake
148-
export LD_LIBRARY_PATH="/usr/local/lib/eopenssl"
149127
gmake check
150128
```
151129

@@ -164,9 +142,7 @@ pkg_add llvm boost
164142
```
165143

166144
```bash
167-
./configure --disable-wallet --with-gui=no CC=clang CXX=clang++ \
168-
SSL_CFLAGS="-I/usr/local/include/eopenssl" SSL_LIBS="-L/usr/local/lib/eopenssl -lssl" \
169-
CRYPTO_CFLAGS="-I/usr/local/include/eopenssl" CRYPTO_LIBS="-L/usr/local/lib/eopenssl -lcrypto"
145+
./configure --disable-wallet --with-gui=no CC=clang CXX=clang++
170146
gmake
171147
```
172148

0 commit comments

Comments
 (0)