wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

wasm-pack 0.10.3 does not compile under Windows

Open zhouyu00 opened this issue 2 years ago • 1 comments

🐛 Bug description

run cargo install wasm-pack --no-default-features compiles and installs most current version of wasm-pack

🤔 Expected Behavior

run cargo install wasm-pack --no-default-features compiles and installs most current version of wasm-pack

👟 Steps to reproduce

  • run cargo install wasm-pack --no-default-features
  • error
The following warnings were emitted during compilation:

warning: gcc: fatal error: no input files
warning: compilation terminated.

error: failed to run custom build command for `curl-sys v0.4.55+curl-7.83.1`

Caused by:
  process didn't exit successfully: `C:\Users\yuriy\AppData\Local\Temp\cargo-installAIxLnc\release\build\curl-sys-dd5344d5b2a426e4\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-changed=curl
  cargo:root=C:\Users\yuriy\AppData\Local\Temp\cargo-installAIxLnc\release\build\curl-sys-1d1064e8f4df8295\out
  cargo:include=C:\Users\yuriy\AppData\Local\Temp\cargo-installAIxLnc\release\build\curl-sys-1d1064e8f4df8295\out\include
  cargo:static=1
  cargo:rustc-cfg=libcurl_vendored
  cargo:rustc-cfg=link_libz
  TARGET = Some("x86_64-pc-windows-gnu")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-pc-windows-gnu")
  CC_x86_64-pc-windows-gnu = None
  CC_x86_64_pc_windows_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-pc-windows-gnu = None
  CFLAGS_x86_64_pc_windows_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "curl/lib" "-I" "curl/include" "-I" "C:\\Users\\yuriy\\AppData\\Local\\Temp\\cargo-installAIxLnc\\release\\build\\libz-sys-71582a7c8a9e22af\\out/include" "-DBUILDING_LIBCURL" "-DCURL_DISABLE_DICT" "-DCURL_DISABLE_GOPHER" "-DCURL_DISABLE_IMAP" "-DCURL_DISABLE_LDAP" "-DCURL_DISABLE_LDAPS" "-DCURL_DISABLE_POP3" "-DCURL_DISABLE_RTSP" "-DCURL_DISABLE_SMB" "-DCURL_DISABLE_SMTP" "-DCURL_DISABLE_TELNET" "-DCURL_DISABLE_TFTP" "-DCURL_STATICLIB" "-DENABLE_IPV6" "-DHAVE_ASSERT_H" "-DOS=\"unknown\"" "-DHAVE_ZLIB_H" "-DHAVE_LONGLONG" "-DHAVE_LIBZ" "-DHAVE_BOOL_T" "-DHAVE_STDBOOL_H" "-DHAVE_GETADDRINFO" "-DHAVE_GETPEERNAME" "-DHAVE_GETSOCKNAME" "-DCURL_DISABLE_NTLM" "-DCURL_DISABLE_FTP" "-DUSE_WINDOWS_SSPI" "-DUSE_SCHANNEL" "-DWIN32" "-DUSE_THREADS_WIN32" "-DHAVE_IOCTLSOCKET_FIONBIO" "-DUSE_WINSOCK" "-o" "C:\\Users\yuriy\\AppData\\Local\\Temp\\cargo-installAIxLnc\\release\\build\\curl-sys-1d1064e8f4df8295\\out\\build\\curl/lib/asyn-thread.o" "-c" "curl/lib/asyn-thread.c"
  cargo:warning=gcc: fatal error: no input files
  cargo:warning=compilation terminated.
  exit code: 1

  --- stderr
  fatal: not a git repository (or any of the parent directories): .git


  error occurred: Command "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "curl/lib" "-I" "curl/include" "-I" "C:\\Users\\yuriy\\AppData\\Local\\Temp\\cargo-installAIxLnc\\release\\build\\libz-sys-71582a7c8a9e22af\\out/include" "-DBUILDING_LIBCURL" "-DCURL_DISABLE_DICT" "-DCURL_DISABLE_GOPHER" "-DCURL_DISABLE_IMAP" "-DCURL_DISABLE_LDAP" "-DCURL_DISABLE_LDAPS" "-DCURL_DISABLE_POP3" "-DCURL_DISABLE_RTSP" "-DCURL_DISABLE_SMB" "-DCURL_DISABLE_SMTP" "-DCURL_DISABLE_TELNET" "-DCURL_DISABLE_TFTP" "-DCURL_STATICLIB" "-DENABLE_IPV6" "-DHAVE_ASSERT_H" "-DOS=\"unknown\"" "-DHAVE_ZLIB_H" "-DHAVE_LONGLONG" "-DHAVE_LIBZ" "-DHAVE_BOOL_T" "-DHAVE_STDBOOL_H" "-DHAVE_GETADDRINFO" "-DHAVE_GETPEERNAME" "-DHAVE_GETSOCKNAME" "-DCURL_DISABLE_NTLM" "-DCURL_DISABLE_FTP" "-DUSE_WINDOWS_SSPI" "-DUSE_SCHANNEL" "-DWIN32" "-DUSE_THREADS_WIN32" "-DHAVE_IOCTLSOCKET_FIONBIO" "-DUSE_WINSOCK" "-o" "C:\\Users\yuriy\\AppData\\Local\\Temp\\cargo-installAIxLnc\\release\\build\\curl-sys-1d1064e8f4df8295\\out\\build\\curl/lib/asyn-thread.o" "-c" "curl/lib/asyn-thread.c" with args "gcc.exe" did not execute successfully (status code exit code: 1).


warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.10.3`, intermediate artifacts can be found at `C:\Users\yuriy\AppData\Local\Temp\cargo-installAIxLnc`

🌍 Your environment

Include the relevant details of your environment. wasm-pack version: v0.10.3 rustc version: rustc 1.62.0 (a8314ef7d 2022-06-27)

zhouyu00 avatar Jul 20 '22 06:07 zhouyu00

Just hit my head on this. However I've been using wasm-pack from npm not cargo. It broke in either v0.10.2 or v0.10.3

Workaround

Install 0.10.1

However only 0.10.3 works on M1 macs. So there isn't one package version that supports all platforms currently

Tristyn avatar Sep 21 '22 09:09 Tristyn

Please try out v0.12.0 from one of the following ways:

  • https://github.com/rustwasm/wasm-pack/releases/tag/v0.12.0
  • https://crates.io/crates/wasm-pack/0.12.0
  • https://www.npmjs.com/package/wasm-pack/v/0.12.0

drager avatar Jun 17 '23 13:06 drager