PIVX: Latest OpenSSL 1.1.0e incorrectly detected as LibreSSL during build

Describe the issue

After updating to OpenSSL 1.1.0e I can no longer build. configure fails with:

configure: error: Detected LibreSSL: This is NOT supported, and may break consensus compatibility!

I don’t have LibreSSL anywhere on my system though. I tried configure --with-libressl which runs successfully but then make fails:

Making all in src
make[1]: Entering directory '/mnt/tank/projects/PIVX/src'
make[2]: Entering directory '/mnt/tank/projects/PIVX/src'
  CXX      libbitcoinconsensus_la-allocators.lo
  CXX      primitives/libbitcoinconsensus_la-transaction.lo
  CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
  CXX      crypto/libbitcoinconsensus_la-scrypt.lo
  CXX      crypto/libbitcoinconsensus_la-sha1.lo
  CXX      crypto/libbitcoinconsensus_la-sha256.lo
  CXX      crypto/libbitcoinconsensus_la-sha512.lo
  CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
  CXX      libbitcoinconsensus_la-eccryptoverify.lo
  CXX      libbitcoinconsensus_la-ecwrapper.lo
ecwrapper.cpp: In function ‘int {anonymous}::ECDSA_SIG_recover_key_GFp(EC_KEY*, ECDSA_SIG*, const unsigned char*, int, int, int)’:
ecwrapper.cpp:62:28: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
     if (!BN_add(x, x, ecsig->r)) {
                            ^~
In file included from ecwrapper.h:11:0,
                 from ecwrapper.cpp:5:
/usr/include/openssl/ec.h:1044:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
 typedef struct ECDSA_SIG_st ECDSA_SIG;
                ^~~~~~~~~~~~
ecwrapper.cpp:118:34: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
     if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) {
                                  ^~
In file included from ecwrapper.h:11:0,
                 from ecwrapper.cpp:5:
/usr/include/openssl/ec.h:1044:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
 typedef struct ECDSA_SIG_st ECDSA_SIG;
                ^~~~~~~~~~~~
ecwrapper.cpp:123:31: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
     if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) {
                               ^~
In file included from ecwrapper.h:11:0,
                 from ecwrapper.cpp:5:
/usr/include/openssl/ec.h:1044:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
 typedef struct ECDSA_SIG_st ECDSA_SIG;
                ^~~~~~~~~~~~
ecwrapper.cpp: In member function ‘bool CECKey::Recover(const uint256&, const unsigned char*, int)’:
ecwrapper.cpp:221:31: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
     BN_bin2bn(&p64[0], 32, sig->r);
                               ^~
In file included from ecwrapper.h:11:0,
                 from ecwrapper.cpp:5:
/usr/include/openssl/ec.h:1044:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
 typedef struct ECDSA_SIG_st ECDSA_SIG;
                ^~~~~~~~~~~~
ecwrapper.cpp:222:32: error: invalid use of incomplete type ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
     BN_bin2bn(&p64[32], 32, sig->s);
                                ^~
In file included from ecwrapper.h:11:0,
                 from ecwrapper.cpp:5:
/usr/include/openssl/ec.h:1044:16: note: forward declaration of ‘ECDSA_SIG {aka struct ECDSA_SIG_st}’
 typedef struct ECDSA_SIG_st ECDSA_SIG;
                ^~~~~~~~~~~~
make[2]: *** [Makefile:6085: libbitcoinconsensus_la-ecwrapper.lo] Error 1
make[2]: Leaving directory '/mnt/tank/projects/PIVX/src'
make[1]: *** [Makefile:6949: all-recursive] Error 1
make[1]: Leaving directory '/mnt/tank/projects/PIVX/src'
make: *** [Makefile:592: all-recursive] Error 1

What version of PIVX Core are you using?

Latest master, commit id 6b5cf7f8b

Machine specs:

  • OS: Arch Linux

Any extra information that might be useful in the debugging process.

config.log here

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 24

Most upvoted comments

Confirmed. The same build issue happens on debian stretch/testing.

For those who want to compile pivx on a debian, just make sure you have an older libss-dev pkg installed: apt-get install libssl1.0-dev

@ITwrx to get it to compile you can change the depends fontconfig requirement to 2.12.1 and apply this patch

Until this is resolved, you can use the depends system to self-compile. see https://github.com/PIVX-Project/PIVX/blob/master/depends/README.md for more info.