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

frameworks not supported error #125534

Closed
mrfelton opened this issue May 25, 2024 · 6 comments
Closed

frameworks not supported error #125534

mrfelton opened this issue May 25, 2024 · 6 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@mrfelton
Copy link

mrfelton commented May 25, 2024

Hi, I'm getting a frameworks not supported error when trying to compile some rust code down to WASM on an Apple M3 device.

Code

Code can be found here: https://github.com/TheBlueMatt/dnssec-prover/tree/master/wasmpack

Meta

rustc --version --verbose:

❯ rustc --version --verbose
rustc 1.78.0 (9b00956e5 2024-04-29)
binary: rustc
commit-hash: 9b00956e56009bab2aa15d7bff10916599e3d6d6
commit-date: 2024-04-29
host: aarch64-apple-darwin
release: 1.78.0
LLVM version: 18.1.2

My rust environment is provided through Nix, by devenv.

See https://github.com/cachix/devenv/blob/main/src/modules/languages/rust.nix

My config:

    rust = let 
      rustVersion = pkgs.rust-bin.stable.latest.default;
    in {
      enable = true;
      toolchain.rustc = (rustVersion.override {
        extensions = [ "rust-src" ];
        targets = [ "wasm32-unknown-unknown" "wasm32-wasi" ];
      });
    };

CFLAGS

❯ echo $CFLAGS
-iframework /nix/store/rafzm902j4ak8acmad0rrw7jxkdfxc5w-devenv-profile/Library/Frameworks

Frameworks

❯ ls /nix/store/rafzm902j4ak8acmad0rrw7jxkdfxc5w-devenv-profile/Library/Frameworks
CoreFoundation.framework  CoreServices.framework  Foundation.framework	Security.framework  SystemConfiguration.framework

Error output

❯ wasm-pack build --target web --release
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
   Compiling proc-macro2 v1.0.83
   Compiling unicode-ident v1.0.12
   Compiling wasm-bindgen-shared v0.2.92
   Compiling log v0.4.21
   Compiling once_cell v1.19.0
   Compiling bumpalo v3.16.0
   Compiling wasm-bindgen v0.2.92
   Compiling arrayvec v0.7.4
   Compiling cfg-if v1.0.0
   Compiling hex_lit v0.1.1
   Compiling wee_alloc v0.4.5
   Compiling memory_units v0.4.0
   Compiling cfg-if v0.1.10
   Compiling hex-conservative v0.2.1
   Compiling bitcoin_hashes v0.14.0
   Compiling quote v1.0.36
   Compiling syn v2.0.66
   Compiling dnssec-prover v0.5.4 (/Users/tom/workspace/dnssec-prover)
   Compiling wasm-bindgen-backend v0.2.92
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling wasm-bindgen-macro v0.2.92
   Compiling js-sys v0.3.69
   Compiling getrandom v0.2.15
   Compiling dnssec-prover-wasm v0.1.0 (/Users/tom/workspace/dnssec-prover/wasmpack)
