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

Using mrustc 0.9 to bootstrap rust 1.29.0 directly #140

Closed
daym opened this issue Jan 21, 2020 · 10 comments
Closed

Using mrustc 0.9 to bootstrap rust 1.29.0 directly #140

daym opened this issue Jan 21, 2020 · 10 comments

Comments

@daym
Copy link
Contributor

daym commented Jan 21, 2020

Hi,

so we are progressing nicely to update Rust bootstrapping packages in Guix.

Right now, I'm trying to switch from mrustc 0.9 bootstrapping rust 1.19.0 to mrustc 0.9 bootstrapping rust 1.29.0 directly.

With that, I get the following error messages when building rust 1.29.0's cargo (rust 1.29.0's rustc builds fine) [for comparison: using the same method, rust 1.19.0's rustc and cargo build fine]:

BUILDING cargo v0.30.0
> /gnu/store/xxfp2kj0x1sc6xv9ddhzcs33mb4jh3zc-mrustc-0.9/bin/mrustc rustc-1.29.0-src/src/tools/cargo/src/bin/cargo/main.rs -o output-1.29.0/cargo-build/cargo --crate-name cargo --crate-type bin -C emit-depfile=output-1.29.0/cargo-build/cargo.d --crate-tag 0_30_0 -g --cfg debug_assertions -O -L output-1.29.0 -L output-1.29.0/cargo-build --extern cargo=output-1.29.0/cargo-build/libcargo-0_30_0.rlib --extern atty=output-1.29.0/cargo-build/libatty-0_2_11.rlib --extern crates_io=output-1.29.0/cargo-build/libcrates_io-0_18_0.rlib --extern crossbeam_utils=output-1.29.0/cargo-build/libcrossbeam_utils-0_5_0.rlib --extern crypto_hash=output-1.29.0/cargo-build/libcrypto_hash-0_3_1.rlib --extern curl=output-1.29.0/cargo-build/libcurl-0_4_13.rlib --extern env_logger=output-1.29.0/cargo-build/libenv_logger-0_5_10.rlib --extern failure=output-1.29.0/cargo-build/libfailure-0_1_2.rlib --extern filetime=output-1.29.0/cargo-build/libfiletime-0_2_1.rlib --extern flate2=output-1.29.0/cargo-build/libflate2-1_0_1.rlib --extern fs2=output-1.29.0/cargo-build/libfs2-0_4_3.rlib --extern git2=output-1.29.0/cargo-build/libgit2-0_7_3.rlib --extern git2_curl=output-1.29.0/cargo-build/libgit2_curl-0_8_1.rlib --extern glob=output-1.29.0/cargo-build/libglob-0_2_11.rlib --extern hex=output-1.29.0/cargo-build/libhex-0_3_2.rlib --extern home=output-1.29.0/cargo-build/libhome-0_3_2.rlib --extern ignore=output-1.29.0/cargo-build/libignore-0_4_2.rlib --extern lazy_static=output-1.29.0/cargo-build/liblazy_static-1_0_2.rlib --extern jobserver=output-1.29.0/cargo-build/libjobserver-0_1_11.rlib --extern lazycell=output-1.29.0/cargo-build/liblazycell-1_0_0.rlib --extern libc=output-1.29.0/cargo-build/liblibc-0_2_42.rlib --extern log=output-1.29.0/cargo-build/liblog-0_4_3.rlib --extern libgit2_sys=output-1.29.0/cargo-build/liblibgit2_sys-0_7_6.rlib --extern num_cpus=output-1.29.0/cargo-build/libnum_cpus-1_8_0.rlib --extern rustfix=output-1.29.0/cargo-build/librustfix-0_4_2.rlib --extern same_file=output-1.29.0/cargo-build/libsame_file-1_0_2.rlib --extern semver=output-1.29.0/cargo-build/libsemver-0_9_0.rlib --extern serde=output-1.29.0/cargo-build/libserde-1_0_70.rlib --extern serde_derive=output-1.29.0/cargo-build/libserde_derive-1_0_70-plugin --extern serde_ignored=output-1.29.0/cargo-build/libserde_ignored-0_0_4.rlib --extern serde_json=output-1.29.0/cargo-build/libserde_json-1_0_24.rlib --extern shell_escape=output-1.29.0/cargo-build/libshell_escape-0_1_4.rlib --extern tar=output-1.29.0/cargo-build/libtar-0_4_16.rlib --extern tempfile=output-1.29.0/cargo-build/libtempfile-3_0_2.rlib --extern termcolor=output-1.29.0/cargo-build/libtermcolor-1_0_1.rlib --extern toml=output-1.29.0/cargo-build/libtoml-0_4_6.rlib --extern url=output-1.29.0/cargo-build/liburl-1_7_1.rlib --extern clap=output-1.29.0/cargo-build/libclap-2_32_0.rlib --extern unicode_width=output-1.29.0/cargo-build/libunicode_width-0_1_5.rlib --extern rustc_workspace_hack=output-1.29.0/cargo-build/librustc_workspace_hack-1_0_0.rlib
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `ssh_error':
ssh.c:(.text.ssh_error+0x12): undefined reference to `libssh2_session_last_error'
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `ssh_stream_free':
ssh.c:(.text.ssh_stream_free+0x22): undefined reference to `libssh2_channel_close'
ld: ssh.c:(.text.ssh_stream_free+0x2b): undefined reference to `libssh2_channel_free'
ld: ssh.c:(.text.ssh_stream_free+0x54): undefined reference to `libssh2_session_disconnect_ex'
ld: ssh.c:(.text.ssh_stream_free+0x5d): undefined reference to `libssh2_session_free'
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `send_command':
ssh.c:(.text.send_command+0x13a): undefined reference to `libssh2_channel_process_startup'
ld: ssh.c:(.text.send_command+0x1a7): undefined reference to `libssh2_session_last_error'
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `_git_ssh_authenticate_session':
ssh.c:(.text._git_ssh_authenticate_session+0x8d): undefined reference to `libssh2_userauth_publickey_fromfile_ex'
ld: ssh.c:(.text._git_ssh_authenticate_session+0xf0): undefined reference to `libssh2_session_last_error'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x189): undefined reference to `libssh2_userauth_publickey_frommemory'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x1a4): undefined reference to `libssh2_session_abstract'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x1c8): undefined reference to `libssh2_userauth_keyboard_interactive_ex'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x1f1): undefined reference to `libssh2_userauth_publickey'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x24d): undefined reference to `libssh2_userauth_password_ex'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x264): undefined reference to `libssh2_agent_init'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x278): undefined reference to `libssh2_agent_connect'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x2a2): undefined reference to `libssh2_session_last_error'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x2c9): undefined reference to `libssh2_agent_disconnect'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x2d1): undefined reference to `libssh2_agent_free'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x2e4): undefined reference to `libssh2_agent_list_identities'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x305): undefined reference to `libssh2_agent_userauth'
ld: ssh.c:(.text._git_ssh_authenticate_session+0x31e): undefined reference to `libssh2_agent_get_identity'
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `ssh_stream_write':
ssh.c:(.text.ssh_stream_write+0x39): undefined reference to `libssh2_channel_write_ex'
ld: ssh.c:(.text.ssh_stream_write+0x50): undefined reference to `libssh2_session_last_error'
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `ssh_stream_read':
ssh.c:(.text.ssh_stream_read+0x39): undefined reference to `libssh2_channel_read_ex'
ld: ssh.c:(.text.ssh_stream_read+0x70): undefined reference to `libssh2_channel_read_ex'
ld: ssh.c:(.text.ssh_stream_read+0xb3): undefined reference to `libssh2_session_last_error'
ld: /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a(ssh.c.o): in function `_git_ssh_setup_conn':
ssh.c:(.text._git_ssh_setup_conn+0x239): undefined reference to `libssh2_channel_close'
ld: ssh.c:(.text._git_ssh_setup_conn+0x242): undefined reference to `libssh2_channel_free'
ld: ssh.c:(.text._git_ssh_setup_conn+0x26b): undefined reference to `libssh2_session_disconnect_ex'
ld: ssh.c:(.text._git_ssh_setup_conn+0x274): undefined reference to `libssh2_session_free'
ld: ssh.c:(.text._git_ssh_setup_conn+0x2b8): undefined reference to `libssh2_session_free'
ld: ssh.c:(.text._git_ssh_setup_conn+0x345): undefined reference to `libssh2_session_init_ex'
ld: ssh.c:(.text._git_ssh_setup_conn+0x35f): undefined reference to `libssh2_session_handshake'
ld: ssh.c:(.text._git_ssh_setup_conn+0x381): undefined reference to `libssh2_session_set_blocking'
ld: ssh.c:(.text._git_ssh_setup_conn+0x3bf): undefined reference to `libssh2_hostkey_hash'
ld: ssh.c:(.text._git_ssh_setup_conn+0x3e6): undefined reference to `libssh2_hostkey_hash'
ld: ssh.c:(.text._git_ssh_setup_conn+0x476): undefined reference to `libssh2_userauth_list'
ld: ssh.c:(.text._git_ssh_setup_conn+0x852): undefined reference to `libssh2_channel_open_ex'
ld: ssh.c:(.text._git_ssh_setup_conn+0x86d): undefined reference to `libssh2_channel_set_blocking'
ld: ssh.c:(.text._git_ssh_setup_conn+0x886): undefined reference to `libssh2_userauth_authenticated'
ld: ssh.c:(.text._git_ssh_setup_conn+0x8b5): undefined reference to `libssh2_session_last_error'
ld: ssh.c:(.text._git_ssh_setup_conn+0x8dc): undefined reference to `libssh2_session_free'
collect2: error: ld returned 1 exit status
C Compiler failed to execute - error code 256
BUILD FAILED
command "/gnu/store/xxfp2kj0x1sc6xv9ddhzcs33mb4jh3zc-mrustc-0.9/tools/bin/minicargo" "rustc-1.29.0-src/src/tools/cargo" "--vendor-dir" "rustc-1.29.0-src/src/vendor" "--output-dir" "output-1.29.0/cargo-build" "-L" "output-1.29.0" "-j" "1" failed with status 1

