nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Cannot build v1.3.0 due to curl-sys–related linker error #53

Closed mateon1 closed 6 years ago

mateon1 commented 7 years ago
    Updating registry `https://github.com/rust-lang/crates.io-index`

Package         Installed  Latest    Needs update
cargo-update    v1.1.2     v1.3.0    Yes

Updating cargo-update
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing cargo-update v1.3.0
   Compiling unicode-normalization v0.1.5
   Compiling array_tool v0.4.1
   Compiling ansi_term v0.9.0
   Compiling openssl-probe v0.1.1
   Compiling void v1.0.2
   Compiling serde v1.0.15
   Compiling matches v0.1.6
   Compiling unicode-xid v0.0.4
   Compiling json v0.11.10
   Compiling quote v0.3.15
   Compiling semver-parser v0.7.0
   Compiling cc v1.0.0
   Compiling bitflags v0.9.1
   Compiling vec_map v0.8.0
   Compiling unicode-width v0.1.4
   Compiling lazy_static v0.2.9
   Compiling percent-encoding v1.0.0
   Compiling strsim v0.6.0
   Compiling regex-syntax v0.4.1
   Compiling embed-resource v1.1.4
   Compiling utf8-ranges v1.0.0
   Compiling libc v0.2.32
   Compiling pkg-config v0.3.9
   Compiling unreachable v1.0.0
   Compiling synom v0.11.3
   Compiling unicode-bidi v0.3.4
   Compiling tabwriter v1.0.3
   Compiling cargo-update v1.3.0
   Compiling semver v0.8.0
   Compiling thread_local v0.3.4
   Compiling atty v0.2.3
   Compiling memchr v1.0.1
   Compiling term_size v0.3.0
   Compiling rand v0.3.17
   Compiling syn v0.11.11
   Compiling textwrap v0.8.0
   Compiling aho-corasick v0.6.3
   Compiling idna v0.1.4
   Compiling curl-sys v0.3.15
   Compiling openssl-sys v0.9.19
   Compiling libz-sys v1.0.17
   Compiling cmake v0.1.26
   Compiling clap v2.26.2
   Compiling toml v0.4.5
   Compiling lazysort v0.1.1
   Compiling url v1.5.1
   Compiling libgit2-sys v0.6.16
   Compiling libssh2-sys v0.2.6
   Compiling regex v0.2.2
   Compiling serde_derive_internals v0.16.0
   Compiling serde_derive v1.0.15
   Compiling git2 v0.6.8
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/cargo_install_update-6267f375df001c43.0.o" "-o" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/cargo_install_update-6267f375df001c43" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/cargo_install_update-6267f375df001c43.crate.allocator.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-install.VoH044Bf9uNr/release/deps" "-L" "/tmp/cargo-install.VoH044Bf9uNr/release/build/libgit2-sys-52036b91a199fc9b/out/lib" "-L" "/tmp/cargo-install.VoH044Bf9uNr/release/build/curl-sys-ac94287b2c6d70f3/out/lib" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/tmp/cargo-install.VoH044Bf9uNr/release/build/libssh2-sys-7eebc093787c06f4/out/lib" "-L" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libcargo_update-100e8c08598d4ae5.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libsemver-375acf34a88a73f1.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libtoml-aafa554572d0d17c.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libtabwriter-5f06f56c7c0c9e9e.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libarray_tool-0a2f9bbb91d29c64.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libregex-303692458a900971.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libregex_syntax-3535a562df9bbb0d.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libthread_local-f5c04a92ef18184e.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libaho_corasick-498b515a85ee90f0.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libgit2-7a175d59304be499.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libopenssl_probe-1847814eedcfb48d.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liblibgit2_sys-b2859c3c0c10d935.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liburl-f7bceb0e78cb3410.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libidna-fc5f2b97807dad43.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libunicode_bidi-8c37f3d295190f5a.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libpercent_encoding-4582de6c18386499.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libjson-f01a661b40c32aff.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liblazy_static-c821767783c4edaf.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libsemver_parser-25052887fe415dbf.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libmemchr-c0a231da0d9ac9a3.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libunreachable-a52c36c462d94569.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libvoid-464c3aba24657c02.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libutf8_ranges-3c8ca6d3badf85dd.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libmatches-68cbe4810d976d13.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libunicode_normalization-301411a10fa91f08.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liblibssh2_sys-ca27eff7424c2651.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libopenssl_sys-e29389d41ed7107c.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liblibz_sys-bb97ca483542f850.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libclap-a0927af1320b2451.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libatty-c7bdf20b6e51f5ec.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libvec_map-a1c27f67b0f30b08.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libbitflags-80de8df75f46b445.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libansi_term-d027903f865b463f.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libstrsim-9422d6eafe2336c5.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libtextwrap-987ac21a2e486fb0.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libterm_size-846cfaed869167d5.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liblibc-b408e02024a17a5a.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libunicode_width-655a04edaed1aaad.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/libserde-63210794f3e09ab7.rlib" "/tmp/cargo-install.VoH044Bf9uNr/release/deps/liblazysort-fa02590fa69905c2.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4417e9730e1582e6.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e8dfba60977a6436.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-221fb859d65ee0c2.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e2e14a8cd94d84f0.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-168184ab67c3c4bf.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-9a79f9937b41db10.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-ddada564b34025bf.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-19e07afc4bd461f5.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-49240518d06d7735.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-dd5bba80e2402629.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-e043d51b15904669.rlib" "-Wl,-Bdynamic" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
  = note: /tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib(libcurl_la-url.o): In function `fix_hostname.isra.9':
          url.c:(.text.fix_hostname.isra.9+0x58): undefined reference to `idn2_check_version'
          url.c:(.text.fix_hostname.isra.9+0x78): undefined reference to `idn2_lookup_ul'
          url.c:(.text.fix_hostname.isra.9+0xb3): undefined reference to `idn2_strerror'
          /tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib(libcurl_la-url.o): In function `Curl_disconnect':
          url.c:(.text.Curl_disconnect+0x9f): undefined reference to `idn2_free'
          url.c:(.text.Curl_disconnect+0xbb): undefined reference to `idn2_free'
          url.c:(.text.Curl_disconnect+0xd7): undefined reference to `idn2_free'
          url.c:(.text.Curl_disconnect+0xf3): undefined reference to `idn2_free'
          /tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib(libcurl_la-url.o): In function `Curl_connect':
          url.c:(.text.Curl_connect+0x7b7): undefined reference to `idn2_free'
          /tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib(libcurl_la-url.o):url.c:(.text.Curl_connect+0x7d3): more undefined references to `idn2_free' follow
          /tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib(libcurl_la-version.o): In function `curl_version.part.0':
          version.c:(.text.curl_version.part.0+0x80): undefined reference to `idn2_check_version'
          version.c:(.text.curl_version.part.0+0x8c): undefined reference to `idn2_check_version'
          /tmp/cargo-install.VoH044Bf9uNr/release/deps/libcurl_sys-3c829ac76a7c05d5.rlib(libcurl_la-version.o): In function `curl_version_info.part.1':
          version.c:(.text.curl_version_info.part.1+0x37): undefined reference to `idn2_check_version'
          collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: failed to compile `cargo-update v1.3.0`, intermediate artifacts can be found at `/tmp/cargo-install.VoH044Bf9uNr`

Caused by:
  Could not compile `cargo-update`.

To learn more, run the command again with --verbose.

Updated 0 packages.
Failed to update cargo-update.
nabijaczleweli commented 7 years ago

Does it work if you do just cargo install -f cargo-update?

mateon1 commented 7 years ago

@nabijaczleweli No, the same linker error appears. I cloned this repo, and cargo build also reports the same linker error, but slightly more verbose.

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.0.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.1.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.10.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.11.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.12.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.13.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.14.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.15.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.16.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.17.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.18.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.19.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.2.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.20.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.21.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.22.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.23.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.24.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.25.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.26.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.27.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.28.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.29.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.3.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.30.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.31.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.4.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.5.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.6.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.7.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.8.o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.9.o" "-o" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19" "/shared/dev/rust/cargo-update/target/debug/deps/cargo_install_update-57a6e570765a6e19.crate.allocator.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/shared/dev/rust/cargo-update/target/debug/deps" "-L" "/shared/dev/rust/cargo-update/target/debug/build/libgit2-sys-6de3d123e45316aa/out/lib" "-L" "/shared/dev/rust/cargo-update/target/debug/build/curl-sys-84aa1e71a1536699/out/lib" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/shared/dev/rust/cargo-update/target/debug/build/libssh2-sys-412f4f6569050b4d/out/lib" "-L" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/shared/dev/rust/cargo-update/target/debug/deps/libcargo_update-4746cde4b42e820d.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libsemver-e53f43027bdf5de5.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libtoml-5c1efc3f93dcca95.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libtabwriter-85f3a439c09cca47.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libarray_tool-609cac6e811cb760.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libregex-1656d855b9dd05c7.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libregex_syntax-a7a33b86ff46bef4.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libthread_local-18fe0019537d53b9.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libaho_corasick-fb3a4479521b21b4.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libgit2-21f8b08057f9c6e5.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libopenssl_probe-d9f34778aed4005e.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liblibgit2_sys-43d2af59bd111131.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liburl-2987059321d511ce.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libidna-dcfc9f6dfe0d001f.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libunicode_bidi-b313e9dba924b858.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libpercent_encoding-eb2f12c06d057f4f.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libjson-9b343d686f7f2770.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liblazy_static-04b07083fafb6ec0.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libsemver_parser-b3fbb8a6c60b3f6a.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libmemchr-e5aa213f1e5491ea.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libunreachable-39c7b7dc17e155d2.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libvoid-ff4651cec9d33a56.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libutf8_ranges-1d0bc8652cb6f0c1.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libmatches-dbda3a44eb8ab06c.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libunicode_normalization-e48b94f8f7f21be0.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liblibssh2_sys-684f4326f010136e.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libcurl_sys-d8ac113e4f8eeae5.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libopenssl_sys-831fdc82fcd4f6e7.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liblibz_sys-6f951fdc6676f574.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libclap-fb2fde4630d3db42.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libatty-309a2d349398de9f.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libvec_map-91da5dee0b1a6b59.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libbitflags-07a643aa17ad0e58.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libansi_term-4ac8aafed5ebd279.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libstrsim-6052164a99b02013.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libtextwrap-a2296c3af0fedeba.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libterm_size-6b1a312023f7cd96.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liblibc-c2dce38df5f110a4.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libunicode_width-5293b3149293834b.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/libserde-2074a929e7de8390.rlib" "/shared/dev/rust/cargo-update/target/debug/deps/liblazysort-c2a7cf39672b73cc.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4417e9730e1582e6.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e8dfba60977a6436.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-221fb859d65ee0c2.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e2e14a8cd94d84f0.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-168184ab67c3c4bf.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-9a79f9937b41db10.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-ddada564b34025bf.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-19e07afc4bd461f5.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-49240518d06d7735.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-dd5bba80e2402629.rlib" "/home/mateon/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-e043d51b15904669.rlib" "-Wl,-Bdynamic" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
  = note: /shared/dev/rust/cargo-update/target/debug/deps/libcurl_sys-d8ac113e4f8eeae5.rlib(libcurl_la-url.o): In function `fix_hostname':
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/url.c:4044: undefined reference to `idn2_check_version'
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/url.c:4054: undefined reference to `idn2_lookup_ul'
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/url.c:4061: undefined reference to `idn2_strerror'
          /shared/dev/rust/cargo-update/target/debug/deps/libcurl_sys-d8ac113e4f8eeae5.rlib(libcurl_la-url.o): In function `free_fixed_hostname':
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/url.c:4087: undefined reference to `idn2_free'
          /shared/dev/rust/cargo-update/target/debug/deps/libcurl_sys-d8ac113e4f8eeae5.rlib(libcurl_la-version.o): In function `curl_version':
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/version.c:115: undefined reference to `idn2_check_version'
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/version.c:116: undefined reference to `idn2_check_version'
          /shared/dev/rust/cargo-update/target/debug/deps/libcurl_sys-d8ac113e4f8eeae5.rlib(libcurl_la-version.o): In function `curl_version_info':
          /home/mateon/.cargo/registry/src/github.com-1ecc6299db9ec823/curl-sys-0.3.15/curl/lib/version.c:374: undefined reference to `idn2_check_version'
          collect2: error: ld returned 1 exit status
