opentimestamps / opentimestamps-client

OpenTimestamps client
Other
288 stars 84 forks source link

libssl missing some constants #7

Closed RCasatta closed 8 years ago

RCasatta commented 8 years ago

From this machine:

[xxx@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-194.17.1.0.1.el5 #1 SMP Wed Sep 29 15:40:03 EDT 2010 i686 i686 i386 GNU/Linux
[xxx@localhost ~]$ cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)

It appears libssl is missing some constant needed by python-bitcoinlib.

Traceback (most recent call last):
  File "./ots", line 16, in <module>
    import otsclient.args
  File "/home/xxx/opentimestamps-client-opentimestamps-client-v0.2.2/otsclient/args.py", line 22, in <module>
    import otsclient.cmds
  File "/home/xxx/opentimestamps-client-opentimestamps-client-v0.2.2/otsclient/cmds.py", line 22, in <module>
    import bitcoin.rpc
  File "/home/xxx/opentimestamps-client-opentimestamps-client-v0.2.2/bitcoin/rpc.py", line 48, in <module>
    from bitcoin.wallet import CBitcoinAddress, CBitcoinSecret
  File "/home/xxx/opentimestamps-client-opentimestamps-client-v0.2.2/bitcoin/wallet.py", line 29, in <module>
    import bitcoin.core.key
  File "/home/xxx/opentimestamps-client-opentimestamps-client-v0.2.2/bitcoin/core/key.py", line 102, in <module>
    _ssl.EC_GROUP_get_curve_GFp.restype = ctypes.c_int
  File "/usr/local/lib/python3.5/ctypes/__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.5/ctypes/__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /lib/libssl.so.6: undefined symbol: EC_GROUP_get_curve_GFp

Since AFAIK shouldn't be a problem for opentimestamps, I brutally commented out all the problematic line in key.py and ./ots is working.

I am publishing here for reference.

Issuing the command sudo yum install openssl-devel which sould be platform equivalent to sudo apt-get install libssl-dev does not help.

petertodd commented 8 years ago

Ah, yeah, I believe you're using one of the versions of RedHat that left out ECC crypto from libssl... apparently they left it out because of the software patents on ECC. :(

This really should be documented in python-bitcoinlib, although fortunately it shouldn't be a problem going forwar; I believe RedHat has since changed this policy, as the patents are now all expired.