Have you seen that before?

@bjorn3
Copy link
Contributor

bjorn3 commented Jan 21, 2020

What is the output of the following command:

$ ar t /tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib/libgit2.a

I once got a similar error with my rustc backend when that ar file was corrupted, so that only one object file was readable.

@daym
Copy link
Contributor Author

daym commented Jan 21, 2020

http_parser.c.o
annotated_commit.c.o
apply.c.o
attr.c.o
attr_file.c.o
attrcache.c.o
blame.c.o
blame_git.c.o
blob.c.o
branch.c.o
buf_text.c.o
buffer.c.o
cache.c.o
checkout.c.o
cherrypick.c.o
clone.c.o
commit.c.o
commit_list.c.o
config.c.o
config_cache.c.o
config_file.c.o
config_parse.c.o
crlf.c.o
date.c.o
delta.c.o
describe.c.o
diff.c.o
diff_driver.c.o
diff_file.c.o
diff_generate.c.o
diff_parse.c.o
diff_print.c.o
diff_stats.c.o
diff_tform.c.o
diff_xdiff.c.o
errors.c.o
fetch.c.o
fetchhead.c.o
filebuf.c.o
fileops.c.o
filter.c.o
fnmatch.c.o
global.c.o
graph.c.o
hash.c.o
hashsig.c.o
ident.c.o
idxmap.c.o
ignore.c.o
index.c.o
indexer.c.o
iterator.c.o
merge.c.o
merge_driver.c.o
merge_file.c.o
message.c.o
mwindow.c.o
netops.c.o
notes.c.o
object.c.o
object_api.c.o
odb.c.o
odb_loose.c.o
odb_mempack.c.o
odb_pack.c.o
offmap.c.o
oid.c.o
oidarray.c.o
oidmap.c.o
pack-objects.c.o
pack.c.o
parse.c.o
patch.c.o
patch_generate.c.o
patch_parse.c.o
path.c.o
pathspec.c.o
pool.c.o
posix.c.o
pqueue.c.o
proxy.c.o
push.c.o
rebase.c.o
refdb.c.o
refdb_fs.c.o
reflog.c.o
refs.c.o
refspec.c.o
remote.c.o
repository.c.o
reset.c.o
revert.c.o
revparse.c.o
revwalk.c.o
settings.c.o
sha1_lookup.c.o
signature.c.o
sortedcache.c.o
stash.c.o
status.c.o
curl.c.o
mbedtls.c.o
openssl.c.o
socket.c.o
stransport.c.o
tls.c.o
strmap.c.o
submodule.c.o
sysdir.c.o
tag.c.o
thread-utils.c.o
trace.c.o
trailer.c.o
transaction.c.o
transport.c.o
auth.c.o
auth_negotiate.c.o
cred.c.o
cred_helpers.c.o
git.c.o
http.c.o
local.c.o
smart.c.o
smart_pkt.c.o
smart_protocol.c.o
ssh.c.o
winhttp.c.o
tree-cache.c.o
tree.c.o
tsort.c.o
util.c.o
varint.c.o
vector.c.o
worktree.c.o
xdiffi.c.o
xemit.c.o
xhistogram.c.o
xmerge.c.o
xpatience.c.o
xprepare.c.o
xutils.c.o
zstream.c.o
map.c.o
realpath.c.o
sha1.c.o
ubc_check.c.o

