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

Miri broken on Solaris #4050

Closed
RalfJung opened this issue Nov 22, 2024 · 1 comment · Fixed by #4052
Closed

Miri broken on Solaris #4050

RalfJung opened this issue Nov 22, 2024 · 1 comment · Fixed by #4052

Comments

@RalfJung
Copy link
Member

Running any program on Solaris fails since some recent rustc change:

error: unsupported operation: can't call foreign function `__sysconf_xpg7` on OS `solaris`
    --> /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:698:14
     |
  LL |     unsafe { libc::sysconf(libc::_SC_PAGESIZE) as usize }
     |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `__sysconf_xpg7` on OS `solaris`
     |
     = help: if this is a basic API commonly used on this target, please report an issue with Miri
     = help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
     = note: BACKTRACE:
     = note: inside `std::sys::pal::unix::os::page_size` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:698:14: 698:47
     = note: inside `std::sys::pal::unix::stack_overflow::imp::init` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/unix/stack_overflow.rs:128:25: 128:40
     = note: inside `std::sys::pal::unix::init` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/unix/mod.rs:57:5: 57:27
     = note: inside `std::rt::init` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:102:9: 102:39
     = note: inside closure at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:172:42: 172:67
     = note: inside `std::panicking::r#try::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, ()>` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40: 557:43
     = note: inside `std::panicking::r#try::<(), {closure@std::rt::lang_start_internal::{closure#0}}>` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19: 520:88
     = note: inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, ()>` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panic.rs:358:14: 358:33
     = note: inside `std::rt::lang_start_internal` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:172:5: 172:70
     = note: inside `std::rt::lang_start::<()>` at /Users/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:194:17: 199:6

Cc @devnexen

@devnexen
Copy link
Contributor

Ok will have a look.

devnexen added a commit to devnexen/miri that referenced this issue Nov 22, 2024
also adding the `_SC_PAGESIZE` alias `_SC_PAGE_SIZE` supported by
Linux, macOS and FreeBSD.

close rust-lang#4050
devnexen added a commit to devnexen/miri that referenced this issue Nov 23, 2024
also adding the `_SC_PAGESIZE` alias `_SC_PAGE_SIZE` supported by
Linux, macOS and FreeBSD.

close rust-lang#4050
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 a pull request may close this issue.

2 participants