Closed jamesray1 closed 6 years ago
@jamesray1 looks like the issue with the eth-secp256k1 crate not anything special with libp2p. Could you try pulling that crate, build it and if the error persists report it there, including your OS- and C-Compiler-Versions? If it only happens within libp2p, please feel free to reopen this ticket.
As suggested to clone/pull and build the crate, it finishes compiling but there are a lot of warnings, although the errors don't occur: gist. (This includes the system info and gcc compiler version.)
@tomaka may you please open the issue tracker in that repo?
Also, after building the original secp256k1
successfully, the rust-libp2p master still failed to build. A gist of that is here.
I'm still getting the above errors when building the latest master, which is pulling against the latest PR in the secp256k1 crate:
➜ jrl git:(master) git fetch upstream master;
git reset --hard upstream/master;
git clean -d --force;
From https://github.com/libp2p/rust-libp2p
* branch master -> FETCH_HEAD
HEAD is now at 4d8da24 Fix the Default implementation of Ping (#501)
➜ jrl git:(master) cargo build
Compiling eth-secp256k1 v0.5.7 (https://github.com/paritytech/rust-secp256k1#db81cfea)
Compiling unsigned-varint v0.2.1
Compiling tokio-udp v0.1.1
Compiling tokio-fs v0.1.1
Compiling rayon v0.8.2
Compiling chashmap v2.2.1 (https://github.com/redox-os/tfs#3e7dcdb0)
error: could not find native static library `secp256k1`, perhaps an -L flag is missing?
Compiling yamux v0.1.0 (https://github.com/paritytech/yamux#672859c4)
error: aborting due to previous error
The following warnings were emitted during compilation:
# warnings elided
error: Could not compile `eth-secp256k1`.
warning: build failed, waiting for other jobs to finish...
error: build failed
PS this occurs both in GNOME terminal and VS code integrated terminal. I would reopen if I could.
My environment is as detailed here.
Can anyone reproduce this?
For what it's worth, you can disable secp256k1 by passing --no-default-features --features "libp2p-secio"
when compiling.
Thanks for your replies, however this doesn't work:
➜ lp2p git:(gossipsub-v-7) ✗ cargo build --no-default-features --features "libp2p-secio"
Compiling rw-stream-sink v0.1.0 (file:///home/james/rust/lp2p/misc/rw-stream-sink)
Compiling multiaddr v0.3.0 (file:///home/james/rust/lp2p/misc/multiaddr)
Compiling tokio-tls v0.1.4
Compiling ring v0.12.1
Compiling libp2p-core v0.1.0 (file:///home/james/rust/lp2p/core)
error: could not find native static library `ring-test`, perhaps an -L flag is missing?
error: aborting due to previous error
error: Could not compile `ring`.
warning: build failed, waiting for other jobs to finish...
error: build failed
➜ lp2p git:(gossipsub-v-7) ✗
This kind of fix (and passing something else for ring) may be OK temporarily, but doesn't seem very convenient or like a proper fix.
PS, the same results with the master
branch, after refreshing to the latest commit.
This is similar to https://github.com/rust-lang/cargo/issues/1185.
This issue is three years old and has been long fixed. It is very likely that you have some sort of misconfiguration in your system, but I don't know how to help you without going through a long and extensive remote diagnosing session.
This is with the master branch as it is now: