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

cargo build --release hangs on Mac #109

Closed
jasonivers opened this issue Mar 3, 2017 · 5 comments
Closed

cargo build --release hangs on Mac #109

jasonivers opened this issue Mar 3, 2017 · 5 comments

Comments

@jasonivers
Copy link

jasonivers commented Mar 3, 2017

I went to the gem directory and attempted to run

cargo build --release --verbose

It hung at this:

Updating registry https://github.com/rust-lang/crates.io-index``

So I ran

RUST_LOG=cargo::core::resolve,cargo::core::registry cargo build --release --verbose

and it hung after outputting

TRACE:cargo::core::registry: register_lock: faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
TRACE:cargo::core::registry: 	-> libc v0.2.11
TRACE:cargo::core::registry: register_lock: libc v0.2.11
DEBUG:cargo::core::registry: load/missing  file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11
TRACE:cargo::core::registry: locking summary of faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
TRACE:cargo::core::registry: 	libc/^0.2.11/registry https://github.com/rust-lang/crates.io-index
TRACE:cargo::core::registry: 	first hit on libc v0.2.11
DEBUG:cargo::core::resolver: initial activation: faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
TRACE:cargo::core::resolver: activating faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
DEBUG:cargo::core::registry: load/missing  registry https://github.com/rust-lang/crates.io-index
TRACE:cargo::core::registry: locking summary of libc v0.2.11
TRACE:cargo::core::resolver: faster_path[0]>libc 1 candidates
TRACE:cargo::core::resolver: faster_path[0]>libc 0 prev activations
TRACE:cargo::core::resolver: faster_path[0]>libc trying 0.2.11
TRACE:cargo::core::resolver: activating libc v0.2.11
TRACE:cargo::core::resolver: resolved: graph: Graph {
  - libc v0.2.11
  - faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
    - libc v0.2.11
}

features: {
  libc v0.2.11: {"default", "use_std"}
}
TRACE:cargo::core::registry: register_lock: libc v0.2.11
TRACE:cargo::core::registry: register_lock: faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
TRACE:cargo::core::registry: 	-> libc v0.2.11
DEBUG:cargo::core::registry: load/locked   file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11
TRACE:cargo::core::registry: locking summary of faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
TRACE:cargo::core::registry: 	libc/^0.2.11/registry https://github.com/rust-lang/crates.io-index
TRACE:cargo::core::registry: 	first hit on libc v0.2.11
DEBUG:cargo::core::resolver: initial activation: faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
TRACE:cargo::core::resolver: activating faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
DEBUG:cargo::core::registry: load/match    registry https://github.com/rust-lang/crates.io-index
TRACE:cargo::core::registry: locking summary of libc v0.2.11
TRACE:cargo::core::resolver: faster_path[0]>libc 1 candidates
TRACE:cargo::core::resolver: faster_path[0]>libc 0 prev activations
TRACE:cargo::core::resolver: faster_path[0]>libc trying 0.2.11
TRACE:cargo::core::resolver: activating libc v0.2.11
TRACE:cargo::core::resolver: resolved: graph: Graph {
  - faster_path v0.0.1 (file:///Users/jason/.rvm/gems/ruby-2.4.0@wedo/gems/faster_path-0.1.11)
    - libc v0.2.11
  - libc v0.2.11
}

features: {
  libc v0.2.11: {"use_std", "default"}
}
TRACE:cargo::core::registry: getting packages; sources=2

I don't seem to be able to get this gem to build.

@danielpclark
Copy link
Owner

danielpclark commented Mar 3, 2017

Can you provide the following information:

rustc --version --verbose
cargo --version --verbose

Also delete the Cargo.lock file and try again. http://doc.crates.io/guide.html#cargo.toml-vs-cargo.lock

I'm looking into what may be the issue. Could be related to:

rust-lang/cargo#2845 , rust-lang/cargo#2090 , rust-lang/cargo#2975 , rust-lang/cargo#2078

And check your global git config for SSH preference.

git config core.gitproxy

I appreciate the details!

@danielpclark
Copy link
Owner

Also any info you can give me on your Mac's architecture will be super helpful.

@heibor
Copy link

heibor commented Apr 18, 2017

rustc 1.16.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-apple-darwin
release: 1.16.0
LLVM version: 3.9

cargo-0.17.0-dev (f9e5481 2017-03-03)
release: 0.17.0
commit-hash: f9e54817e53c7b9845cc7c1ede4c11e4d3e42e36
commit-date: 2017-03-03

@danielpclark
Copy link
Owner

The Rakefile has been updated on this project to provide more details about the system. Please run rake sysinfo and put the information here.

According to @jasonivers' debugging info this is related to libc. Have you looked into libc verifying you have libc on your Mac?

@jasonivers
Copy link
Author

So... this appears to have been caused by homebrew on my Mac NOT updating rust itself properly. After a whole lot of debugging stuff and looking errors up on Google, I found that the error came from rust version 1.15, while everything seemed to indicate I was on 1.16. Finally just uninstalled the whole thing, wiped all rust directories, etc, then reinstalled, and everything worked fine and completed in about 2 seconds, rather than hanging for hours. Can't believe how much of a pain that was... I'll make sure that all of my servers do a clean install of rust 1.16, as well.

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

No branches or pull requests

3 participants