1

This question is different to the other Erlang crypto failure question posted as the environment is not Windows, the openssl and libssl-dev prerequisites were installed in the standard way. The issue is identified at source within Erlang, rather than a Riak issue, although it is related.

Installing Erlang 16B02 as a prerequisite for Raik 2.1.1 on Ubuntu 14.04 LTS x64.

Erlang was downloaded and installed as per the riak guide to installing erlang: http://docs.basho.com/riak/latest/ops/building/installing/erlang/

Prequisites installed before Erlang (including openssl and libssl-dev). Build worked fine, erlang shell opens fine.

Riak downloads fine but $ make rel fails with error as follows:-

fatal: Not a git repository (or any of the parent directories): .git
Using rebar.config.lock file to fetch dependencies
./rebar -C rebar.config.lock get-deps
Uncaught error in rebar_core: 
{'EXIT',
  {undef,
      [{crypto,start,[],[]},
  {rebar,run_aux,2,
      [{file,"src/rebar.erl"},{line,212}]},
  {rebar,main,1,
      [{file,"src/rebar.erl"},{line,58}]},
  {escript,run,2,
      [{file,"escript.erl"},{line,747}]},
  {escript,start,1,
      [{file,"escript.erl"},{line,277}]},
  {init,start_it,1,[]},
      {init,start_em,1,[]}]}}
=ERROR REPORT==== 11-Aug-2015::14:42:28 ===
Loading of /usr/local/lib/erlang/lib/crypto-3.1/ebin/crypto.beam failed: badfile
make: *** [locked-deps] Error 1

After some research pointed to erlang crypto being an issue, i tried the following in the erlang shell:

Eshell V5.10.3  (abort with ^G)
1> crypto:start().
** exception error: undefined function crypto:start/0
2> 
=ERROR REPORT==== 11-Aug-2015::14:48:14 ===
Loading of /usr/local/lib/erlang/lib/crypto-3.1/ebin/crypto.beam failed: badfile

This points, in my view to an error with the erlang install which I am unable to resolve. Any suggestions would be appreciated with enormous gratitude.

Mike Hewitson
  • 13
  • 1
  • 5
  • 2
    possible duplicate of [rebar: error exit on create-app: {crypto,start,\[\]}](http://stackoverflow.com/questions/4742184/rebar-error-exit-on-create-app-crypto-start) – legoscia Aug 11 '15 at 15:33
  • Thanks, but I did review that post. While the symptom seems the same, my ssl prerequisites to the erlang build were installed prior to the build in a standard location via apt-get, my implementation is not on Windows (as per the post referred to). – Mike Hewitson Aug 12 '15 at 04:03

1 Answers1

0

You don't say what platform you're on or how you built OTP, but my guess is that ./otp_build (or ./configure) didn't find OpenSSL where expected and silently just left it out.

Using the --with-ssl flag should force it to fail if it doesn't find it, and you can add an explicit path to the switch if you need to.

The Basho OTP build docs aren't as detailed as they might be, but anything from OTP_R16B02_basho8 on should build (and run) correctly on all supported platforms.

TedB
  • 346
  • 2
  • 5
  • Thank you. I did build it with ./otp_build autoconf and ./configure && make && sudo make install. I'll try the ssl force and provide feedback. Platform is Ubuntu 14.04 LTS x64 running under VirtualBox on Windows. – Mike Hewitson Aug 15 '15 at 03:51
  • On Linux x86_64 I build R16B02_basho7/8/9 with `./otp_build setup -a --prefix /opt/basho/otp-16-b8-h0 --enable-64bit --with-ssl --without-odbc --disable-hipe` Obviously you'll want to set the `--prefix` per your setup, but that yields a GA build. – TedB Aug 16 '15 at 19:36
  • Thank you, this worked, getting Erlang to work fine. – Mike Hewitson Aug 18 '15 at 08:29