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

FreeBSD 10 support in snapshots for stage0. #12324

Closed
lyuts opened this issue Feb 16, 2014 · 11 comments
Closed

FreeBSD 10 support in snapshots for stage0. #12324

lyuts opened this issue Feb 16, 2014 · 11 comments

Comments

@lyuts
Copy link
Contributor

lyuts commented Feb 16, 2014

Rust's stage0 snapshots, rustc in particular, are linked against libkvm.so.5. This version is available in FreeBSD 9 but seems to had a version bump in FreeBSD 10 to libkvm.so.6. As a result, there is currently no way to build rust for FreeBSD10. Is there any means to build a snapshot for FreeBSD10 and distribute it along with other snapshots?

@alexcrichton
Copy link
Member

libkvm is brought in by libuv, so if we switch the compiler over to libnative by default we wouldn't have a dependency on libkvm for the snapshots.

@lyuts
Copy link
Contributor Author

lyuts commented Mar 13, 2014

Since you have more knowledge on the code base, what are the components that will need to be modified in order to migrate the compiler from libuv to libnative? I suppose it should be librustuv, compiler-rt. Did i miss anything?

@alexcrichton
Copy link
Member

The compiler has switched to libnative, so this is just waiting on a snapshot now.

While not fixed yet, we'll get new snapshots soon-ish, so I'm going to close this (the underlying issue has been fixed).

@lyuts
Copy link
Contributor Author

lyuts commented Mar 21, 2014

I've noticed you released a new version of stage0. Do you know if the latest snapshot is able to build rust's 0.9 release? I'm seeing some error during compilation, and unsure if I missed something in build configuration or maybe this is an expected outcome.

/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:66:14: 66:24 error: `extern mod` is obsolete, use `extern crate` instead to refer to external crates.
/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:66 #[cfg(test)] extern mod rustuv = "rustuv";
                                                                     ^~~~~~~~~~
/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:67:14: 67:24 error: `extern mod` is obsolete, use `extern crate` instead to refer to external crates.
/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:67 #[cfg(test)] extern mod native = "native";
                                                                     ^~~~~~~~~~
/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:68:14: 68:24 error: `extern mod` is obsolete, use `extern crate` instead to refer to external crates.
/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:68 #[cfg(test)] extern mod green = "green";
                                                                     ^~~~~~~~~~
/usr/ports/lang/rust/work/rust-0.9/src/libstd/lib.rs:71:14: 71:24 error: `extern mod` is obsolete, use `extern crate` instead to refer to external crates.

Thanks.

@alexcrichton
Copy link
Member

We don't maintain old releases of rust (currently), so you'll have to update to master if you want to pick up the update.

@lyuts
Copy link
Contributor Author

lyuts commented Mar 21, 2014

Got it, thanks for clarifying.

@lyuts
Copy link
Contributor Author

lyuts commented Mar 24, 2014

Apologies, for reusing this issues again, just no sure if the problem worth of a separate one.

Latest snapshot works ok on FreeBSD. However, it looks like something is missing the libm library.

oxidize: x86_64-unknown-freebsd/stage1/lib/rustlib/x86_64-unknown-freebsd/lib/libstd x86_64-unknown-freebsd/stage1/bin/../lib/librustc-6ccece0c-0.10-pre.so: Undefined symbol "sinh"

I wasn't able to quickly find the root cause, so I'm using a workaround now for building rust, which involves setting LD_PRELOAD=/usr/lib/libm.so. This way, I have rust built and at least I can more or less use it.
Can you give me a hint on what should I fix in order to solve this linker errors?

Thanks.

@alexcrichton
Copy link
Member

That's odd, I've never seen that before! Could you check libm.so to make sure that the sinh symbol is indeed defined in the library? I'd also recommend running ldd over the binary located at x86_64-unknown-freebsd/stage1/bin/rustc to see what it's dynamic dependencies are to make sure that at least one of them points to libm

@lyuts
Copy link
Contributor Author

lyuts commented Mar 25, 2014

sinh is in libm:

> nm -D /usr/lib/libm.so | grep -e "\<sinh" 000000000000f810 T sinh 000000000000f6e0 T sinhf 000000000000f1a0 W sinhl

Ran ldd over rustc and its dependency libs (including libs used by libs), libm is not there, neither base system libs nor rust's distribution libs link against libm.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 25, 2014
Apparently we had forgotten to do this for freebsd, causing possible problems
on FreeBSD 10. The discussion in rust-lang#12324 has some more details about how it's
missing.
@alexcrichton
Copy link
Member

Oh whoops! Looks like we forgot to specify that we should link to libm! I believe that #13134 should fix your problem.

bors added a commit that referenced this issue Mar 26, 2014
Apparently we had forgotten to do this for freebsd, causing possible problems
on FreeBSD 10. The discussion in #12324 has some more details about how it's
missing.
@lyuts
Copy link
Contributor Author

lyuts commented Mar 30, 2014

Thanks.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
…-schievink

feat: Revert the "Add attribute" assist

Reverts rust-lang/rust-analyzer#12296, as the added indirection and "assist noise" (the assist has to trigger inside the body of an item to match what the "Add `#[derive]`" does) makes this not really pull its weight over just using attribute completions.

Keeps the changes to "Add getter". `#[must_use]` can be applied using the attribute completions.
flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 26, 2024
…=y21

Extend `unnecessary_to_owned` to handle `Borrow` trait in map types

Fixes rust-lang/rust-clippy#8088.

Alternative to rust-lang#12315.

r? `@y21`

changelog: Extend `unnecessary_to_owned` to handle `Borrow` trait in map types
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

No branches or pull requests

2 participants