Nix Rust | 703 Members | |
| Rust | 156 Servers |
| Sender | Message | Time |
|---|---|---|
| 9 Apr 2025 | ||
| Our default compilers should have WASM targets I think? | 04:59:58 | |
| At least on unstable | 05:00:01 | |
| Not sure about 24.11 | 05:00:03 | |
In reply to @k900:0upti.meand i'm on master, so it should work... | 11:55:34 | |
| How does it fail? | 11:55:49 | |
In reply to @k900:0upti.mehttps://github.com/paritytech/polkadot-sdk/blob/master/substrate/utils/wasm-builder/src/prerequisites.rs#L228-L250 | 11:56:43 | |
this error is getting triggered via build.rs | 11:56:49 | |
Rust WASM target for toolchain 0rn3apgrjdqrq6zpqsrh5b8dmlxbci42-rustc-1.85.0 is not properly installed; please install it! | 11:56:58 | |
| Maybe the check is wrong? | 12:37:34 | |
| 12:48:36 | |
| it looks like its trying to run the llvm linker for some reason?? | 12:48:47 | |
| I wouldn't call it "check". From linked code it seemingly tries to build their "dummy crate" inside and fails to output anything as a result around here (which I assume may not be expected to work properly inside buildRustPackage):https://github.com/paritytech/polkadot-sdk/blob/65441c8199ba8c9c1fe75ba4d432352109e87d43/substrate/utils/wasm-builder/src/prerequisites.rs#L211 https://github.com/paritytech/polkadot-sdk/blob/65441c8199ba8c9c1fe75ba4d432352109e87d43/substrate/utils/wasm-builder/src/prerequisites.rs#L150-L177 | 12:49:51 | |
| I wouldn't call it "check". From linked code it seemingly tries to build their "dummy crate" inside and fails to output anything as a result around here (which I assume may not be expected to work properly inside buildRustPackage, because it does cargo build with its' own things):https://github.com/paritytech/polkadot-sdk/blob/65441c8199ba8c9c1fe75ba4d432352109e87d43/substrate/utils/wasm-builder/src/prerequisites.rs#L211 https://github.com/paritytech/polkadot-sdk/blob/65441c8199ba8c9c1fe75ba4d432352109e87d43/substrate/utils/wasm-builder/src/prerequisites.rs#L150-L177 | 12:50:36 | |
the other issue that makes things slower, is the inability of buildRustPackage to cache the deps | 12:52:40 | |
| so it takes 20 minutes to reproduce the failure, after every change | 12:52:49 | |
| Honestly I would just try to patch it out to be "noop" (always assume toolchain it tries to check is fine) and see if it is builds. | 12:55:59 | |
| * Honestly I would just try to patch it out to be "noop" (always assume toolchain it tries to "check" is fine) and see if it is builds. | 12:56:22 | |
| * Honestly I would just try to patch it out to be "noop" (always assume toolchain it tries to "check" is fine) and see if it builds. | 12:56:28 | |
In reply to @9hp71n:matrix.orgi already deleted build.rs and then it fails because there was no wasm output | 12:56:46 | |
and patching it to remove the check, i dont think will work, its just going to run cargo on the real wasm project, and then fail the same as dummy-crate | 12:57:15 | |
What is the best way to reference release/target/x86_64-unknown-linux-gnu/release/ in the checkPhase for instance? | 13:27:45 | |
| Is there a shell variable containing this? | 13:27:53 | |
| There is a variable for the system part | 13:39:58 | |
In reply to @k900:0upti.me Cannot compile the WASM runtime: no standard library sources found at /nix/store/0rn3apgrjdqrq6zpqsrh5b8dmlxbci42-rustc-1.85.0/lib/rustlib/src/rust!i gave it an ldd, and now it cant find the standard library | 13:48:05 | |
In reply to @qyliss:fairydust.spaceI ended up using cargoInstallHook.targetSubdirectory | 14:03:35 | |
| https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ra/rav1d/package.nix#L38-L49 | 14:03:37 | |
| 14:09:34 | |
| and yet, the path it gave, does have wasm32!? | 14:09:52 | |
*
| 14:10:03 | |
| ah wait, it wants the SOURCE for wasm32! | 14:11:34 | |