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

rust-1.77_beta bootstrap is broken with: error[E0658]: c".." literals are experimental in library/std/src/sys/pal/unix/ #120810

Closed
stefson opened this issue Feb 8, 2024 · 3 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@stefson
Copy link

stefson commented Feb 8, 2024

hello everyone,

I got this error when I bootstrap the current rust-beta branch:

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/mod.rs:74:35
   |
74 |         thread::Thread::set_name(&c"main");
   |                                   ^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/mod.rs:126:27
    |
126 |                 if open64(c"/dev/null".as_ptr().cast(), libc::O_RDWR, 0) == -1 {
    |                           ^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/mod.rs:156:31
    |
156 |                     if open64(c"/dev/null".as_ptr().cast(), libc::O_RDWR, 0) == -1 {
    |                               ^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:249:53
    |
249 |             let process_info_sel = sel_registerName(c"processInfo".as_ptr());
    |                                                     ^^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:250:50
    |
250 |             let arguments_sel = sel_registerName(c"arguments".as_ptr());
    |                                                  ^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:251:46
    |
251 |             let count_sel = sel_registerName(c"count".as_ptr());
    |                                              ^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:252:56
    |
252 |             let object_at_index_sel = sel_registerName(c"objectAtIndex:".as_ptr());
    |                                                        ^^^^^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:253:51
    |
253 |             let utf8string_sel = sel_registerName(c"UTF8String".as_ptr());
    |                                                   ^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/args.rs:255:39
    |
255 |             let klass = objc_getClass(c"NSProcessInfo".as_ptr());
    |                                       ^^^^^^^^^^^^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
    --> library/std/src/sys/pal/unix/fs.rs:1143:17
     |
1143 |                 c"".as_ptr() as *const c_char,
     |                 ^^^
     |
     = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
     = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/process/process_common.rs:27:33
   |
27 |         const DEV_NULL: &CStr = c"null:";
   |                                 ^^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/process/process_common.rs:29:33
   |
29 |         const DEV_NULL: &CStr = c"/null";
   |                                 ^^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
  --> library/std/src/sys/pal/unix/process/process_common.rs:31:33
   |
31 |         const DEV_NULL: &CStr = c"/dev/null";
   |                                 ^^^^^^^^^^^^
   |
   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

error[E0658]: `c".."` literals are experimental
   --> library/std/src/sys/pal/unix/thread.rs:168:17
    |
168 |                 c"%s".as_ptr(),
    |                 ^^^^^
    |
    = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
    = help: add `#![feature(c_str_literals)]` to the crate attributes to enable

For more information about this error, try `rustc --explain E0658`.

Did not run successfully: exit status: 1

There was a lot of pushing and reverting changesets relevant to the c literals stabilization, I tried to get an overview of what backport might be missing here, but I failed and am at a loss.

I am on linux x86_64, with musl as my libc, I doubt the later is causing the issues.

@stefson stefson added the C-bug Category: This is a bug. label Feb 8, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 8, 2024
@Noratrieb
Copy link
Member

What are you using as your bootstrap compiler? We only support using the previous release.

@ehuss
Copy link
Contributor

ehuss commented Feb 9, 2024

I think I understand what is going on. If you try to bootstrap 1.77 from 1.76, it will fail. We were intending to have c-string literals stabilized in 1.76, but that got reverted. However, the revert did not include the appropriate parts of #119211. I can probably put something together to fix it.

@ehuss
Copy link
Contributor

ehuss commented Feb 9, 2024

Posted #120821 with a fix.

@saethlin saethlin added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Feb 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 12, 2024
…k-Simulacrum

[Beta 1.77] Fix bootstrapping from 1.76

Due to the timing of the revert for stabilization of c_str_literal (rust-lang#119528 which reverted in 1.76) and trait_upcasting (rust-lang#120269 which reverted in 1.76), which happened after rust-lang#119211 (Bump stage0 to 1.76 beta), this resulted in some of the feature attributes not being restored which are needed to be able to bootstrap from 1.76. This restores those features.

This also includes a stage0 bump to the just released stable. This is necessary because stage0 was currently pointing at an old beta which did not contain the reverts.

Fixes rust-lang#120810
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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants