<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
A fresh install of Bitcoin v22.0 is not going through on Ubuntu 20.04, with an underlying fresh install of Berkeley DB version 18.1.4. The same error was obtained on two completely unrelated systems.
Expected behavior
No error on installation
Actual behavior
The following error:
Making all in src
make[1]: Entering directory '/mnt/projects/crypto/bitcoin/src'
make[2]: Entering directory '/mnt/projects/crypto/bitcoin/src'
make[3]: Entering directory '/mnt/projects/crypto/bitcoin'
make[3]: Leaving directory '/mnt/projects/crypto/bitcoin'
CXXLD bitcoind
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_verify_callback':
repmgr_net.c:(.text+0x247): undefined reference to `X509_STORE_CTX_get_current_cert'
/usr/bin/ld: repmgr_net.c:(.text+0x252): undefined reference to `X509_STORE_CTX_get_error_depth'
/usr/bin/ld: repmgr_net.c:(.text+0x25d): undefined reference to `X509_STORE_CTX_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x28c): undefined reference to `X509_get_issuer_name'
/usr/bin/ld: repmgr_net.c:(.text+0x29c): undefined reference to `X509_NAME_oneline'
/usr/bin/ld: repmgr_net.c:(.text+0x2be): undefined reference to `X509_get_subject_name'
/usr/bin/ld: repmgr_net.c:(.text+0x2ce): undefined reference to `X509_NAME_oneline'
/usr/bin/ld: repmgr_net.c:(.text+0x2f0): undefined reference to `X509_verify_cert_error_string'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_conn_info_setup.isra.0':
repmgr_net.c:(.text+0x446): undefined reference to `SSL_free'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_set_ssl_ctx':
repmgr_net.c:(.text+0x138d): undefined reference to `OPENSSL_init_ssl'
/usr/bin/ld: repmgr_net.c:(.text+0x1399): undefined reference to `OPENSSL_init_ssl'
/usr/bin/ld: repmgr_net.c:(.text+0x13a5): undefined reference to `OPENSSL_init_crypto'
/usr/bin/ld: repmgr_net.c:(.text+0x13b1): undefined reference to `TLS_method'
/usr/bin/ld: repmgr_net.c:(.text+0x13b9): undefined reference to `SSL_CTX_new'
/usr/bin/ld: repmgr_net.c:(.text+0x13d9): undefined reference to `SSL_CTX_set_verify'
/usr/bin/ld: repmgr_net.c:(.text+0x13f6): undefined reference to `SSL_CTX_set_cipher_list'
/usr/bin/ld: repmgr_net.c:(.text+0x147b): undefined reference to `SSL_CTX_use_certificate_file'
/usr/bin/ld: repmgr_net.c:(.text+0x14ee): undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
/usr/bin/ld: repmgr_net.c:(.text+0x1502): undefined reference to `SSL_CTX_use_PrivateKey_file'
/usr/bin/ld: repmgr_net.c:(.text+0x1512): undefined reference to `SSL_CTX_check_private_key'
/usr/bin/ld: repmgr_net.c:(.text+0x1530): undefined reference to `SSL_CTX_load_verify_locations'
/usr/bin/ld: repmgr_net.c:(.text+0x1541): undefined reference to `SSL_CTX_set_default_verify_paths'
/usr/bin/ld: repmgr_net.c:(.text+0x1584): undefined reference to `SSL_CTX_set_verify_depth'
/usr/bin/ld: repmgr_net.c:(.text+0x1600): undefined reference to `SSL_CTX_free'
/usr/bin/ld: repmgr_net.c:(.text+0x174d): undefined reference to `SSL_CTX_free'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_accept':
repmgr_net.c:(.text+0x1842): undefined reference to `SSL_new'
/usr/bin/ld: repmgr_net.c:(.text+0x1858): undefined reference to `SSL_set_fd'
/usr/bin/ld: repmgr_net.c:(.text+0x1874): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x187c): undefined reference to `SSL_accept'
/usr/bin/ld: repmgr_net.c:(.text+0x18cf): undefined reference to `SSL_is_init_finished'
/usr/bin/ld: repmgr_net.c:(.text+0x18fb): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x1905): undefined reference to `SSL_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x19c0): undefined reference to `SSL_free'
/usr/bin/ld: repmgr_net.c:(.text+0x19c5): undefined reference to `ERR_clear_error'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_connect':
repmgr_net.c:(.text+0x1c53): undefined reference to `SSL_new'
/usr/bin/ld: repmgr_net.c:(.text+0x1c71): undefined reference to `SSL_set_fd'
/usr/bin/ld: repmgr_net.c:(.text+0x1c76): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x1c7e): undefined reference to `SSL_connect'
/usr/bin/ld: repmgr_net.c:(.text+0x1cd8): undefined reference to `SSL_is_init_finished'
/usr/bin/ld: repmgr_net.c:(.text+0x1cfb): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x1d06): undefined reference to `SSL_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x1d5c): undefined reference to `SSL_new'
/usr/bin/ld: repmgr_net.c:(.text+0x1e7a): undefined reference to `SSL_free'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_shutdown':
repmgr_net.c:(.text+0x20c4): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x20cc): undefined reference to `SSL_shutdown'
/usr/bin/ld: repmgr_net.c:(.text+0x20f3): undefined reference to `SSL_shutdown'
/usr/bin/ld: repmgr_net.c:(.text+0x20fb): undefined reference to `SSL_free'
/usr/bin/ld: repmgr_net.c:(.text+0x221b): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_write':
repmgr_net.c:(.text+0x2d72): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x2d80): undefined reference to `SSL_write'
/usr/bin/ld: repmgr_net.c:(.text+0x2e03): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x2e0e): undefined reference to `SSL_get_error'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_readv':
repmgr_net.c:(.text+0x4e2d): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x4e64): undefined reference to `SSL_read'
/usr/bin/ld: repmgr_net.c:(.text+0x4e76): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x4e82): undefined reference to `SSL_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x4eb6): undefined reference to `SSL_shutdown'
/usr/bin/ld: repmgr_net.c:(.text+0x4ffa): undefined reference to `SSL_pending'
/usr/bin/ld: repmgr_net.c:(.text+0x5042): undefined reference to `SSL_pending'
/usr/bin/ld: repmgr_net.c:(.text+0x51be): undefined reference to `SSL_shutdown'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_read_possible':
repmgr_net.c:(.text+0x5325): undefined reference to `SSL_pending'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_posix.o): in function `__repmgr_conn_work':
repmgr_posix.c:(.text+0x380): undefined reference to `SSL_pending'
/usr/bin/ld: repmgr_posix.c:(.text+0x3d7): undefined reference to `SSL_pending'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_sel.o): in function `__repmgr_read_from_site':
repmgr_sel.c:(.text+0x3e58): undefined reference to `SSL_pending'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:5933: bitcoind] Error 1
make[2]: Leaving directory '/mnt/projects/crypto/bitcoin/src'
make[1]: *** [Makefile:16186: all-recursive] Error 1
make[1]: Leaving directory '/mnt/projects/crypto/bitcoin/src'
make: *** [Makefile:821: all-recursive] Error 1
To reproduce
I followed a flow inspired from this gist
- Install all required dependencies
sudo apt install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev libminiupnpc-dev libzmq3-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev
- Get and install current Berkeley DB version
cd /mnt/projects/crypto
wget http://download.oracle.com/berkeley-db/db-18.1.40.tar.gz
tar -xvzf db-18.1.40.tar.gz
cd db-18.1.40/build_unix
mkdir /mnt/projects/crypto/berkeley-db
BDB_PREFIX=/mnt/projects/crypto/berkeley-db
../dist/configure --disable-shared --enable-cxx --with-pic --prefix=$BDB_PREFIX
mkdir ../docs/bdb-sql ../docs/gsg_db_server
sudo make install
- Get the latest Bitcoin stable version and install
cd /mnt/projects/crypto
git clone git@github.com:bitcoin/bitcoin.git
cd bitcoin
git checkout v22.0
./autogen.sh
mkdir /mnt/projects/crypto/bitcoin_build
./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" --with-gui --with-incompatible-bdb --with-zmq --enable-zmq --prefix=/mnt/projects/crypto/bitcoin_build
- Get the error
Making all in src
make[1]: Entering directory '/mnt/projects/crypto/bitcoin/src'
make[2]: Entering directory '/mnt/projects/crypto/bitcoin/src'
make[3]: Entering directory '/mnt/projects/crypto/bitcoin'
make[3]: Leaving directory '/mnt/projects/crypto/bitcoin'
CXXLD bitcoind
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_verify_callback':
repmgr_net.c:(.text+0x247): undefined reference to `X509_STORE_CTX_get_current_cert'
/usr/bin/ld: repmgr_net.c:(.text+0x252): undefined reference to `X509_STORE_CTX_get_error_depth'
/usr/bin/ld: repmgr_net.c:(.text+0x25d): undefined reference to `X509_STORE_CTX_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x28c): undefined reference to `X509_get_issuer_name'
/usr/bin/ld: repmgr_net.c:(.text+0x29c): undefined reference to `X509_NAME_oneline'
/usr/bin/ld: repmgr_net.c:(.text+0x2be): undefined reference to `X509_get_subject_name'
/usr/bin/ld: repmgr_net.c:(.text+0x2ce): undefined reference to `X509_NAME_oneline'
/usr/bin/ld: repmgr_net.c:(.text+0x2f0): undefined reference to `X509_verify_cert_error_string'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_conn_info_setup.isra.0':
repmgr_net.c:(.text+0x446): undefined reference to `SSL_free'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_set_ssl_ctx':
repmgr_net.c:(.text+0x138d): undefined reference to `OPENSSL_init_ssl'
/usr/bin/ld: repmgr_net.c:(.text+0x1399): undefined reference to `OPENSSL_init_ssl'
/usr/bin/ld: repmgr_net.c:(.text+0x13a5): undefined reference to `OPENSSL_init_crypto'
/usr/bin/ld: repmgr_net.c:(.text+0x13b1): undefined reference to `TLS_method'
/usr/bin/ld: repmgr_net.c:(.text+0x13b9): undefined reference to `SSL_CTX_new'
/usr/bin/ld: repmgr_net.c:(.text+0x13d9): undefined reference to `SSL_CTX_set_verify'
/usr/bin/ld: repmgr_net.c:(.text+0x13f6): undefined reference to `SSL_CTX_set_cipher_list'
/usr/bin/ld: repmgr_net.c:(.text+0x147b): undefined reference to `SSL_CTX_use_certificate_file'
/usr/bin/ld: repmgr_net.c:(.text+0x14ee): undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
/usr/bin/ld: repmgr_net.c:(.text+0x1502): undefined reference to `SSL_CTX_use_PrivateKey_file'
/usr/bin/ld: repmgr_net.c:(.text+0x1512): undefined reference to `SSL_CTX_check_private_key'
/usr/bin/ld: repmgr_net.c:(.text+0x1530): undefined reference to `SSL_CTX_load_verify_locations'
/usr/bin/ld: repmgr_net.c:(.text+0x1541): undefined reference to `SSL_CTX_set_default_verify_paths'
/usr/bin/ld: repmgr_net.c:(.text+0x1584): undefined reference to `SSL_CTX_set_verify_depth'
/usr/bin/ld: repmgr_net.c:(.text+0x1600): undefined reference to `SSL_CTX_free'
/usr/bin/ld: repmgr_net.c:(.text+0x174d): undefined reference to `SSL_CTX_free'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_accept':
repmgr_net.c:(.text+0x1842): undefined reference to `SSL_new'
/usr/bin/ld: repmgr_net.c:(.text+0x1858): undefined reference to `SSL_set_fd'
/usr/bin/ld: repmgr_net.c:(.text+0x1874): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x187c): undefined reference to `SSL_accept'
/usr/bin/ld: repmgr_net.c:(.text+0x18cf): undefined reference to `SSL_is_init_finished'
/usr/bin/ld: repmgr_net.c:(.text+0x18fb): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x1905): undefined reference to `SSL_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x19c0): undefined reference to `SSL_free'
/usr/bin/ld: repmgr_net.c:(.text+0x19c5): undefined reference to `ERR_clear_error'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_connect':
repmgr_net.c:(.text+0x1c53): undefined reference to `SSL_new'
/usr/bin/ld: repmgr_net.c:(.text+0x1c71): undefined reference to `SSL_set_fd'
/usr/bin/ld: repmgr_net.c:(.text+0x1c76): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x1c7e): undefined reference to `SSL_connect'
/usr/bin/ld: repmgr_net.c:(.text+0x1cd8): undefined reference to `SSL_is_init_finished'
/usr/bin/ld: repmgr_net.c:(.text+0x1cfb): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x1d06): undefined reference to `SSL_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x1d5c): undefined reference to `SSL_new'
/usr/bin/ld: repmgr_net.c:(.text+0x1e7a): undefined reference to `SSL_free'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_shutdown':
repmgr_net.c:(.text+0x20c4): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x20cc): undefined reference to `SSL_shutdown'
/usr/bin/ld: repmgr_net.c:(.text+0x20f3): undefined reference to `SSL_shutdown'
/usr/bin/ld: repmgr_net.c:(.text+0x20fb): undefined reference to `SSL_free'
/usr/bin/ld: repmgr_net.c:(.text+0x221b): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_write':
repmgr_net.c:(.text+0x2d72): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x2d80): undefined reference to `SSL_write'
/usr/bin/ld: repmgr_net.c:(.text+0x2e03): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x2e0e): undefined reference to `SSL_get_error'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_readv':
repmgr_net.c:(.text+0x4e2d): undefined reference to `ERR_clear_error'
/usr/bin/ld: repmgr_net.c:(.text+0x4e64): undefined reference to `SSL_read'
/usr/bin/ld: repmgr_net.c:(.text+0x4e76): undefined reference to `ERR_print_errors_fp'
/usr/bin/ld: repmgr_net.c:(.text+0x4e82): undefined reference to `SSL_get_error'
/usr/bin/ld: repmgr_net.c:(.text+0x4eb6): undefined reference to `SSL_shutdown'
/usr/bin/ld: repmgr_net.c:(.text+0x4ffa): undefined reference to `SSL_pending'
/usr/bin/ld: repmgr_net.c:(.text+0x5042): undefined reference to `SSL_pending'
/usr/bin/ld: repmgr_net.c:(.text+0x51be): undefined reference to `SSL_shutdown'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_net.o): in function `__repmgr_ssl_read_possible':
repmgr_net.c:(.text+0x5325): undefined reference to `SSL_pending'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_posix.o): in function `__repmgr_conn_work':
repmgr_posix.c:(.text+0x380): undefined reference to `SSL_pending'
/usr/bin/ld: repmgr_posix.c:(.text+0x3d7): undefined reference to `SSL_pending'
/usr/bin/ld: /mnt/projects/crypto/berkeley-db/lib//libdb_cxx.a(repmgr_sel.o): in function `__repmgr_read_from_site':
repmgr_sel.c:(.text+0x3e58): undefined reference to `SSL_pending'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:5933: bitcoind] Error 1
make[2]: Leaving directory '/mnt/projects/crypto/bitcoin/src'
make[1]: *** [Makefile:16186: all-recursive] Error 1
make[1]: Leaving directory '/mnt/projects/crypto/bitcoin/src'
make: *** [Makefile:821: all-recursive] Error 1
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
System information
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
Bitcoin Core v22.0 from Github (cf commands above)
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
Tested on both Ubuntu 20.04 as host system (no VM) and Ubuntu 20.04 as guest system (as VM)
<!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->
<!-- Any extra information that might be useful in the debugging process. -->
Please note this was highly reproducible as fresh install on two different Ubuntu 20.04 systems.
<!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->