nabijaczleweli commented 7 years ago

That sounds like an issue for the curl-sys maintainers, do please post the link thereto here when you open one.

Unfortunately, the errors I've had with curl-sys before aren't the same as this, so I can't help you myself.

mateon1 commented 7 years ago

@nabijaczleweli Unfortunately, this build failure is not reproducible with git clone https://github.com/alexcrichton/curl-rust; cd curl-rust; cargo build I verified that cargo-update still fails to build, so it's not the case that curl-sys updated in the meantime. Looking at cargo tree, curl-sys is used by libgit2-sys, then git2. I'll check whether one of these crates is the cause. Edit: Unfortunately, git2-rs builds fine, so the issue must be in this crate.

mati865 commented 7 years ago

Make sure you have libidn2 installed (on Ubuntu it's called libidn2-0).

mateon1 commented 7 years ago

@mati865 I have libidn2-0, libidn2-0-dev and libidn2-dev installed, so that's not the issue.

mati865 commented 7 years ago

If you clone and build git2-rs in release mode there is no error? Compare versions of crate dependences and post your OS version.

mateon1 commented 7 years ago

Yes, there is no error when building git2-rs in release mode.

I'm using Debian sid inside a chroot environment (created with debootstrap). My uname is Linux hydra 4.9.13 #1-NixOS SMP Sun Feb 26 10:11:18 UTC 2017 x86_64 GNU/Linux.

The crate dependency versions seem identical:

/shared/dev/rust/git2-rs$ cargo tree
git2 v0.6.8 (file:///shared/dev/rust/git2-rs)
├── bitflags v0.9.1
├── libc v0.2.32
├── libgit2-sys v0.6.16 (file:///shared/dev/rust/git2-rs/libgit2-sys)
│   ├── curl-sys v0.3.15
│   │   ├── libc v0.2.32 (*)
│   │   ├── libz-sys v1.0.17
│   │   │   └── libc v0.2.32 (*)
│   │   └── openssl-sys v0.9.19
│   │       └── libc v0.2.32 (*)
│   ├── libc v0.2.32 (*)
│   ├── libssh2-sys v0.2.6
│   │   ├── libc v0.2.32 (*)
│   │   ├── libz-sys v1.0.17 (*)
│   │   └── openssl-sys v0.9.19 (*)
│   ├── libz-sys v1.0.17 (*)
│   └── openssl-sys v0.9.19 (*)
├── openssl-probe v0.1.1
├── openssl-sys v0.9.19 (*)
└── url v1.5.1
    ├── idna v0.1.4
    │   ├── matches v0.1.6
    │   ├── unicode-bidi v0.3.4
    │   │   └── matches v0.1.6 (*)
    │   └── unicode-normalization v0.1.5
    ├── matches v0.1.6 (*)
    └── percent-encoding v1.0.0

/shared/dev/rust/cargo-update$ cargo tree -p git2
git2 v0.6.8
├── bitflags v0.9.1
├── libc v0.2.32
├── libgit2-sys v0.6.16
│   ├── curl-sys v0.3.15
│   │   ├── libc v0.2.32 (*)
│   │   ├── libz-sys v1.0.17
│   │   │   └── libc v0.2.32 (*)
│   │   └── openssl-sys v0.9.19
│   │       └── libc v0.2.32 (*)
│   ├── libc v0.2.32 (*)
│   ├── libssh2-sys v0.2.6
│   │   ├── libc v0.2.32 (*)
│   │   ├── libz-sys v1.0.17 (*)
│   │   └── openssl-sys v0.9.19 (*)
│   ├── libz-sys v1.0.17 (*)
│   └── openssl-sys v0.9.19 (*)
├── openssl-probe v0.1.1
├── openssl-sys v0.9.19 (*)
└── url v1.5.1
    ├── idna v0.1.4
    │   ├── matches v0.1.6
    │   ├── unicode-bidi v0.3.4
    │   │   └── matches v0.1.6 (*)
    │   └── unicode-normalization v0.1.5
    ├── matches v0.1.6 (*)
    └── percent-encoding v1.0.0
Full dependency tree for cargo-update ```bash cargo-update v1.3.0 (file:///shared/dev/rust/cargo-update) ├── array_tool v0.4.1 ├── clap v2.26.2 │ ├── ansi_term v0.9.0 │ ├── atty v0.2.3 │ │ └── libc v0.2.32 │ ├── bitflags v0.9.1 │ ├── strsim v0.6.0 │ ├── term_size v0.3.0 │ │ └── libc v0.2.32 (*) │ ├── textwrap v0.8.0 │ │ ├── term_size v0.3.0 (*) │ │ └── unicode-width v0.1.4 │ ├── unicode-width v0.1.4 (*) │ └── vec_map v0.8.0 ├── git2 v0.6.8 │ ├── bitflags v0.9.1 (*) │ ├── libc v0.2.32 (*) │ ├── libgit2-sys v0.6.16 │ │ ├── curl-sys v0.3.15 │ │ │ ├── libc v0.2.32 (*) │ │ │ ├── libz-sys v1.0.17 │ │ │ │ └── libc v0.2.32 (*) │ │ │ └── openssl-sys v0.9.19 │ │ │ └── libc v0.2.32 (*) │ │ ├── libc v0.2.32 (*) │ │ ├── libssh2-sys v0.2.6 │ │ │ ├── libc v0.2.32 (*) │ │ │ ├── libz-sys v1.0.17 (*) │ │ │ └── openssl-sys v0.9.19 (*) │ │ ├── libz-sys v1.0.17 (*) │ │ └── openssl-sys v0.9.19 (*) │ ├── openssl-probe v0.1.1 │ ├── openssl-sys v0.9.19 (*) │ └── url v1.5.1 │ ├── idna v0.1.4 │ │ ├── matches v0.1.6 │ │ ├── unicode-bidi v0.3.4 │ │ │ └── matches v0.1.6 (*) │ │ └── unicode-normalization v0.1.5 │ ├── matches v0.1.6 (*) │ └── percent-encoding v1.0.0 ├── json v0.11.10 ├── lazy_static v0.2.9 ├── lazysort v0.1.1 │ └── rand v0.3.17 │ └── libc v0.2.32 (*) ├── regex v0.2.2 │ ├── aho-corasick v0.6.3 │ │ └── memchr v1.0.1 │ │ └── libc v0.2.32 (*) │ ├── memchr v1.0.1 (*) │ ├── regex-syntax v0.4.1 │ ├── thread_local v0.3.4 │ │ ├── lazy_static v0.2.9 (*) │ │ └── unreachable v1.0.0 │ │ └── void v1.0.2 │ └── utf8-ranges v1.0.0 ├── semver v0.8.0 │ └── semver-parser v0.7.0 ├── serde v1.0.15 ├── serde_derive v1.0.15 │ ├── quote v0.3.15 │ ├── serde_derive_internals v0.16.0 │ │ ├── syn v0.11.11 │ │ │ ├── quote v0.3.15 (*) │ │ │ ├── synom v0.11.3 │ │ │ │ └── unicode-xid v0.0.4 │ │ │ └── unicode-xid v0.0.4 (*) │ │ └── synom v0.11.3 (*) │ └── syn v0.11.11 (*) ├── tabwriter v1.0.3 │ └── unicode-width v0.1.4 (*) └── toml v0.4.5 └── serde v1.0.15 (*) ```
mateon1 commented 6 years ago

I'm closing this issue, as I have successfully updated to 1.3.1. I don't know what the cause of this issue was.