Stream: git-wasmtime

Topic: wasmtime / issue #3968 Build error related with `thread_l...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2022 at 04:47):

kimdora opened issue #3968:

Hello, when I tried to build wasmtime from source code, I got a following error.

error[E0658]: use of unstable library feature 'thread_local_const_init'
   --> crates/runtime/src/traphandlers.rs:390:9
    |
390 |         thread_local!(static PTR: Cell<(Ptr, bool)> = const { Cell::new((ptr::null(), false)) });
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #84223 <https://github.com/rust-lang/rust/issues/84223> for more information
    = note: this error originates in the macro `$crate::__thread_local_inner` (in Nightly builds, run with -Z macro-backtrace for more info)

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

How can I fix it?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2022 at 05:02):

kimdora commented on issue #3968:

So I built wasmtime from current master branch 5d8dd64 so that I got the error.
But when I change the version to release-0.35.1 which is the latest version now, I successfully build wasmtime.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2022 at 05:02):

kimdora closed issue #3968:

Hello, when I tried to build wasmtime from source code, I got a following error.

error[E0658]: use of unstable library feature 'thread_local_const_init'
   --> crates/runtime/src/traphandlers.rs:390:9
    |
390 |         thread_local!(static PTR: Cell<(Ptr, bool)> = const { Cell::new((ptr::null(), false)) });
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #84223 <https://github.com/rust-lang/rust/issues/84223> for more information
    = note: this error originates in the macro `$crate::__thread_local_inner` (in Nightly builds, run with -Z macro-backtrace for more info)

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

How can I fix it?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2022 at 06:01):

cfallin commented on issue #3968:

@kimdora It's likely that your Rust compiler is a bit out-of-date. We test Wasmtime with the latest stable Rust; you should be able to build our main branch if you update (if you installed via rustup) with:

$ rustup update

If that doesn't work, let us know what rustc --version says and we can try to help further!

view this post on Zulip Wasmtime GitHub notifications bot (Mar 30 2022 at 06:47):

kimdora commented on issue #3968:

@cfallin , thank you for your comment! After I updated rustup that you said, I can build successfully on master branch!
Thank you!


Last updated: Dec 23 2024 at 12:05 UTC