undefined references to git_* when compiling cargo-9999
Hey,
I just installed rust-bin-999 and tried to compile cargo-9999 from your overlay. I get the following result, no matter if dev-libs/libgit2 is installed ( I tried version 0.21.5 (stable) and 0.22.2) or not.
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-m64" "-L" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/cargo.o" "-o" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/cargo" "-Wl,--whole-archive" "-l" "morestack" "-Wl,--no-whole-archive" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libgit2_curl-a9bbaf3bdf7c598a.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/libcargo-528c261914644864.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libregistry-a76c4faf8bbedd2b.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libtime-e758cbe877e9589d.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libdocopt-40f44425b0f8ac23.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libflate2-4d1fbb00be4a22dd.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libnum_cpus-676e37b6735f47f5.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libthreadpool-213781c0d8fba90b.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libfiletime-3f93a5541fe8597f.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libsemver-97eaa84569c2a87a.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libtar-1ebdf639011802e1.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libminiz_sys-d7e62e66665f9648.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libtoml-e4d393d734aaa578.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libcurl-8141f2804d7ef7aa.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libgit2-03ee595a041b0ca1.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liburl-a4f53e129e04fc84.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libbitflags-518ea12e21428edd.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/librustc_serialize-9ef26f158d5284e0.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libmatches-68db25b520030534.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblibgit2_sys-8e2c644bdbba553e.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblibssh2_sys-7dc652acddd85de6.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libcurl_sys-dd89af55ea8cd7e5.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libopenssl_sys-5040130ff99796a0.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libglob-d67ece25280f9940.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblibz_sys-c145b8b5c75fd5a3.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libterm-1a85d6dfb646e607.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libstrsim-fb046b3f6ce0ea34.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libenv_logger-63352e48193fbb80.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libregex-3bea3061fd389532.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblog-54cf393d3c69686f.rlib" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-2eda841eb12a3090.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-11582ce5.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-11582ce5.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-11582ce5.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-11582ce5.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-11582ce5.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-11582ce5.rlib" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-11582ce5.rlib" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps" "-L" "/usr/lib64" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/libgit2-sys-8e2c644bdbba553e/out/lib" "-L" "/usr/lib64" "-L" "/usr/lib64" "-L" "/usr/lib64" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/miniz-sys-d7e62e66665f9648/out" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/num_cpus-676e37b6735f47f5/out" "-L" "/usr/lib64" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/openssl-sys-5040130ff99796a0/out" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/time-e758cbe877e9589d/out" "-L" "/opt/rust-bin-999/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/.rust/lib/x86_64-unknown-linux-gnu" "-L" "/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/lib/x86_64-unknown-linux-gnu" "-Wl,-Bstatic" "-Wl,-Bdynamic" "-l" "rt" "-l" "http_parser" "-l" "rt" "-l" "ssh2" "-l" "ssl" "-l" "dl" "-l" "z" "-l" "crypto" "-l" "dl" "-l" "z" "-l" "ssh2" "-l" "curl" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "c" "-l" "m" "-l" "dl" "-l" "pthread" "-l" "rt" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "compiler-rt"
note: /var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_transport_register'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_transport_register'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_transport_smart'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_open'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_open'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_init_ext'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_open'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_init_ext'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_discover'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/crc.rs:30: error: undefined reference to 'mz_crc32'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/stream.rs:34: error: undefined reference to 'mz_deflateInit2'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/stream.rs:52: error: undefined reference to 'mz_inflateInit2'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/stream.rs:76: error: undefined reference to 'mz_inflate'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/stream.rs:120: error: undefined reference to 'mz_deflate'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/stream.rs:130: error: undefined reference to 'mz_deflateEnd'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-0.2.7/src/stream.rs:135: error: undefined reference to 'mz_inflateEnd'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/num_cpus-0.1.0/src/lib.rs:11: error: undefined reference to 'crates_io_get_num_cpus'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/error.rs:21: error: undefined reference to 'giterr_last'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_clone_init_options'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_clone'
<std macros>:137: error: undefined reference to 'git_remote_init_callbacks'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/remote.rs:341: error: undefined reference to 'git_remote_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/transport.rs:332: error: undefined reference to 'giterr_set_str'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/reference.rs:206: error: undefined reference to 'git_reference_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/buf.rs:65: error: undefined reference to 'git_buf_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_config_open_default'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_config_get_string'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_config_get_string_buf'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/config.rs:363: error: undefined reference to 'git_config_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_cred_default_new'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_cred_ssh_key_from_agent'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_cred_userpass_plaintext_new'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_cred_username_new'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/index.rs:192: error: undefined reference to 'git_index_entrycount'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/index.rs:198: error: undefined reference to 'git_index_get_byindex'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/index.rs:412: error: undefined reference to 'git_index_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/object.rs:19: error: undefined reference to 'git_object_id'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_object_peel'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/object.rs:117: error: undefined reference to 'git_object_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/oid.rs:76: error: undefined reference to 'git_oid_tostr'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/oid.rs:86: error: undefined reference to 'git_oid_equal'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/reference.rs:108: error: undefined reference to 'git_reference_target'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_remote_set_callbacks'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_remote_add_fetch'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_remote_fetch'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_revparse_single'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/repo.rs:191: error: undefined reference to 'git_repository_path'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/repo.rs:227: error: undefined reference to 'git_repository_workdir'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_remote_create_anonymous'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_reset'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_head'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_submodule_foreach'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/submodule.rs:199: error: undefined reference to 'git_submodule_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/repo.rs:491: error: undefined reference to 'git_submodule_lookup'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_status_list_new'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_index'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_repository_config'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_branch_lookup'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_object_lookup'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_reference_name_to_id'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_submodule_lookup'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/repo.rs:1174: error: undefined reference to 'git_repository_free'
<std macros>:1317: error: undefined reference to 'git_repository_init_init_options'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/status.rs:66: error: undefined reference to 'git_status_init_options'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/status.rs:242: error: undefined reference to 'git_status_byindex'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/status.rs:252: error: undefined reference to 'git_status_list_entrycount'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/status.rs:274: error: undefined reference to 'git_status_list_free'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/submodule.rs:42: error: undefined reference to 'git_submodule_url'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/submodule.rs:54: error: undefined reference to 'git_submodule_name'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/submodule.rs:61: error: undefined reference to 'git_submodule_path'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/submodule.rs:68: error: undefined reference to 'git_submodule_head_id'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_submodule_init'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/call.rs:14: error: undefined reference to 'git_submodule_open'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/lib.rs:325: error: undefined reference to 'git_libgit2_init'
/var/tmp/portage/dev-rust/cargo-9999/homedir/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.2.11/src/lib.rs:330: error: undefined reference to 'git_libgit2_shutdown'
collect2: error: ld returned 1 exit status
error: aborting due to previous error
Could not compile `cargo`.
Caused by:
Process didn't exit successfully: `rustc src/bin/cargo.rs --crate-name cargo --crate-type bin -g --out-dir /var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug --emit=dep-info,link --target x86_64-unknown-linux-gnu -L dependency=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug -L dependency=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps --extern url=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liburl-a4f53e129e04fc84.rlib --extern term=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libterm-1a85d6dfb646e607.rlib --extern libc=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-2eda841eb12a3090.rlib --extern glob=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libglob-d67ece25280f9940.rlib --extern log=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblog-54cf393d3c69686f.rlib --extern filetime=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libfiletime-3f93a5541fe8597f.rlib --extern curl=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libcurl-8141f2804d7ef7aa.rlib --extern flate2=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libflate2-4d1fbb00be4a22dd.rlib --extern time=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libtime-e758cbe877e9589d.rlib --extern env_logger=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libenv_logger-63352e48193fbb80.rlib --extern num_cpus=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libnum_cpus-676e37b6735f47f5.rlib --extern regex=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libregex-3bea3061fd389532.rlib --extern rustc_serialize=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/librustc_serialize-9ef26f158d5284e0.rlib --extern toml=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libtoml-e4d393d734aaa578.rlib --extern libgit2_sys=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/liblibgit2_sys-8e2c644bdbba553e.rlib --extern docopt=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libdocopt-40f44425b0f8ac23.rlib --extern git2=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libgit2-03ee595a041b0ca1.rlib --extern git2_curl=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libgit2_curl-a9bbaf3bdf7c598a.rlib --extern threadpool=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libthreadpool-213781c0d8fba90b.rlib --extern registry=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libregistry-a76c4faf8bbedd2b.rlib --extern semver=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libsemver-97eaa84569c2a87a.rlib --extern tar=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/deps/libtar-1ebdf639011802e1.rlib --extern cargo=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/libcargo-528c261914644864.rlib -L native=/usr/lib64 -L native=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/libgit2-sys-8e2c644bdbba553e/out/lib -L native=/usr/lib64 -L native=/usr/lib64 -L native=/usr/lib64 -L native=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/miniz-sys-d7e62e66665f9648/out -L native=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/num_cpus-676e37b6735f47f5/out -L native=/usr/lib64 -L native=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/openssl-sys-5040130ff99796a0/out -L native=/var/tmp/portage/dev-rust/cargo-9999/work/cargo-9999/target/x86_64-unknown-linux-gnu/debug/build/time-e758cbe877e9589d/out` (exit code: 101)
Makefile:88: recipe for target 'cargo-x86_64-unknown-linux-gnu' failed
make: *** [cargo-x86_64-unknown-linux-gnu] Error 101
* ERROR: dev-rust/cargo-9999::rust failed (compile phase):
* emake failed
Any idea what might be wrong?
At first I didn't have it installed. Then, I tried the versions mentioned in the comment above. Same result.
Looks like you also have some troubles with num_cpus and flate2 which has nothing to do with gitlib. Are you able to compile cargo manually?
Interesting. Compiling manually works fine. Even when using options to configure and make, similar to the ones in the ebuild.
similiar issues with cargo-ebuild, recompiled libgit2, disabled lto for it... still issue.
@oleid how did you solved your issue?
I suppose it is fixed now after libgit2 updated and separate cargo removed.