Blockscout: (Mix) Could not compile dependency :libsecp256k1

Created on 20 Oct 2018  路  9Comments  路  Source: blockscout/blockscout

Describe your issue here.

Environment

Ubuntu 18.04

  • Elixir & Erlang/OTP versions (elixir -version):

Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Elixir 1.7.3 (compiled with Erlang/OTP 20)

  • Operating System:
    Ubuntu 18.04

Steps to reproduce

Following the tutorial:

On:
mix do deps.get, local.rebar --force, deps.compile, compile

I get:
unicode_util_compat 0.3.1
wallaby 0.20.0
websocket_client 1.3.0
wobserver 0.1.8

  • Getting libsecp256k1 (Hex package)
  • creating /root/.mix/rebar
  • creating /root/.mix/rebar3
    ===> Compiling parse_trans
    ===> Compiling websocket_client
    ===> Compiling mimerl
    ===> Compiling libsecp256k1
    HEAD is now at d333521 Merge #494: Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
    ./autogen.sh: 3: ./autogen.sh: autoreconf: not found
    ===> Hook for compile failed!

* (Mix) Could not compile dependency :libsecp256k1, "/root/.mix/rebar3 bare compile --paths "/root/blockscout/_build/dev/lib//ebin"" command failed. You can recompile this dependency with "mix deps.compile libsecp256k1", update it with "mix deps.update libsecp256k1" or clean it with "mix deps.clean libsecp256k1"

I get

Expected behaviour

To work

Actual behaviour

Crashes

waiting on feedback

Most helpful comment

BTW I fixed this using apk --no-cache --update add automake libtool inotify-tools autoconf in linux.

Check that you have installed automake libtool inotify-tools autoconf this packages are required to be able to compile project.

All 9 comments

@AndreiD
libsecp256k1 is setup to work with rebar, not rebar3.

For rebar3 compatibility edit deps/libsecp256k1/rebar3.config and add the following to the top:

{plugins, [pc]}.

{provider_hooks,
 [
  {pre,
   [
    {compile, {pc, compile}},
    {clean, {pc, clean}}
   ]
  }
 ]
}.

then

  1. cd deps/libsecp256k1
  2. rebar3 compile

I have no idea what is rebar, and why you need version 3 or 66 or 583.12312
I just followed the tutorial. I don't want to learn what is rebar, nor erlang // elixir.

Can't you do a verified step by step for noobs tutorial, that you make sure it works on a clean install...

It wouldn't hurt to remove so many config files and figure out a system where new people don't get confused on why they need to modify the dev config file or test config file.

I had the same issue, in Ubuntu 18.04 @acravenho I will try it.

Here is a little more background info: https://github.com/poanetwork/mana/issues/415 (different project, same issue)

https://github.com/poanetwork/mana/pull/413

I appreciate the help. I'll add a fix to the documentation when we can finalize a solution. Sorry for the inconvenience.

BTW I fixed this using apk --no-cache --update add automake libtool inotify-tools autoconf in linux.

Check that you have installed automake libtool inotify-tools autoconf this packages are required to be able to compile project.

Thanks @konstantinzolotarev

Closing this issue due to no new reports.

Ubuntu 18.04, installed tools:
automake libtool inotify-tools autoconf
executing command: mix do deps.get, local.rebar --force, deps.compile, compile
still returns
could not compile dependency :libsecp256k1, "mix compile" failed. You can recompile this dependency with "mix deps.compile libsecp256k1", update it with "mix deps.update libsecp256k1" or clean it with "mix deps.clean libsecp256k1"
Do you have any ideas?

Ubuntu 18.04, installed tools:
automake libtool inotify-tools autoconf
executing command: mix do deps.get, local.rebar --force, deps.compile, compile
still returns
could not compile dependency :libsecp256k1, "mix compile" failed. You can recompile this dependency with "mix deps.compile libsecp256k1", update it with "mix deps.update libsecp256k1" or clean it with "mix deps.clean libsecp256k1"
Do you have any ideas?

Be sure you have all prereqs installed from: https://docs.blockscout.com/for-developers/information-and-settings/requirements

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SVINCHAIN picture SVINCHAIN  路  3Comments

pedrouid picture pedrouid  路  4Comments

vbaranov picture vbaranov  路  7Comments

dwalintukan picture dwalintukan  路  5Comments

pashagonchar picture pashagonchar  路  5Comments