R16B03-1 + Redhat with latest openssl RPMs = EC crypto issues still occurring

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

R16B03-1 + Redhat with latest openssl RPMs = EC crypto issues still occurring

Adam Bloomston
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.html>

Reply | Threaded
Open this post in threaded view
|

R16B03-1 + Redhat with latest openssl RPMs = EC crypto issues still occurring

Per Hedeland-4
Adam Bloomston <adam> wrote:
>
>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

That commandline does not set CFLAGS as an environment variable (unless
you have done 'export CFLAGS' earlier in the same shell), only as a
shell variable - not visible to 'configure'. You probably want to drop the
semicolon:

$ CFLAGS="-DOPENSSL_NO_EC=1" ./configure && make && sudo make install

- which sets CFLAGS as an environment variable for the following command
(i.e. configure) only. Whether configure actually pays attention to it
is another thing (I believe it does), but at least it has the
possibility.

--Per Hedeland

Reply | Threaded
Open this post in threaded view
|

R16B03-1 + Redhat with latest openssl RPMs = EC crypto issues still occurring

Adam Bloomston
Thanks for the tip Peter. When I look back at Andreas Schultz post I see he
had specified it as you put it, i.e. without a semicolon. I mistakenly read
it as having a semicolon.

Best,
Adam


On Sun, Feb 2, 2014 at 5:26 PM, Per Hedeland <per> wrote:

> Adam Bloomston <adam> wrote:
> >
> >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
>
> That commandline does not set CFLAGS as an environment variable (unless
> you have done 'export CFLAGS' earlier in the same shell), only as a
> shell variable - not visible to 'configure'. You probably want to drop the
> semicolon:
>
> $ CFLAGS="-DOPENSSL_NO_EC=1" ./configure && make && sudo make install
>
> - which sets CFLAGS as an environment variable for the following command
> (i.e. configure) only. Whether configure actually pays attention to it
> is another thing (I believe it does), but at least it has the
> possibility.
>
> --Per Hedeland
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140202/0062f60a/attachment.html>