[erlang-questions] R16B03-1 + Redhat with latest openssl RPMs = EC crypto issues still occurring

Adam Bloomston adam@REDACTED
Sat Feb 1 17:44:24 CET 2014


Hello All,

Erlang/OTP latest release (R16B03-1) is still having issues with crypto on
Redhat based installs using the latest SSL packages.
Setup:
 * Amazon EC2 instance; AMI: RHEL-6.4_GA-x86_64-10-Hourly2 (ami-a25415cb)
 * All packages first upgraded via "sudo yum upgrade -y"
 * Pre-requisities installed via: "sudo yum install -y gcc gcc-c++ make
autoconf libxslt fop ncurses-devel openssl-devel *openjdk-devel unixODBC
unixODBC-devel"
  * openssl-devel-1.0.1e-16.el6_5.4.x86_64
 * Installing Erlang/OTP R16B03-1 from source using
http://www.erlang.org/download/otp_src_R16B03-1.tar.gz

Installation of Erlang/OTP R16B03-1 with latest RHEL packages above still
produces an error for crypto package:

---------------------------

$ ./configure && make && sudo make install
[...]
$ erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe]
[kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> m(crypto).
** exception error: undefined function crypto:module_info/0
     in function  c:m/1 (c.erl, line 503)
2>
=ERROR REPORT==== 1-Feb-2014::08:46:05 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library:
'/usr/local/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so: undefined symbol:
EC_GROUP_new_curve_GF2m'"
OpenSSL might not be installed on this system.

=ERROR REPORT==== 1-Feb-2014::08:46:05 ===
The on_load function for module crypto returned {error,
                                                 {load_failed,
                                                  "Failed to load NIF
library: '/usr/local/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so:
undefined symbol: EC_GROUP_new_curve_GF2m'"}}

---------------------------

Installation with argument CFLAGS="-DOPENSSL_NO_EC=1" passed to configure
in order to disable EC solves this issue:

---------------------------

$ ./configure CFLAGS="-DOPENSSL_NO_EC=1" && make && sudo make install
$ erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe]
[kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> m(crypto).
Module crypto compiled: Date: January 23 2014, Time: 17.03
Compiler options:  [{d,'CRYPTO_VSN',"3.2"},

{outdir,"/net/isildur/ldisk/daily_build/r16b03-1_prebuild_opu_o.2014-01-23_17/otp_src_R16B03-1/lib/crypto/src/../ebin"},
                    warnings_as_errors,warn_obsolete_guard,debug_info]
Object file: /usr/local/lib/erlang/lib/crypto-3.2/ebin/crypto.beam
Exports:
[...]

---------------------------

Note that installation with environment variable set prior to calling
configure does not work (took me a while to figure this out since I'm not
that familiar with configure/make):

---------------------------

$ CFLAGS="-DOPENSSL_NO_EC=1"; ./configure && make && sudo make install
[...]
$ erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [async-threads:10] [hipe]
[kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> m(crypto).
** exception error: undefined function crypto:module_info/0
     in function  c:m/1 (c.erl, line 503)
2>
=ERROR REPORT==== 1-Feb-2014::11:40:33 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library:
'/usr/local/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so: undefined symbol:
EC_GROUP_new_curve_GF2m'"
OpenSSL might not be installed on this system.

=ERROR REPORT==== 1-Feb-2014::11:40:33 ===
The on_load function for module crypto returned {error,
                                                 {load_failed,
                                                  "Failed to load NIF
library: '/usr/local/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so:
undefined symbol: EC_GROUP_new_curve_GF2m'"}}

---------------------------

Any questions, please let me know. If you would like me to provide more
verbose logs I can easily rerun steps above.

Best,
Adam

Sources:
 * http://imperialwicket.com/aws-install-erlang-otp-on-amazon-linux
 *
http://docs.basho.com/riak/latest/ops/building/installing/erlang/#Installing-on-GNU-Linux
 *
https://github.com/RoadRunnr/otp/blob/master/HOWTO/INSTALL.md#How-to-Build-and-Install-ErlangOTP_Prebuilt-Source-Release
 * https://groups.google.com/forum/#!topic/erlang-programming/wW6Uuz4VO2w
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140201/bcd302f0/attachment.htm>


More information about the erlang-questions mailing list