processone / fast_tls

TLS / SSL OpenSSL-based native driver for Erlang / Elixir
https://www.ejabberd.im
Other
83 stars 37 forks source link

Eliptic Curve support causes compile failure #12

Closed binarytemple-external closed 6 years ago

binarytemple-external commented 7 years ago

On a Redhat 7.2 system, while trying to compile MongooseIM which depends upon:

{fast_tls, ".*", {git, "git://github.com/processone/fast_tls.git", {tag, "1.0.7"}}},

I get the following error:

   ==> fast_tls (compile)                                                                                       
Compiling /common/MongooseIM/deps/fast_tls/c_src/fast_tls_drv.c                                              
In file included from /usr/include/openssl/ecdsa.h:68:0,                                                     
                 from /usr/include/openssl/x509.h:87,                                                        
                 from /usr/include/openssl/ssl.h:156,                                                        
                 from /common/MongooseIM/deps/fast_tls/c_src/fast_tls_drv.c:22:                              
/usr/include/openssl/ec.h:82:2: error: #error EC is disabled.                                                
 #error EC is disabled.                                                                                      
  ^                                                                                                          
ERROR: compile failed while processing /common/MongooseIM/deps/fast_tls: rebar_abort                         
make: *** [rel] Error 1

Eliptic curve support has always been an issue for Erlang, I've been through this a ton of times on OSX (compiling Erlang from source), but not had to deal with it in a dependency before. I've got the following dependencies installed:

openssl-1.0.1e-60.el7.x86_64            
openssl-libs-1.0.1e-51.el7_2.7.x86_64   
openssl-devel-1.0.1e-60.el7.x86_64      
openssl-libs-1.0.1e-60.el7.x86_64       

Any suggestions?

prefiks commented 6 years ago

I am guessing this was compiled agains FIPS openssl? make CFLAGS="-DOPENSSL_NO_EC" should be able to compile it, i don't this we can detect that at compilation time, maybe configure could have test added for that, but i don't even know what openssl trigger that error.