You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encounter the following error when trying to compile and run our WebAssembly (WASM) project. The issue originates from the libc crate (version 0.2.166), which appears to use extern static variables unsafely, causing multiple E0133 errors.
error[E0133]: use of extern static is unsafe and requires unsafe function or block
--> /external/target/cargo_home/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.166/src/wasi/mod.rs:388:59
|
388 | pub static CLOCK_MONOTONIC: clockid_t = clockid_t(core::ptr::addr_of!(_CLOCK_MONOTONIC));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of extern static
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
= note: this error originates in the macro `core::ptr::addr_of` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0133]: use of extern static is unsafe and requires unsafe function or block
--> /external/target/cargo_home/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.166/src/wasi/mod.rs:391:23
|
391 | clockid_t(core::ptr::addr_of!(_CLOCK_PROCESS_CPUTIME_ID));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of extern static
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
= note: this error originates in the macro `core::ptr::addr_of` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0133]: use of extern static is unsafe and requires unsafe function or block
--> /external/target/cargo_home/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.166/src/wasi/mod.rs:393:58
|
393 | pub static CLOCK_REALTIME: clockid_t = clockid_t(core::ptr::addr_of!(_CLOCK_REALTIME));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of extern static
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
= note: this error originates in the macro `core::ptr::addr_of` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0133]: use of extern static is unsafe and requires unsafe function or block
--> /external/target/cargo_home/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.166/src/wasi/mod.rs:396:23
|
396 | clockid_t(core::ptr::addr_of!(_CLOCK_THREAD_CPUTIME_ID));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of extern static
|
= note: extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
= note: this error originates in the macro `core::ptr::addr_of` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0133`.
error: could not compile `libc` (lib) due to 4 previous errors
The text was updated successfully, but these errors were encountered:
This was fixed by #4157, the issue shows up when using a version of Rust older than the current stable which is the first version to make these operations safe.
We encounter the following error when trying to compile and run our WebAssembly (WASM) project. The issue originates from the
libc
crate (version0.2.166
), which appears to use extern static variables unsafely, causing multiple E0133 errors.Our GitHub Action run: https://github.com/headwindsim/aircraft/actions/runs/12041087308/job/33572254499
The text was updated successfully, but these errors were encountered: