Python’s M2Crypto fails to compile

When updating my music server, I ran into a compilation error on Python’s M2Crypto. The error message was a little bit strange and not directly related to the package itself:

fatal error: openssl/ecdsa.h: No such file or directory

Obviously, that error is generated from OpenSSL and not directly within M2Crypto. Remembering that there are some known problems with the “bindist” USE flag, I took a look at OpenSSL and OpenSSH. Indeed, “bindist” was set. Simply removing the USE flag from those two packages took care of the problem:


# grep -i 'openssh\|openssl' /etc/portage/package.use
>=dev-libs/openssl-1.0.2m -bindist
net-misc/openssh -bindist

In this case, the problems makes sense based on the error message. The error indicated that the Elliptic Curve Digital Signature Algorithm (ECDSA) header was not found. In the previously-linked page about the “bindist” USE flag, it clearly states that having bindist set will “Disable/Restrict EC algorithms (as they seem to be patented)”.

Cheers,
Nathan Zachary

2 comments

    • richard77 on Wednesday, 6 December 2017 at 15:56
    • Reply

    Shouldn’t the ebuild for M2Crypto be fixed to depend on openssl/ssh to be installed without bindist flag?

      • Zach on Wednesday, 6 December 2017 at 15:59
        Author
      • Reply

      Yes, the M2Crypto ebuild should definitely be updated to reflect this USE flag requirement for OpenSSL and SSH.

Leave a Reply

Your email address will not be published.