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

Rust 1.23 bus error during stage 2 build on Solaris sparc #47930

Closed
psumbera opened this issue Feb 1, 2018 · 8 comments
Closed

Rust 1.23 bus error during stage 2 build on Solaris sparc #47930

psumbera opened this issue Feb 1, 2018 · 8 comments
Labels
C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-SPARC Target: SPARC processors T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.

Comments

@psumbera
Copy link
Contributor

psumbera commented Feb 1, 2018

While building Rust 1.23 (using 1.22.1) on Solaris sparc it ends like this (on intel it's ok):

...
Copying stage2 rustc from stage1 (sparcv9-sun-solaris -> sparcv9-sun-solaris / sparcv9-sun-solaris)
Building rustdoc for stage2 (sparcv9-sun-solaris)
   Compiling void v1.0.2
   Compiling bitflags v0.9.1
   Compiling cc v1.0.3
   Compiling fnv v1.0.6
error: Could not compile `void`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `bitflags`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `fnv`.
warning: build failed, waiting for other jobs to finish...
error: Could not compile `cc`.
...

There are four core dumps from this:


Feb  1 12:20:53 s11-u3-ul-cbe genunix: [ID 603404 kern.notice] NOTICE: core_log: rustc[6944] core dumped: /var/cores/core.rustc.157622.1517487635
Feb  1 12:20:57 s11-u3-ul-cbe genunix: [ID 603404 kern.notice] NOTICE: core_log: rustc[6940] core dumped: /var/cores/core.rustc.157622.1517487640
Feb  1 12:21:03 s11-u3-ul-cbe genunix: [ID 603404 kern.notice] NOTICE: core_log: rustc[6938] core dumped: /var/cores/core.rustc.157622.1517487646
Feb  1 12:21:03 s11-u3-ul-cbe genunix: [ID 603404 kern.notice] NOTICE: core_log: rustc[6942] core dumped: /var/cores/core.rustc.157622.1517487649

All cores look very similar:

0007ff0d6d7f3600 librustc_trans-addd6d21065150e2.so`_$LT$std..sync..mpsc..Sender$LT$T$GT$$GT$::send::h815a2ce69c64504c+0x18(0, 10007ff0d7888fb, 780007ff0d6d7f41, d000000016264f79,
800007ff0d6d7f41, 2800000000000000)

rustc command line which cores dump is:

s11-u3-ul-cbe 13:22 /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9: RUSTBUILD_NATIVE_DIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/native RUSTC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc RUSTC_REAL=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc RUSTC_STAGE=2 RUSTC_DEBUG_ASSERTIONS=false RUSTC_SYSROOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2 RUSTC_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib RUSTC_RPATH=true RUSTDOC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustdoc RUSTDOC_REAL=/path/to/nowhere/rustdoc/not/required /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name bitflags /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/bitflags-0.7.0/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=484c479121fee6f9 -C extra-filename=-484c479121fee6f9 --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow --verbose
Segmentation Fault (core dumped)
@psumbera
Copy link
Contributor Author

psumbera commented Feb 1, 2018

When I build on the same system older Rust 1.22.1 (using the same Rust 1.22.1) it goes fine.

@sfackler sfackler added I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-SPARC Target: SPARC processors labels Feb 1, 2018
@gsollazzo gsollazzo added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Feb 1, 2018
@psumbera
Copy link
Contributor Author

psumbera commented Feb 9, 2018

Following is cargo command output with --verbose flag:

CARGO_HOME=/scratch/userland-rust-s11.3/components/rust/rustc/build/.cargo CARGO_TARGET_DIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools __CARGO_DEFAULT_LIB_METADATA=dev RUSTBUILD_NATIVE_DIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/native RUSTC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc RUSTC_REAL=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc RUSTC_STAGE=2 RUSTC_DEBUG_ASSERTIONS=false RUSTC_SYSROOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2 RUSTC_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib RUSTC_RPATH=true RUSTDOC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustdoc RUSTDOC_REAL=/path/to/nowhere/rustdoc/not/required TEST_MIRI=false RUSTC_BOOTSTRAP=1 RUST_TEST_THREADS=4 RUSTC_SNAPSHOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc RUSTC_SNAPSHOT_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib RUSTC_VERBOSE=0 CC=gcc  CFLAGS="-ffunction-sections -fdata-sections -fPIC"  AR=ar  RANLIB=ar  CXX=g++ RUSTDOC_CRATE_VERSION=1.23.0-dev CFG_COMPILER_HOST_TRIPLE=sparcv9-sun-solaris CFG_RELEASE_CHANNEL=dev RUSTC_THINLTO=1 RUSTC_NO_PREFER_DYNAMIC=1 LZMA_API_STATIC=1 CFG_VERSION=1.23.0-dev RUSTC_DEBUGINFO=false RUSTC_DEBUGINFO_LINES=false /usr/bin/cargo build --target sparcv9-sun-solaris --release --manifest-path /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src/src/tools/rustdoc/Cargo.toml --verbose
s11-u3-ul-cbe 10:51 /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9: CARGO_HOME=/scratch/userland-rust-s11.3/components/rust/rustc/build/.cargo CARGO_TARGET_DIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools __CARGO_DEFAULT_LIB_METADATA=dev RUSTBUILD_NATIVE_DIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/native RUSTC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc RUSTC_REAL=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc RUSTC_STAGE=2 RUSTC_DEBUG_ASSERTIONS=false RUSTC_SYSROOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2 RUSTC_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib RUSTC_RPATH=true RUSTDOC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustdoc RUSTDOC_REAL=/path/to/nowhere/rustdoc/not/required TEST_MIRI=false RUSTC_BOOTSTRAP=1 RUST_TEST_THREADS=4 RUSTC_SNAPSHOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc RUSTC_SNAPSHOT_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib RUSTC_VERBOSE=0 CC=gcc  CFLAGS="-ffunction-sections -fdata-sections -fPIC"  AR=ar  RANLIB=ar  CXX=g++ RUSTDOC_CRATE_VERSION=1.23.0-dev CFG_COMPILER_HOST_TRIPLE=sparcv9-sun-solaris CFG_RELEASE_CHANNEL=dev RUSTC_THINLTO=1 RUSTC_NO_PREFER_DYNAMIC=1 LZMA_API_STATIC=1 CFG_VERSION=1.23.0-dev RUSTC_DEBUGINFO=false RUSTC_DEBUGINFO_LINES=false /usr/bin/cargo build --target sparcv9-sun-solaris --release --manifest-path /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src/src/tools/rustdoc/Cargo.toml --verbose
   Compiling lazy_static v0.2.11
   Compiling fnv v1.0.6
   Compiling mac v0.1.1
   Compiling unicode-xid v0.0.4
     Running `/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name lazy_static /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/lazy_static/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=3f8fdf18b00fa5f5 -C extra-filename=-3f8fdf18b00fa5f5 --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow`
     Running `/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name fnv /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/fnv/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=a91570d0287a572e -C extra-filename=-a91570d0287a572e --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow`
	 error: Could not compile `unicode-xid`.

Caused by:
  process didn't exit successfully: `/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name unicode_xid /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/unicode-xid/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 --cfg feature="default" -C metadata=fccd58133e25a71b -C extra-filename=-fccd58133e25a71b --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `mac`.

Caused by:
  process didn't exit successfully: `/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name mac /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/mac/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=720d5316be52fc06 -C extra-filename=-720d5316be52fc06 --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `fnv`.

Caused by:
  process didn't exit successfully: `/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name fnv /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/fnv/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=a91570d0287a572e -C extra-filename=-a91570d0287a572e --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `lazy_static`.

Caused by:
  process didn't exit successfully: `/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name lazy_static /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/lazy_static/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=3f8fdf18b00fa5f5 -C extra-filename=-3f8fdf18b00fa5f5 --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps -L dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
 

And this is individual rustc command which cores dump (I had to remove --cfg feature="default" --cfg feature="example_generated", but don't know why):

$ RUSTBUILD_NATIVE_DIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/native \
RUSTC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc \
RUSTC_REAL=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc \
RUSTC_STAGE=2 RUSTC_DEBUG_ASSERTIONS=false \
RUSTC_SYSROOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2 \
RUSTC_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib \
RUSTC_RPATH=true \
RUSTDOC=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustdoc \
RUSTDOC_REAL=/path/to/nowhere/rustdoc/not/required \
RUSTC_BOOTSTRAP=1 RUST_TEST_THREADS=4 \
RUSTC_SNAPSHOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc \
RUSTC_SNAPSHOT_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib \
RUSTC_VERBOSE=0 \
RUSTDOC_CRATE_VERSION=1.23.0-dev \
CFG_COMPILER_HOST_TRIPLE=sparcv9-sun-solaris \
CFG_RELEASE_CHANNEL=dev RUSTC_THINLTO=1 \
RUSTC_NO_PREFER_DYNAMIC=1 \
CFG_VERSION=1.23.0-dev RUSTC_DEBUGINFO=false \
RUSTC_DEBUGINFO_LINES=false CARGO_PKG_VERSION_PRE= \
/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc --crate-name bitflags /scratch/userland-rust-s11.3/components/rust/rustc/rustc-1.23.0-src-vendored-sources/bitflags-0.9.1/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=e6ef588569977e18 -C extra-filename=-e6ef588569977e18 --out-dir /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps --target sparcv9-sun-solaris -L  dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/sparcv9-sun-solaris/release/deps  -L  dependency=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2-tools/release/deps --cap-lints allow
Segmentation Fault (core dumped)

Yet the core looks still the same:

t@4 (l@4) terminated by signal SEGV (no mapping at the fault address)
0x001ffd63ba8dc414: h3ddd15065e34e707+0x00d4:   stx      %i3, [%fp + 1871]
(dbx) where
current thread: t@4
=>[1] _$LT$std..sync..mpsc..oneshot..Packet$LT$T$GT$$GT$::send::h3ddd15065e34e707(), at 0x1ffd63ba8dc414

@psumbera
Copy link
Contributor Author

psumbera commented Feb 9, 2018

Ok. The issue is simply that stage2 compiler is broken:

$ cat mytest.rs
fn main() { println!("Hello World!"); }
$ RUSTC_REAL=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc \
> RUSTC_STAGE=2 \
> RUSTC_SYSROOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2 \
> RUSTC_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib \
> RUSTC_SNAPSHOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/bin/rustc \
> RUSTC_SNAPSHOT_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage2/lib \
> /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc mytest.rs
Segmentation Fault (core dumped)
$ RUSTC_REAL=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage1/bin/rustc \
> RUSTC_STAGE=2 \
> RUSTC_SYSROOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage1 \
> RUSTC_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage1/lib \
> RUSTC_SNAPSHOT=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage1/bin/rustc \
> RUSTC_SNAPSHOT_LIBDIR=/scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/sparcv9-sun-solaris/stage1/lib \
> /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9/build/bootstrap/debug/rustc mytest.rs
s11-u3-ul-cbe 14:18 /scratch/userland-rust-s11.3/components/rust/rustc/build/sparcv9: ./mytest
Hello World!

@glaubitz
Copy link
Contributor

glaubitz commented Feb 11, 2018

The problem seems to be that the patch by @jrtc27 to fix the stack alignment on sparc64 in LLVM was merged into the rust-llvm-release-4-0-1 and rust-llvm-release-6-0-0 branches but not in the master branch which is used by default when building rustc.

The necessary PR is: rust-lang/llvm#94

The patch has already been merged upstream (https://reviews.llvm.org/D39425) and was also backported to the 6.0 branch (https://bugs.llvm.org/show_bug.cgi?id=36188).

So, in order to fix this issue, it should simply be enough to get the patch merged into https://github.com/rust-lang/llvm.

Edit: I also had to downgrade binutils to 2.28 as binutils 2.30 breaks rustc builds on sparc64. And the problem is that I have no clue which branches of compiler-rt`` and llvm rustc``` is actually using.

@glaubitz
Copy link
Contributor

@psumbera Any success with the latest LLVM patches?

@psumbera
Copy link
Contributor Author

@psumbera Any success with the latest LLVM patches?

LLVM patches help for this issue. Though not sure when they will be included so that I can close this issue.

Note that they help but later rustdoc core dumped. So I have to disable documentation (--disable-docs) to get working rust-1.23 on sparc. rust -1.24 seems to be better (but now there is some linker issue on Solaris 11.3. Solaris 11.4 seems to be fine).

@sanxiyn
Copy link
Member

sanxiyn commented Feb 23, 2019

What's the current status here?

@psumbera
Copy link
Contributor Author

I believe we can close the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. O-SPARC Target: SPARC processors T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants