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

rustc fails to build for target riscv64gc-unknown-linux-musl #111700

Open
r-value opened this issue May 18, 2023 · 0 comments
Open

rustc fails to build for target riscv64gc-unknown-linux-musl #111700

r-value opened this issue May 18, 2023 · 0 comments
Labels
C-bug Category: This is a bug. requires-custom-config This issue requires custom config/build for rustc in some way T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@r-value
Copy link

r-value commented May 18, 2023

I'm trying to build rustc version 1.68.0 natively on RISC-V machine with target riscv64gc-unknown-linux-musl enabled. It fails when building libunwind.a for musl target in stage2.

Similar error also occurs in version 1.69.0.

Configuration:

[target.riscv64gc-unknown-linux-musl]
sanitizers = false
musl-root = "/usr/lib/musl"
cc = "/usr/bin/musl-gcc"
cxx = "/usr/bin/musl-gcc"

Error log:

Building libunwind.a for riscv64gc-unknown-linux-musl
CXX_riscv64gc-unknown-linux-musl = None
CXX_riscv64gc_unknown_linux_musl = None
TARGET_CXX = None
CXX = None
CROSS_COMPILE = None
CXXFLAGS_riscv64gc-unknown-linux-musl = None
CXXFLAGS_riscv64gc_unknown_linux_musl = None
TARGET_CXXFLAGS = None
CXXFLAGS = Some("-march=rv64gc -mabi=lp64d -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS")
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = None
running: "/usr/bin/musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=rv64gc" "-mabi=lp64d" "-mcmodel=medany" "-march=rv64gc" "-mabi=lp64d" "-O2" "-pipe" "-fno-plt" "-fexceptions" "-Wp,-D_FORTIFY_SOURCE=2" "-Wformat" "-Werror=format-security" "-fstack-clash-protection" "-I" "/build/rust/src/rustc-1.68.0-src/src/llvm-project/libunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hidden" "-std=c++11" "-fvisibility-global-new-delete-hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/build/rust/src/rustc-1.68.0-src/build/riscv64gc-unknown-linux-musl/native/libunwind/Unwind-EHABI.o" "-c" "/build/rust/src/rustc-1.68.0-src/src/llvm-project/libunwind/src/Unwind-EHABI.cpp"
cargo:warning=cc1plus: error: unrecognized command-line option ‘-fvisibility-global-new-delete-hidden’
exit status: 1


error occurred: Command "/usr/bin/musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=rv64gc" "-mabi=lp64d" "-mcmodel=medany" "-march=rv64gc" "-mabi=lp64d" "-O2" "-pipe" "-fno-plt" "-fexceptions" "-Wp,-D_FORTIFY_SOURCE=2" "-Wformat" "-Werror=format-security" "-fstack-clash-protection" "-I" "/build/rust/src/rustc-1.68.0-src/src/llvm-project/libunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hidden" "-std=c++11" "-fvisibility-global-new-delete-hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/build/rust/src/rustc-1.68.0-src/build/riscv64gc-unknown-linux-musl/native/libunwind/Unwind-EHABI.o" "-c" "/build/rust/src/rustc-1.68.0-src/src/llvm-project/libunwind/src/Unwind-EHABI.cpp" with args "musl-gcc" did not execute successfully (status code exit status: 1).

It probably relates to rust-lang/cc-rs#675 since cc is specified manually for musl.

r-value added a commit to r-value/rust that referenced this issue May 18, 2023
Bump the version of dependency `cc` to v1.0.77 for `bootstrap`, syncing with rust/Cargo.lock

Resolves rust-lang#111700
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. requires-custom-config This issue requires custom config/build for rustc in some way labels May 18, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 19, 2023
Bump `cc` for `bootstrap`

Bump the version of dependency `cc` to `1.0.77` for `bootstrap`, syncing with `rust/Cargo.lock`

Resolves rust-lang#111700
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue May 19, 2023
Bump `cc` for `bootstrap`

Bump the version of dependency `cc` to `1.0.77` for `bootstrap`, syncing with `rust/Cargo.lock`

Resolves rust-lang#111700
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue May 19, 2023
Bump `cc` for `bootstrap`

Bump the version of dependency `cc` to `1.0.77` for `bootstrap`, syncing with `rust/Cargo.lock`

Resolves rust-lang#111700
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 21, 2023
Bump `cc` for `bootstrap`

Bump the version of dependency `cc` to `1.0.77` for `bootstrap`, syncing with `rust/Cargo.lock`

Resolves rust-lang#111700
r-value added a commit to r-value/rust that referenced this issue May 22, 2023
This version also resolves rust-lang#111700, try if we can bump to this release
without regression.
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. requires-custom-config This issue requires custom config/build for rustc in some way T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants