wasm-pack: wasm-pack 0.10.0 does not compile under Windows

๐Ÿ› Bug description

Running cargo install wasm-pack fails (error message below).

๐Ÿค” Expected Behavior

  • run cargo install wasm-pack compiles and installs most current version of wasm-pack

๐Ÿ‘Ÿ Steps to reproduce

  • run cargo install wasm-pack after version was released 0.10.0
  • error message
error: failed to run custom build command for `openssl-sys v0.9.65`

Caused by:
  process didn't exit successfully: `C:\Users\Martin\AppData\Local\Temp\cargo-install88TXra\release\build\openssl-sys-b0dbea86e2e521ff\build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  openssl-src: Enable the assembly language routines in building OpenSSL.
  running "perl" "./Configure" "--prefix=C:\\Users\\Martin\\AppData\\Local\\Temp\\cargo-install88TXra\\release\\build\\openssl-sys-ac72fb4e4ec29da6\\out\\openssl-build\\install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "VC-WIN64A"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "Das System kann die angegebene Datei nicht finden." }', C:\Users\Martin\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-src-111.15.0+1.1.1k\src\lib.rs:469:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.10.0`, intermediate artifacts can be found at `C:\Users\Martin\AppData\Local\Temp\cargo-install88TXra`

Caused by:
  build failed

๐ŸŒ Your environment

Include the relevant details of your environment. wasm-pack version: 0.10.0 rustc version: rustc 1.53.0 (53cb7b09b 2021-06-17) (stable)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 17
  • Comments: 16 (3 by maintainers)

Most upvoted comments

I compiled/installed it successfully by disabling the optional vendored openssl feature (not sure why is it necessary?)

cargo install wasm-pack --no-default-features

also similar issue #1029

0.9.1 works well cargo install wasm-pack --vers 0.9.1

@drager do you think it would be possible to release a 0.9.2 release which fixes the axios/binary-install vulnerability but excludes all the other features that made it into 0.10.0 (including, presumably, the bug which prevents 0.10.0 from working on Windows)? Even though we were victorious in regaining control over publishing updates to the project to fix the security vulnerability in 0.9.1, Iโ€™ve sadly had to keep my node.js package.json file set to ~0.9.1 since it doesnโ€™t work on Windows.

I realize you probably donโ€™t have time to debug and add features, but do you think you would be able to do a 0.9.2 release which fixes only the axios/binary-install dependency vulnerability and doesnโ€™t integrate any of the other changes? Thank you!

Yeah, I will try to make a 0.9.2 with just that fix. Will also make a 0.10.1 later on as well.

Installing perl with choco install strawberryperl helped.

Note: I have Visual Studio 2017 & 2019 including C/C++ build tools and also LLVM (incl. clang) 12.0.0 installed.

I donโ€™t know which tool-chain was used by openssl-sys.

I confirm that installing perl solves the issue. I installed perl from https://strawberryperl.com/

While debugging a wasm test suite, I recently installed OpenSSL through vcpkg, set OPENSSL_DIR to an appropriate location, and compiled wasm-pack commit-ish 126dd749bbf498b83cfb00de53455831a2eb35a6 from source on Windows 10. All tests, except the ones that depended on nodejs, which I do not have installed, worked fine.

I believe the recent 10.1 release probably also works fine.

Well, issues could be closed from my point of view.

That perl is required to build wasm-pack on Windows, stems from the openssl-sys package. I donโ€™t know what wasm-pack could do about it.