BUILD FAILURE: Due to redox-os/rust/srce/libcore/marker.rs ("send" language item deprecated)
Created by: gbutler69
- [ X ] I agree that I have searched opened and closed issues to prevent duplicates.
Description
The file "marker.rs" in libcore of the "redox-os/rust" repo needs to be change due to upstream rust/nightly/master removing "send" as a language item (see https://github.com/rust-lang/rust/commit/7995f879d0c520d162d965db0ebbe403bfa2bfda#diff-268f3645af45ee52080a7d24acb217dd). The change needed is as follows:
gbutler@butler-Leopard-Extreme:~/Redox/redox/rust$ git diff src/libcore/marker.rs
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index e47b99ed55..b92043670b 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -39,7 +39,7 @@ use hash::Hasher;
/// [arc]: ../../std/sync/struct.Arc.html
/// [ub]: ../../reference/behavior-considered-undefined.html
#[stable(feature = "rust1", since = "1.0.0")]
-#[lang = "send"]
+//#[lang = "send"]
#[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
pub unsafe trait Send {
// empty.
I have confirmed on #rust IRC channel on irc.mozilla.org that it is correct to remove the "#[lang="send"]" attribute from the "Send" trait.
Environment info
- Ubuntu 17.04 (Linux)
-
Redox OS Release:
(Attempting to build from latest Master using the boostrap scripts and instructions for building Redox found here: https://doc.redox-os.org/book/getting_started/preparing_the_build.html)
-
Operating system:
Linux - Ubuntu 17.04
-
uname -a
:
Linux butler-Leopard-Extreme 4.10.0-38-generic #42-Ubuntu SMP Tue Oct 10 13:24:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
-
rustc -V
: -
git rev-parse HEAD
:
rustc 1.23.0-nightly (79cfce3d3 2017-11-12)
Steps to reproduce
1. Follow the instructions, linked above, for how to build Redox on Linux/Ubuntu
2. Receive an error on "libcore/marker.rs" saying that "send" is not a language item
3. Comment out the indicated line in "libcore/marker.rs" and attempt the "make all" again - see that it builds correctly
Behavior
(see above)
- Expected behavior:
(see above)
- Proposed solution:
(see above for solution to the problem that appears confirmed as correct on the #rust IRC channel as shown here in this copy of the IRC convo):
[15:08] <gbutler> Hello, I'm attempting to build the latest "RedoxOS" and I am running into trouble with the rust/redox branch of core libs. It seems like the language item "send" may have been recently deprecated on master/nightly and I am trying to understand what that means to the "rust/redox" branch of things. [15:09] <gbutler> This change seems to remove the "send" language item: https://github.com/rust-lang/rust/commit/7995f879d0c520d162d965db0ebbe403bfa2bfda#diff-268f3645af45ee52080a7d24acb217dd [15:09] <sarnold> gbutler: do you mean "Send" as in "Send" and "Sync" "send"? [15:10] <gbutler> Yes [15:11] <gbutler> in the "rust/redox" branch of libcore/marker.rs we have: [15:11] <gbutler> #[stable(feature = "rust1", since = "1.0.0")] [15:11] <gbutler> #[lang = "send"] [15:11] <gbutler> #[rustc_on_unimplemented = "
{Self}
cannot be sent between threads safely"] [15:11] <gbutler> pub unsafe trait Send { [15:11] <gbutler> // empty. [15:11] <gbutler> } [15:11] <rkruppe> gbutler: Does Redox have a fork of libcore? Do they build it with a standard, unmodified compiler? [15:12] <gbutler> Yes, it appears they have a fork. [15:12] <gbutler> I'm just becoming involved with it. New to rust. New to redox. [15:12] <gbutler> Just trying to understand what all this means. [15:12] <rkruppe> Then to build that fork with compilers that include the above change, the #[lang="send"] line should be removed [15:12] <rkruppe> the cfg_attr is just for bootstrapping which is not relevant if you're using an off the shelf compiler [15:13] <gbutler> Yeah, I commented that out and it was able to build past that; however, should it have added back the #[cfg_attr(stage0, lang = "send")] in its place? [15:14] <gbutler> Right now, Redox is set-up to build using the "nightly" compiler/tools: (i.e. rustup override set nightly) [15:14] <gbutler> Also, it uses "xargo" for cross-compiling to the Redox target from Linux/MacOS/Windows. [15:14] <gbutler> As far as I can tell. [15:14] <rkruppe> gbutler: I already answered re: cfg_attr [15:23] <gbutler> @rkruppe: Thanks. Yes, commenting out the "#[lang="send"]" from libcore/marker.rs did resolve the issue and let it build. I was just trying to confirm that simply commenting that out was the correct thing WRT to the change of having "send" removed as a language item. Thanks for the feedback. Much appreciated.
(see above)