Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Mix) Could not compile dependency :libsecp256k1 #954

Closed
AndreiD opened this issue Oct 20, 2018 · 9 comments
Closed

(Mix) Could not compile dependency :libsecp256k1 #954

AndreiD opened this issue Oct 20, 2018 · 9 comments
Labels
waiting on feedback Waiting for original opener to respond if bug is fixed

Comments

@AndreiD
Copy link

AndreiD commented Oct 20, 2018

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 Error when loading token transfers that have no decimal or symbol info #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

@acravenho
Copy link
Contributor

@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
2. cd deps/libsecp256k1
3. rebar3 compile

@acravenho acravenho added the waiting on feedback Waiting for original opener to respond if bug is fixed label Oct 20, 2018
@AndreiD
Copy link
Author

AndreiD commented Oct 20, 2018

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.

@yograterol
Copy link

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

@acravenho
Copy link
Contributor

acravenho commented Oct 20, 2018

Here is a little more background info: mana-ethereum/mana#415 (different project, same issue)

mana-ethereum/mana#413

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

@konstantinzolotarev
Copy link
Contributor

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.

@acravenho
Copy link
Contributor

Thanks @konstantinzolotarev

@acravenho
Copy link
Contributor

Closing this issue due to no new reports.

@Dr4il
Copy link

Dr4il commented Jan 10, 2020

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?

@liotru
Copy link

liotru commented Feb 29, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting on feedback Waiting for original opener to respond if bug is fixed
Projects
None yet
Development

No branches or pull requests

6 participants