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

upgpatch: rust #2333

Merged
merged 1 commit into from
Mar 28, 2023
Merged

upgpatch: rust #2333

merged 1 commit into from
Mar 28, 2023

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Mar 15, 2023

Fix rotten patch.

@kxxt kxxt marked this pull request as draft March 15, 2023 11:22
@kxxt
Copy link
Contributor Author

kxxt commented Mar 15, 2023

I am hitting this error on my build machine.

running: "/usr/bin/musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=rv64gc" "-mabi=lp64d" "-m
cmodel=medany" "-march=rv64gc" "-mabi=lp64d" "-O2" "-pipe" "-fno-plt" "-fexceptions" "-Wp,-D_FORTIFY_SOURCE=2" "-Wfo
rmat" "-Werror=format-security" "-fstack-clash-protection" "-I" "/build/rust/src/rustc-1.68.0-src/src/llvm-project/l
ibunwind/include" "-nostdinc++" "-fno-exceptions" "-fno-rtti" "-fstrict-aliasing" "-funwind-tables" "-fvisibility=hi
dden" "-std=c++11" "-fvisibility-global-new-delete-hidden" "-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" "-o" "/buil
d/rust/src/rustc-1.68.0-src/build/riscv64gc-unknown-linux-musl/native/libunwind/Unwind-EHABI.o" "-c" "/build/rust/sr
c/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

It seems unrelated to the patch.

Any advice is appreciated since it takes too long to build rust.

Update: It seems that ‘-fvisibility-global-new-delete-hidden’ is only supported by clang++

Full build log: rust-1:1.68.0-1-riscv64-build.log

@kxxt
Copy link
Contributor Author

kxxt commented Mar 17, 2023

Commenting this line made the build pass but I doubt if it is the right solution.

src/rustc-1.68.0-src/src/bootstrap/native.rs
1256:        //cpp_cfg.flag_if_supported("-fvisibility-global-new-delete-hidden");

@kxxt
Copy link
Contributor Author

kxxt commented Mar 17, 2023

It is odd that if I build the 1:1.67.1-1 version of the PKGBUILD with the patch from this repo, the same error occurs.

@kxxt
Copy link
Contributor Author

kxxt commented Mar 17, 2023

I have confirmed that this is caused by a bug in cc crate which is already fixed by rust-lang/cc-rs#757

I will make a PR to rust repo that updates their cc dependency to get it fixed.

@r-value
Copy link
Collaborator

r-value commented Mar 17, 2023

Cannot reproduce on RISC-V hardware. I think the PR is ready to merge.

@kxxt kxxt marked this pull request as ready for review March 17, 2023 14:54
Copy link
Collaborator

@r-value r-value left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds fine on RISC-V hardware.

@felixonmars felixonmars merged commit d748b73 into felixonmars:master Mar 28, 2023
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

Successfully merging this pull request may close these issues.

3 participants