Search code examples
c++bitcoinfedora-21

Use self-compiled OpenSSL to compile bitcoin on fedora 21


Right now I can build the bitcoin-qt and execute it but it immediately exits with this Error:

OpenSSL appears to lack support for elliptic curve cryptography. For more information, visit https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries

The website only links to some outdated rpms for fedora 19 but it is also mentioned one could "compile [their] own OpenSSL and use this".

I can download and compile OpenSSL but I never managed to tell bitcoin where OpenSSL is located.

What I tried yesterday: (instructions from https://opennet.hackpad.com/ep/pad/static/HqezreF8xmh )

  • install dependecies

  • export OPENSSL_PREFIX=/tmp/folder1

  • Download and unzip openssl-1.0.2a source code

  • CC='cc -fPIC' ./config --prefix=$OPENSSL_PREFIX

  • make all install_sw

  • Download and unzip bitcoin source code

  • ./autogen.sh

  • ./configure SSL_CFLAGS=' ' SSL_LIBS="$OPENSSL_PREFIX/lib/libssl.a $OPENSSL_PREFIX/lib/libcrypto.a -ldl" CRYPTO_CFLAGS=' ' CRYPTO_LIBS=' '

  • make

But this failed with

libbitcoin_util.a(libbitcoin_util_a-random.o): In function `RandAddSeed()':
/tmp/test2/bitcoin/src/random.cpp:42: undefined reference to `RAND_add'

Solution

  • If you don't mind overwriting your current version of openssl, try to do an "update" to openssl:

    ./config --prefix=/usr --openssldir=/usr/local/openssl shared
    make
    make test
    make install
    

    Source: https://stackoverflow.com/a/22952749/2084795