LiveSplitOne icon indicating copy to clipboard operation
LiveSplitOne copied to clipboard

Trying to build Livesplit one

Open pryganss opened this issue 3 years ago • 2 comments

When I try to run the command "npm run build:core" i get these errors

error[E0463]: can't find crate for `core`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `std`
  |
  = note: the `wasm32-unknown-unknown` target may not be installed
  = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`

error: build failed
child_process.js:674
    throw err;
    ^

Error: Command failed: cargo build -p cdylib --features wasm-web --target wasm32-unknown-unknown --release
    at checkExecSyncError (child_process.js:635:11)
    at execSync (child_process.js:671:15)
    at Object.<anonymous> (/home/ryan/Downloads/LiveSplitOne/buildCore.js:12:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  status: 101,
  signal: null,
  output: [ null, null, null ],
  pid: 176230,
  stdout: null,
  stderr: null
}

to try and fix the first error I ran rustup target add wasm32-unknown-unknown again but I get this message

info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date

pryganss avatar Jun 06 '22 11:06 pryganss

That almost sounds like rust is installed via your system package manager and rustup then installed a separate rust installation.

CryZe avatar Jun 06 '22 11:06 CryZe

Also getting a simmelar issue has to do with the lack of rustup on debian. my system rustup target add wasm32-unknown-unknown and probably some more stuff fails if you dont install it and if you do youl end up with a broken rust install and you come across isues like Pryganss did obviusly i dont know what system hes running, just thought i shuld shed some light on it

note i managed to install liveSplitOne without rustup by doing the following sudo apt install rustc curl build-essential gcc make librust-wasm-bindgen-dev libstd-rust-dev-wasm32 export PATH="$PATH:$HOME/.cargo/bin" npm install npm run build:core

i reccomend rewriting the build instrucitons to avoid confusion in future. somthing like requires libstd-rust-dev-wasm32 can be installed with rustup target add wasm32-unknown-unknown or your package manager

sudo apt install libstd-rust-dev-wasm32 ##debian

if cargo is not in your path you may have to export it or better yet add it in $HOME/.bashrc export PATH="$PATH:$HOME/.cargo/bin" ##export for duration of current terminal session

i added the script i made to install liveSplitOne, its very simple, discplaimer i made this file for me any opinions within ware meant for my future self only, change extension from .txt to .sh to use as script liveSplitOne.txt

John-Ivar-Flatmo avatar Jun 09 '22 14:06 John-Ivar-Flatmo

I'll close this as there's nothing we can do from our side. Usually installing via rustup is the best option.

CryZe avatar Apr 28 '24 08:04 CryZe