@bjorn3
Copy link
Contributor

bjorn3 commented Jan 21, 2020

That doesn't seem to be the problem.

@thepowersgang
Copy link
Owner

Might be related to #138 - there's some funnies with library link order.

@daym
Copy link
Contributor Author

daym commented Jan 21, 2020

Hmm, how could dtolnay see the linker command that is executed?

@thepowersgang
Copy link
Owner

The linker command comes from the gcc invocation, that should be in output-1.29.0/cargo-build/cargo_dbg.txt

@daym
Copy link
Contributor Author

daym commented Jan 24, 2020

The linker command that fails is:

"/gnu/store/x3jx25cd3q363mr7nbgzrhrv1vza6cf7-gcc-7.4.0/bin/gcc" "-ffunction-sections" "-pthread" "-O2" "-g" "-fPIC" "-o" "output-1.29.0/cargo-build/cargo" "output-1.29.0/cargo-build/cargo.c" "output-1.29.0/cargo-build/libvec_map-0_8_1.rlib.o" "output-1.29.0/cargo-build/libutf8_ranges-1_0_0.rlib.o" "output-1.29.0/cargo-build/liburl-1_7_1.rlib.o" "output-1.29.0/libunwind.rlib.o" "output-1.29.0/cargo-build/libunreachable-1_0_0.rlib.o" "output-1.29.0/cargo-build/libunicode_xid-0_1_0.rlib.o" "output-1.29.0/cargo-build/libucd_util-0_1_1.rlib.o" "output-1.29.0/cargo-build/libtoml-0_4_6.rlib.o" "output-1.29.0/cargo-build/libthread_local-0_3_5.rlib.o" "output-1.29.0/cargo-build/libtextwrap-0_10_0.rlib.o" "output-1.29.0/cargo-build/libtermcolor-1_0_1.rlib.o" "output-1.29.0/cargo-build/libtermcolor-0_3_6.rlib.o" "output-1.29.0/cargo-build/libsynstructure-0_9_0.rlib.o" "output-1.29.0/cargo-build/libstrsim-0_7_0.rlib.o" "output-1.29.0/cargo-build/libregex_syntax-0_5_6.rlib.o" "output-1.29.0/cargo-build/libunicode_width-0_1_5.rlib.o" "output-1.29.0/cargo-build/librustc_demangle-0_1_8.rlib.o" "output-1.29.0/cargo-build/libwalkdir-2_1_4.rlib.o" "output-1.29.0/cargo-build/libglob-0_2_11.rlib.o" "output-1.29.0/cargo-build/libglobset-0_4_0.rlib.o" "output-1.29.0/cargo-build/libgit2_curl-0_8_1.rlib.o" "output-1.29.0/cargo-build/libcrates_io-0_18_0.rlib.o" "output-1.29.0/cargo-build/libhome-0_3_2.rlib.o" "output-1.29.0/cargo-build/libforeign_types_shared-0_1_1.rlib.o" "output-1.29.0/cargo-build/libsame_file-1_0_2.rlib.o" "output-1.29.0/cargo-build/libfiletime-0_2_1.rlib.o" "output-1.29.0/cargo-build/libfailure-0_1_2.rlib.o" "output-1.29.0/cargo-build/libcurl_sys-0_4_7.rlib.o" "output-1.29.0/cargo-build/libsyn-0_14_4.rlib.o" "output-1.29.0/cargo-build/libjobserver-0_1_11.rlib.o" "output-1.29.0/cargo-build/libflate2-1_0_1.rlib.o" "output-1.29.0/cargo-build/libgit2-0_7_3.rlib.o" "output-1.29.0/libproc_macro.rlib.o" "output-1.29.0/cargo-build/liblibz_sys-1_0_18.rlib.o" "output-1.29.0/libpanic_abort.rlib.o" "output-1.29.0/cargo-build/libatty-0_2_11.rlib.o" "output-1.29.0/cargo-build/libcrypto_hash-0_3_1.rlib.o" "output-1.29.0/cargo-build/libidna-0_1_5.rlib.o" "output-1.29.0/cargo-build/libvoid-1_0_2.rlib.o" "output-1.29.0/cargo-build/libquote-0_6_3.rlib.o" "output-1.29.0/cargo-build/libforeign_types-0_3_2.rlib.o" "output-1.29.0/cargo-build/liblazycell-1_0_0.rlib.o" "output-1.29.0/cargo-build/libenv_logger-0_5_10.rlib.o" "output-1.29.0/cargo-build/libbacktrace-0_3_9.rlib.o" "output-1.29.0/libcore.rlib.o" "output-1.29.0/cargo-build/libhumantime-1_1_1.rlib.o" "output-1.29.0/cargo-build/libansi_term-0_11_0.rlib.o" "output-1.29.0/cargo-build/librustfix-0_4_2.rlib.o" "output-1.29.0/liballoc_system.rlib.o" "output-1.29.0/cargo-build/libdtoa-0_4_3.rlib.o" "output-1.29.0/cargo-build/liblibssh2_sys-0_2_8.rlib.o" "output-1.29.0/cargo-build/libtar-0_4_16.rlib.o" "output-1.29.0/cargo-build/libopenssl_probe-0_1_2.rlib.o" "output-1.29.0/cargo-build/libregex-1_0_1.rlib.o" "output-1.29.0/cargo-build/libhex-0_3_2.rlib.o" "output-1.29.0/cargo-build/libcfg_if-0_1_4.rlib.o" "output-1.29.0/cargo-build/libregex-0_2_11.rlib.o" "output-1.29.0/cargo-build/libremove_dir_all-0_5_1.rlib.o" "output-1.29.0/liballoc.rlib.o" "output-1.29.0/cargo-build/libcurl-0_4_13.rlib.o" "output-1.29.0/cargo-build/libquick_error-1_2_2.rlib.o" "output-1.29.0/cargo-build/libfs2-0_4_3.rlib.o" "output-1.29.0/cargo-build/libbacktrace_sys-0_1_24.rlib.o" "output-1.29.0/cargo-build/libbitflags-1_0_3.rlib.o" "output-1.29.0/cargo-build/liblibgit2_sys-0_7_6.rlib.o" "output-1.29.0/cargo-build/libtempfile-3_0_2.rlib.o" "output-1.29.0/cargo-build/libcargo-0_30_0.rlib.o" "output-1.29.0/cargo-build/libclap-2_32_0.rlib.o" "output-1.29.0/cargo-build/libcrossbeam-0_3_2.rlib.o" "output-1.29.0/cargo-build/libcrossbeam_utils-0_5_0.rlib.o" "output-1.29.0/cargo-build/librand-0_4_2.rlib.o" "output-1.29.0/cargo-build/libignore-0_4_2.rlib.o" "output-1.29.0/cargo-build/libitoa-0_4_2.rlib.o" "output-1.29.0/liblibc.rlib.o" "output-1.29.0/cargo-build/liblibc-0_2_42.rlib.o" "output-1.29.0/cargo-build/liblog-0_4_3.rlib.o" "output-1.29.0/cargo-build/libmatches-0_1_7.rlib.o" "output-1.29.0/cargo-build/libmemchr-2_0_1.rlib.o" "output-1.29.0/cargo-build/libminiz_sys-0_1_10.rlib.o" "output-1.29.0/cargo-build/libopenssl-0_10_11.rlib.o" "output-1.29.0/cargo-build/libaho_corasick-0_6_6.rlib.o" "output-1.29.0/cargo-build/libopenssl_sys-0_9_35.rlib.o" "output-1.29.0/cargo-build/libpercent_encoding-1_0_1.rlib.o" "output-1.29.0/cargo-build/libproc_macro2-0_4_8.rlib.o" "output-1.29.0/cargo-build/libshell_escape-0_1_4.rlib.o" "output-1.29.0/cargo-build/libregex_syntax-0_6_1.rlib.o" "output-1.29.0/cargo-build/libsemver-0_9_0.rlib.o" "output-1.29.0/cargo-build/libsemver_parser-0_7_0.rlib.o" "output-1.29.0/cargo-build/libnum_cpus-1_8_0.rlib.o" "output-1.29.0/cargo-build/libserde-1_0_70.rlib.o" "output-1.29.0/cargo-build/liblazy_static-1_0_2.rlib.o" "output-1.29.0/cargo-build/libunicode_normalization-0_1_7.rlib.o" "output-1.29.0/cargo-build/libfnv-1_0_6.rlib.o" "output-1.29.0/cargo-build/libserde_ignored-0_0_4.rlib.o" "output-1.29.0/cargo-build/libsocket2-0_3_7.rlib.o" "output-1.29.0/cargo-build/libserde_json-1_0_24.rlib.o" "output-1.29.0/cargo-build/libunicode_bidi-0_3_4.rlib.o" "output-1.29.0/libstd.rlib.o" "-L" "output-1.29.0" "-L" "output-1.29.0/cargo-build" "-L" "/gnu/store/4m8dlhrzis07787xznx73ang35c3lly1-curl-7.65.3/lib" "-L" "/gnu/store/qx7p7hiq90mi7r78hcr9cyskccy2j4bg-zlib-1.2.11/lib" "-L" "/tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libssh2-sys/lib" "-L" "/tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_backtrace-sys" "-L" "/tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_libgit2-sys/lib" "-L" "/tmp/guix-build-rust-1.29.0.drv-0/output-1.29.0/cargo-build/build_miniz-sys" "-L" "/gnu/store/0lpmrn4z9lh13wzqi1kxrfsdvcxsdpy1-openssl-1.0.2u/lib" "-l" "curl" "-l" "z" "-l" "ssh2" "-l" "backtrace" "-l" "git2" "-l" "util" "-l" "util" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util" "-l" "miniz" "-l" "ssl" "-l" "crypto" "-l" "dl" "-l" "rt" "-l" "pthread" "-Wl,--gc-sections" 

@daym
Copy link
Contributor Author

daym commented Jan 24, 2020

Moving "-l" "ssh2" to immediately after "-l" "git2" manually makes it work just fine.

@rotty
Copy link

rotty commented Jan 30, 2020

Moving "-l" "ssh2" to immediately after "-l" "git2" manually makes it work just fine.

This seems familiar; I encountered a similar issue here; my assumption, as noted in that comment, is this is due to a change in linker behavior:

It seems newer toolchains no longer resolve symbols when the library precedes the referencing object file. This has always been the case for static libraries, as far as I'm aware, but now seems to also be the case for shared libs.

@thepowersgang
Copy link
Owner

Closing in favor of #138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants