libp2p / rust-libp2p

The Rust Implementation of the libp2p networking stack.
https://libp2p.io
MIT License
4.54k stars 946 forks source link

secp256k1 doesn't compile #416

Closed jamesray1 closed 6 years ago

jamesray1 commented 6 years ago

This is with the master branch as it is now:

Executing task: cargo test <

   Compiling mio-uds v0.6.6
   Compiling regex v1.0.0
   Compiling eth-secp256k1 v0.5.7 (https://github.com/paritytech/rust-secp256k1#db81cfea)
   Compiling ring v0.13.2
   Compiling tokio-codec v0.1.0
error: could not find native static library `secp256k1`, perhaps an -L flag is missing?

error: aborting due to previous error

The following warnings were emitted during compilation:

warning: In file included from depend/secp256k1/src/secp256k1.c:13,
warning:                  from depend/secp256k1/src/ext.c:8:
warning: depend/secp256k1/src/group_impl.h:686:12: warning: ‘secp256k1_gej_has_quad_y_var’ defined but not used [-Wunused-function]
warning:  static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) {
warning:             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: depend/secp256k1/src/group_impl.h:267:12: warning: ‘secp256k1_gej_is_valid_var’ defined but not used [-Wunused-function]
warning:  static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
warning:             ^~~~~~~~~~~~~~~~~~~~~~~~~~
warning: In file included from depend/secp256k1/src/ext.c:8:
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_parse’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:154:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘input’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:156:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(input != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_serialize’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘output’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:175:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(output != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘outputlen’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:171:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(outputlen != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:177:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_signature_parse_der’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:216:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘input’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:217:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(input != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_signature_parse_compact’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:234:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘input64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:235:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(input64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_signature_serialize_der’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘output’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:253:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(output != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘outputlen’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:254:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(outputlen != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:255:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_signature_serialize_compact’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘output64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:265:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(output64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:266:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_signature_normalize’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sigin’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:279:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sigin != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_verify’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:300:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:299:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:301:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_sign’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘signature’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:353:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(signature != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:352:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:354:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_seckey_verify’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:396:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_create’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:411:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:414:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_privkey_negate’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:430:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_negate’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:443:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_privkey_tweak_add’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:460:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘tweak’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:461:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(tweak != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_tweak_add’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:484:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘tweak’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:485:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(tweak != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_privkey_tweak_mul’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:507:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘tweak’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:508:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(tweak != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_tweak_mul’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:530:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘tweak’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:531:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(tweak != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ec_pubkey_combine’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubnonce’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:559:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubnonce != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubnonces’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/secp256k1.c:562:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubnonces != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdh’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘result’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/ecdh/main_impl.h:20:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(result != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘point’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/ecdh/main_impl.h:21:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(point != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘scalar’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/ecdh/main_impl.h:22:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(scalar != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_schnorr_sign’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:31:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:30:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:32:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_schnorr_verify’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:66:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:65:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:67:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_schnorr_recover’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:80:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:79:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:78:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_schnorr_generate_nonce_pair’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubnonce’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:102:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubnonce != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘privnonce32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:103:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(privnonce32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_schnorr_partial_sign’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:140:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:139:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sec32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:141:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sec32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubnonce_others’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:143:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubnonce_others != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘secnonce32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:142:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(secnonce32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_schnorr_partial_combine’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:158:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig64sin’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/schnorr/main_impl.h:160:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig64sin != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_recoverable_signature_parse_compact’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:44:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘input64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:45:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(input64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_recoverable_signature_serialize_compact’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘output64’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:64:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(output64 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘recid’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:66:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(recid != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:65:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_recoverable_signature_convert’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sig’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:79:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sig != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘sigin’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:80:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(sigin != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_sign_recoverable’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘signature’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:132:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(signature != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:131:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘seckey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:133:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(seckey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/ext.c: In function ‘secp256k1_ecdsa_recover’:
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘pubkey’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:179:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(pubkey != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘signature’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:178:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(signature != NULL);
warning:      ^~~~~~~~~
warning: depend/secp256k1/src/secp256k1.c:22:8: warning: nonnull argument ‘msg32’ compared to NULL [-Wnonnull-compare]
warning:      if (EXPECT(!(cond), 0)) { \
warning:         ^
warning: depend/secp256k1/src/modules/recovery/main_impl.h:177:5: note: in expansion of macro ‘ARG_CHECK’
warning:      ARG_CHECK(msg32 != NULL);
warning:      ^~~~~~~~~

error: Could not compile `eth-secp256k1`.
warning: build failed, waiting for other jobs to finish...
error: build failed
The terminal process terminated with exit code: 101
gnunicorn commented 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.

jamesray1 commented 6 years ago

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
jamesray1 commented 6 years ago

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?

tomaka commented 6 years ago

For what it's worth, you can disable secp256k1 by passing --no-default-features --features "libp2p-secio" when compiling.

jamesray1 commented 6 years ago

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.

jamesray1 commented 6 years ago

This is similar to https://github.com/rust-lang/cargo/issues/1185.

tomaka commented 6 years ago

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.