thread 'rustc' panicked at compiler/rustc_codegen_ssa/src/back/linker.rs:1273:9:
frameworks not supported
stack backtrace:
   0:        0x10566aedc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h01b2beffade888b2
   1:        0x1056aee44 - core::fmt::write::hbadb443a71b75f23
   2:        0x105661530 - std::io::Write::write_fmt::hc09d7755e3ead5f0
   3:        0x10566ad34 - std::sys_common::backtrace::print::h28349e5c25acbac7
   4:        0x10566d640 - std::panicking::default_hook::{{closure}}::hd24b6196784d991e
   5:        0x10566d324 - std::panicking::default_hook::hfcec80a2720c8c73
   6:        0x10e96d30c - <alloc[ccf9bc335c0c6a37]::boxed::Box<rustc_driver_impl[e71547a46cb79a13]::install_ice_hook::{closure#0}> as core[f61c09f58d048be3]::ops::function::Fn<(&dyn for<'a, 'b> core[f61c09f58d048be3]::ops::function::Fn<(&'a core[f61c09f58d048be3]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[f61c09f58d048be3]::marker::Send + core[f61c09f58d048be3]::marker::Sync, &core[f61c09f58d048be3]::panic::panic_info::PanicInfo)>>::call
   7:        0x10566e074 - std::panicking::rust_panic_with_hook::h84760468187ddc85
   8:        0x10566da0c - std::panicking::begin_panic_handler::{{closure}}::he666a5eb600a7203
   9:        0x10566b360 - std::sys_common::backtrace::__rust_end_short_backtrace::h592f44d2bf9f843f
  10:        0x10566d7b0 - _rust_begin_unwind
  11:        0x1056c807c - core::panicking::panic_fmt::h98bbf7bdf4994454
  12:        0x10e75205c - <rustc_codegen_ssa[b47a64558c8c60af]::back::linker::WasmLd as rustc_codegen_ssa[b47a64558c8c60af]::back::linker::Linker>::framework_path
  13:        0x10e76818c - rustc_codegen_ssa[b47a64558c8c60af]::back::link::linker_with_args
  14:        0x10e7613d0 - rustc_codegen_ssa[b47a64558c8c60af]::back::link::link_natively
  15:        0x10e75d4dc - rustc_codegen_ssa[b47a64558c8c60af]::back::link::link_binary
  16:        0x10e5f42e4 - <rustc_codegen_llvm[57f5bdad79469239]::LlvmCodegenBackend as rustc_codegen_ssa[b47a64558c8c60af]::traits::backend::CodegenBackend>::link
  17:        0x10f0a7944 - <rustc_interface[2352a4bab4f6367d]::queries::Linker>::link
  18:        0x10e91bf6c - rustc_span[8def9120bc3fdd6f]::create_session_globals_then::<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_interface[2352a4bab4f6367d]::interface::run_compiler<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}>::{closure#0}>
  19:        0x10e92d82c - std[73ec08d302f978e7]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[2352a4bab4f6367d]::util::run_in_thread_with_globals<rustc_interface[2352a4bab4f6367d]::interface::run_compiler<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}>::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>
  20:        0x10e924230 - <<std[73ec08d302f978e7]::thread::Builder>::spawn_unchecked_<rustc_interface[2352a4bab4f6367d]::util::run_in_thread_with_globals<rustc_interface[2352a4bab4f6367d]::interface::run_compiler<core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>, rustc_driver_impl[e71547a46cb79a13]::run_compiler::{closure#0}>::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f61c09f58d048be3]::result::Result<(), rustc_span[8def9120bc3fdd6f]::ErrorGuaranteed>>::{closure#1} as core[f61c09f58d048be3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  21:        0x1056765a8 - std::sys::pal::unix::thread::Thread::new::thread_start::h9266fbbdd0c3d8be
  22:        0x197f9ef94 - __pthread_joiner_wake

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.78.0 (9b00956e5 2024-04-29) running on aarch64-apple-darwin

note: compiler flags: --crate-type cdylib --crate-type rlib -C opt-level=3 -C codegen-units=1

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `dnssec-prover-wasm` (lib)
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "/Users/tom/workspace/dnssec-prover/wasmpack" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
Backtrace

❯ RUST_BACKTRACE=1 cargo build
   Compiling proc-macro2 v1.0.83
   Compiling unicode-ident v1.0.12
   Compiling wasm-bindgen-shared v0.2.92
   Compiling once_cell v1.19.0
   Compiling libc v0.2.155
   Compiling bumpalo v3.16.0
   Compiling log v0.4.21
   Compiling arrayvec v0.7.4
   Compiling hex_lit v0.1.1
   Compiling wee_alloc v0.4.5
   Compiling cfg-if v1.0.0
   Compiling wasm-bindgen v0.2.92
   Compiling memory_units v0.4.0
   Compiling cfg-if v0.1.10
   Compiling hex-conservative v0.2.1
   Compiling bitcoin_hashes v0.14.0
   Compiling dnssec-prover v0.5.4 (/Users/tom/workspace/dnssec-prover)
   Compiling getrandom v0.2.15
   Compiling quote v1.0.36
   Compiling syn v2.0.66
   Compiling wasm-bindgen-backend v0.2.92
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling wasm-bindgen-macro v0.2.92
error[E0432]: unresolved imports `crate::convert::VectorFromWasmAbi`, `crate::convert::VectorIntoWasmAbi`
  --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:13:22
   |
13 | use crate::convert::{VectorFromWasmAbi, VectorIntoWasmAbi};
   |                      ^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^ no `VectorIntoWasmAbi` in `convert`
   |                      |
   |                      no `VectorFromWasmAbi` in `convert`
   |
help: a similar name exists in the module
   |
13 | use crate::convert::{RefFromWasmAbi, VectorIntoWasmAbi};
   |                      ~~~~~~~~~~~~~~
help: a similar name exists in the module
   |
13 | use crate::convert::{VectorFromWasmAbi, OptionIntoWasmAbi};
   |                                         ~~~~~~~~~~~~~~~~~

error[E0433]: failed to resolve: use of undeclared crate or module `std`
    --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/lib.rs:1793:35
     |
1793 |                 crate::throw_str(&std::format!("{:?}", e));
     |                                   ^^^ use of undeclared crate or module `std`

error[E0433]: failed to resolve: use of undeclared crate or module `std`
    --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/lib.rs:1326:23
     |
1326 |             let msg = std::format!(
     |                       ^^^ use of undeclared crate or module `std`

error[E0433]: failed to resolve: could not find `externref` in the crate root
    --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/lib.rs:1679:16
     |
1679 |         crate::externref::link_intrinsics();
     |                ^^^^^^^^^ could not find `externref` in the crate root
     |
note: found an item that was configured out
    --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/lib.rs:79:9
     |
79   |     mod externref;
     |         ^^^^^^^^^
     = note: the item is gated behind the `std` feature

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:190:27
    |
190 |               type Anchor = Box<[$t]>;
    |                             ^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:193:54
    |
193 |               unsafe fn ref_from_abi(js: WasmSlice) -> Box<[$t]> {
    |                                                        ^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:194:18
    |
194 |                   <Box<[$t]>>::from_abi(js)
    |                    ^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `WasmMutSlice` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:199:24
    |
199 |               type Abi = WasmMutSlice;
    |                          ^^^^^^^^^^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `MutSlice` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:200:27
    |
200 |               type Anchor = MutSlice<$t>;
    |                             ^^^^^^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `WasmMutSlice` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:203:44
    |
203 |               unsafe fn ref_mut_from_abi(js: WasmMutSlice) -> MutSlice<$t> {
    |                                              ^^^^^^^^^^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `MutSlice` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:203:61
    |
203 |               unsafe fn ref_mut_from_abi(js: WasmMutSlice) -> MutSlice<$t> {
    |                                                               ^^^^^^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:204:33
    |
204 |                   let contents = <Box<[$t]>>::from_abi(js.slice);
    |                                   ^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared type `JsValue`
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:205:26
    |
205 |                   let js = JsValue::from_abi(js.idx);
    |                            ^^^^^^^ use of undeclared type `JsValue`
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
    |
4   + use crate::JsValue;
    |

error[E0422]: cannot find struct, variant or union type `MutSlice` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:206:17
    |
206 |                   MutSlice { contents, js }
    |                   ^^^^^^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:212:27
    |
212 |               type Anchor = Box<[$t]>;
    |                             ^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:215:59
    |
215 |               unsafe fn long_ref_from_abi(js: WasmSlice) -> Box<[$t]> {
    |                                                             ^^^ not found in this scope
...
222 | / vectors! {
223 | |     u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
224 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vectors` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:355:19
    |
355 |     type Anchor = Box<str>;
    |                   ^^^ not found in this scope

error[E0433]: failed to resolve: use of undeclared crate or module `mem`
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:359:9
    |
359 |         mem::transmute::<Box<[u8]>, Box<str>>(<Box<[u8]>>::from_abi(js))
    |         ^^^ use of undeclared crate or module `mem`
    |
help: consider importing one of these items
    |
4   + use core::mem;
    |
4   + use crate::mem;
    |

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:359:26
    |
359 |         mem::transmute::<Box<[u8]>, Box<str>>(<Box<[u8]>>::from_abi(js))
    |                          ^^^ not found in this scope

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:359:37
    |
359 |         mem::transmute::<Box<[u8]>, Box<str>>(<Box<[u8]>>::from_abi(js))
    |                                     ^^^ not found in this scope

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:359:48
    |
359 |         mem::transmute::<Box<[u8]>, Box<str>>(<Box<[u8]>>::from_abi(js))
    |                                                ^^^ not found in this scope

error[E0412]: cannot find type `Box` in this scope
   --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/convert/slices.rs:365:19
    |
365 |     type Anchor = Box<str>;
    |                   ^^^ not found in this scope

error[E0433]: failed to resolve: use of undeclared crate or module `std`
    --> /Users/tom/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-0.2.92/src/lib.rs:1789:13
     |
1789 |     impl<E: std::fmt::Debug> Main for &mut MainWrapper<Result<(), E>> {
     |             ^^^ use of undeclared crate or module `std`
     |
help: consider importing one of these items
     |
1407 +     use core::fmt;
     |
1407 +     use crate::fmt;
     |
help: if you import `fmt`, refer to it directly
     |
1789 -     impl<E: std::fmt::Debug> Main for &mut MainWrapper<Result<(), E>> {
1789 +     impl<E: fmt::Debug> Main for &mut MainWrapper<Result<(), E>> {
     |

Some errors have detailed explanations: E0412, E0422, E0432, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `wasm-bindgen` (lib) due to 23 previous errors

@mrfelton mrfelton added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 25, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 25, 2024
@workingjubilee
Copy link
Contributor

https://github.com/cachix/devenv/blob/800f19d1b999f89464fd8e0226abf4b3b444b0fa/src/modules/languages/rust.nix#L124

Your nix configuration is passing a framework to a wasm build job.

The behavior of the wasm linker is to panic because it doesn't have anything useful it can do when told to link a framework.

@workingjubilee workingjubilee added the A-diagnostics Area: Messages for errors, warnings, and lints label May 25, 2024
@workingjubilee
Copy link
Contributor

This behavior should be fixed to emit proper diagnostics, obviously, instead of an ICE. Diagnostics, possibly, that say what I just said.

@workingjubilee workingjubilee added the A-linkage Area: linking into static, shared libraries and binaries label May 25, 2024
@mrfelton
Copy link
Author

Removing those flags gets things working!

RUSTFLAGS="" wasm-pack build --target web --release
...
[INFO]: ✨   Done in 40.55s
[INFO]: 📦   Your wasm pkg is ready to publish at /Users/tom/workspace/dnssec-prover/wasmpack/pkg.

Thank you!

@workingjubilee workingjubilee removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 25, 2024
@workingjubilee
Copy link
Contributor

Excellent, thank you for confirming that!

@workingjubilee workingjubilee added the O-macos Operating system: macOS label May 25, 2024
@workingjubilee
Copy link
Contributor

It's tempting to say we should just ignore the framework path for the wasm linker? But in my experience, even very senior software developers sometimes expect wasm to have some... truly magical powers. So I think explicitly rejecting it with an improved diagnostic is better. This helps more in the event of

  • a programmer seriously expected that to work
  • ...wasm somehow does grow magic powers and we can accept that?!?!

If people complain we can simply go to the ignoring path.

@workingjubilee
Copy link
Contributor

I found out this is actually a duplicate of #122333

Neat!

@workingjubilee workingjubilee closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants