semarie / build-rust

Script helper for building rustc and cargo from source on OpenBSD (without rustup)
59 stars 15 forks source link

Rust nightly build fails due to unsafe libc call #18

Closed rkowalewski closed 3 years ago

rkowalewski commented 3 years ago

Hello,

you recent fixed an issue due to an unsafe libc call in rust-lang/libc#2035.

Can you tell me how to use the libc master branch in the Rust nightly build? The current bootstrap config seems to use tag 0.2.79. I am kind of new to Rust, so I am not very familiar with its toolchain.

semarie commented 3 years ago

it isn't possible simply.

the PR is only a first step. the full correction needs a libc release (asked in rust-lang/libc#2038) and update rust repository to use the newer libc version.

rkowalewski commented 3 years ago

Thank you for the quick response. Then I just need to wait.

semarie commented 3 years ago

Now that a libc version has been released with the fix, I made PR https://github.com/rust-lang/rust/pull/81464 for use it in rustc.

rkowalewski commented 3 years ago

Thank you for taking care on this.

rkowalewski commented 3 years ago

While the original issue described here is resolved, there is a follow-up one.

I submitted it to rust-lang/rust#81787. Is this issue specific to the way how we build rust on OpenBSD? Or is it possible to skip some tools like rustfmt when building rustc? If this issue is not specific to our toolchain on OpenBSD, please just close the issue here.

See my attached build.log

semarie commented 3 years ago

it is, currently, an expected failure. See the rust-toolstate page: it mentions rustfmt and rls are currently failing in official builds.

to customize the build, see the config.toml file inside the build directory, specially the build.tools directive. You might need to patch build.sh to avoid it overrides your customization.

semarie commented 3 years ago

oh, and please to not reopen this issue if your problem isn't related to this issue. create a new issue for a new problem.

rkowalewski commented 3 years ago

I initially thought about opening a new issue but first wanted to know if it is the right place here. Sorry for the circumstances.