Description
$ brew upgrade rust
Updating Homebrew...
==> Upgrading 1 outdated package, with result:
rust 1.24.1 -> 1.27.0
==> Upgrading rust
==> Downloading https://static.rust-lang.org/dist/rustc-1.27.0-src.tar.gz
Already downloaded: /Users/tomthornhill/Library/Caches/Homebrew/rust-1.27.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/rust/1.27.0 --release-channel=stable
==> make
Last 15 lines from /Users/tomthornhill/Library/Logs/Homebrew/rust/02.make:
Compiling rustc_asan v0.0.0 (file:///private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/src/librustc_asan)
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
error: Could not compile core
.
Caused by:
process didn't exit successfully: /private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/build/bootstrap/debug/rustc --crate-name core libcore/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=d6fce06e1bd3d804 -C extra-filename=-d6fce06e1bd3d804 --out-dir /private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps -L dependency=/private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/build/x86_64-apple-darwin/stage1-std/release/deps
(signal: 6, SIGABRT: process abort signal)
command did not execute successfully: "/private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "--target" "x86_64-apple-darwin" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
thread 'main' panicked at 'cargo must succeed', bootstrap/compile.rs:1091:9
note: Run with RUST_BACKTRACE=1
for a backtrace.
failed to run: /private/tmp/rust-20180627-37269-nj9tsn/rustc-1.27.0-src/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 1:07:56
make: *** [all] Error 1
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
Rust won't upgrade Homebrew/homebrew-core#29360
Error: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
Error: You have MacPorts or Fink installed:
/opt/local/bin/port
This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.
sudo mv /opt/local ~/macports
Error: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
Activity
STA-WSYNC commentedon Jun 27, 2018
I'm actually interested in using this tool
https://github.com/BurntSushi/xsv
I tried pinning Rust to the last version that worked, but Homebrew won't let me install based on that
E.g.
$ brew info rust
rust: stable 1.27.0, HEAD
Safe, concurrent, practical language
https://www.rust-lang.org/
Conflicts with:
cargo-completion (because both install shell completion for cargo)
/usr/local/Cellar/rust/1.22.1 (6,211 files, 339.9MB)
Built from source on 2017-12-18 at 20:45:13
/usr/local/Cellar/rust/1.24.1 (6,033 files, 404.6MB) *
Built from source on 2018-03-05 at 19:59:53
So I did
brew switch rust 1.24.1
brew pin rust
brew install xsv
Fails with
Error: You must
brew unpin rust
as installing xsv requires the latest version of pinned dependenciesI just want to run xsv to process a huge csv file I've got
STA-WSYNC commentedon Jun 27, 2018
I turns out there is a workaround.
https://stackoverflow.com/questions/19664535/how-can-i-prevent-homebrew-from-upgrading-vtk-dependency-for-pcl/19665408#19665408
So for my problem I did this
cd /usr/local/Cellar/rust
ln -s 1.24.1 1.27.0
I.e. trick Homebrew into thinking it already has 1.27.0. With this I can build xsv
$ brew install xsv
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask, homebrew/core).
==> Updated Formulae
git-annex
==> Downloading https://github.com/BurntSushi/xsv/archive/0.13.0.tar.gz
==> Downloading from https://codeload.github.com/BurntSushi/xsv/tar.gz/0.13.0
######################################################################## 100.0%
==> cargo install --root /usr/local/Cellar/xsv/0.13.0
🍺 /usr/local/Cellar/xsv/0.13.0: 6 files, 3.5MB, built in 4 minutes 15 seconds
And yeah, I know I should upgrade the OS from 10.10. Unfortunately doing that will probably break a lot of other things at this point.
And this workaround is actually handy for any situation where you want to install package X, package X depends on the latest version of package Y and for some reason (poverty, laziness) you can't use the latest version of package Y on your machine.
STA-WSYNC commentedon Jun 27, 2018
The answer seems to be to upgrade to an OS where you can still get a bottled version. I upgraded to 10.12, Sierra. And now I can upgrade Rust just fine
tl;dr - if you use an OS for which a bottled version doesn't exist, you need to compile it and that may fail. Don't use an OS for which a bottled version doesn't exist. Right now that's
https://github.com/Homebrew/homebrew-core/blob/master/Formula/rust.rb
I.e. High Sierra, Sierra or El Capitan. Basically anything in the last three releases should be OK.
Ionic commentedon Jul 6, 2018
I ran into this as well on a 10.9 machine. Our rust port (MacPorts) was recently updated to 1.27.0 and has been failing on older systems in the same way.
1.26.0 built fine (if the assembler is recent enough), so it must be some kind of regression.
Build log
I've tried different compilers, namely clang-5.0 and clang-6.0, with the same result. I've tried updating the bootstrap cargo version to 0.28.0, without any effect.
What puzzles me most is that I don't get actual output. The stack overflow error in cargo is most likely a red herring, since the default stack size is 8M which should be plenty and matches the default Linux stacksize. We already pass
BOOTSTRAP_ARGS="-v ..."
andVERBOSE=1
to the make invocation, but obviously this is not enough to get the actual rustc output.I retried the failed attempt with the stack size set to 32M and passing
-vvv
viaBOOTSTRAP_ARGS
, without any good effect:Increased stack size
The backtrace is pretty useless and FWIW doesn't seem to indicate infinite recursion or the like.
I suspect that the stack overflow error is really
cargo
being unable to handle therustc
failure (SIGABRT
).STA-WSYNC commentedon Jul 6, 2018
Ionic commentedon Jul 6, 2018
Yes, I know, homebrew uses precompiled packages if possible.
The issue is that a source build is failing on 10.10 and below and we're hit by this in MacPorts, too.
Upstream could say they don't care since the OS version is so old (i.e., unsupported by Apple), but the bug is still valid and there is no fix yet.
I'm currently trying to bisect this, given that 1.26.0 did compile.
Ionic commentedon Jul 6, 2018
This said, since you obviously will not be able to reproduce this any longer (after you upgraded to 10.12) and might be uninterested in the result of this bugs triaging/resolution, feel free to unsubscribe from this report.
STA-WSYNC commentedon Jul 6, 2018
Ionic commentedon Jul 6, 2018
I'm still using OS X 10.9, MacPorts, no Homebrew and have always been compiling all software from source, skipping binary packages, even though they exist (within MacPorts, at least). I'm fully aware of all the drawbacks and benefits. :)
We have the odd bunch of users who use even older systems. If we can make software build for older platforms with reasonable effort, we generally do it.
We're digressing, though.
Given that 1.26.0 did compile on older platforms, the regression must be recent and the chance of finding the culprit is rather high.
STA-WSYNC commentedon Jul 6, 2018
Ionic commentedon Jul 12, 2018
After a lot of building, working around broken state in the git history etc. I managed to actually bisect the commit that causes the
rustc
crashing:e85c922
I confirmed that reverting e85c922, a185b56 and 9127990 lets the 1.27.0 tag build fine on my 10.9 machine.
Must be related to the new stack guard handling, merged as #48575.
For instance, I notice that
deinit()
is a stub for everything but Linux.Why exactly this breaks rustc on older OS X platforms beats me, though. Any more information necessary?
STA-WSYNC commentedon Jul 12, 2018
pkgw commentedon Oct 17, 2018
I have this problem too, trying to build a package of a Rust program for the conda-forge packaging system on Travis CI. Example build log (with lots of flailing trying to increase the stack size and whatnot).
This bug is currently blocking my builds, although perhaps there's a more recent Travis OS image that I can try using.
9 remaining items