wasmerio / winterjs

Winter is coming... ❄️
https://winterjs.org/
MIT License
3.04k stars 53 forks source link

Build Error on MacOS #49

Closed Eveeifyeve closed 4 months ago

Eveeifyeve commented 8 months ago

System Info

Log

cargo install --git https://github.com/wasmerio/winterjs winterjs
    Updating git repository `https://github.com/wasmerio/winterjs`
  Installing winterjs v0.4.3 (https://github.com/wasmerio/winterjs#2af3bfa1)
    Updating git repository `https://github.com/wasix-org/h2.git`
    Updating git repository `https://github.com/wasix-org/hyper`
    Updating git repository `https://github.com/wasix-org/hyper-rustls.git`
    Updating git repository `https://github.com/wasix-org/libc.git`
    Updating git repository `https://github.com/wasix-org/mio.git`
    Updating git repository `https://github.com/wasix-org/rustls.git`
    Updating git repository `https://github.com/wasix-org/socket2.git`
    Updating git repository `https://github.com/wasix-org/tokio.git`
    Updating crates.io index
    Updating git repository `https://github.com/wasmerio/spiderfire.git`
    Updating git repository `https://github.com/wasmerio/mozjs.git`
    Updating git repository `https://github.com/wasix-org/static-web-server`
    Updating git repository `https://github.com/wasix-org/rustls-native-certs.git`
    Updating git repository `https://github.com/wasix-org/tokio-rustls.git`
    Updating git repository `https://github.com/wasix-org/ring.git`
    Updating git repository `https://github.com/wasix-org/sct.git`
    Updating git repository `https://github.com/wasix-org/webpki.git`
    Updating git repository `https://github.com/wasix-org/libc.git`
    Updating git repository `https://github.com/wasix-org/signal-hook.git`
    Updating git repository `https://github.com/wasix-org/webpki-roots.git`
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.152 (https://github.com/wasix-org/libc.git?branch=v0.2.152#26f165f1)
   Compiling cfg-if v1.0.0
   Compiling version_check v0.9.4
   Compiling autocfg v1.1.0
   Compiling serde v1.0.197
   Compiling cc v1.0.90
   Compiling pin-project-lite v0.2.13
   Compiling memchr v2.7.1
   Compiling itoa v1.0.10
   Compiling regex-syntax v0.8.2
   Compiling once_cell v1.19.0
   Compiling aho-corasick v1.1.2
   Compiling lazy_static v1.4.0
   Compiling tracing-core v0.1.32
   Compiling smallvec v1.13.1
   Compiling typenum v1.17.0
   Compiling num-traits v0.2.18
   Compiling regex-automata v0.4.6
   Compiling generic-array v0.14.7
   Compiling futures-core v0.3.30
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.6.0
   Compiling regex v1.10.3
   Compiling percent-encoding v2.3.1
   Compiling rand_core v0.6.4
   Compiling fnv v1.0.7
   Compiling siphasher v0.3.11
   Compiling phf_shared v0.11.2
   Compiling rand v0.8.5
   Compiling form_urlencoded v1.2.1
   Compiling unicode-normalization v0.1.23
   Compiling unicode-width v0.1.11
   Compiling unicode-bidi v0.3.15
   Compiling serde_json v1.0.114
   Compiling idna v0.5.0
   Compiling phf_generator v0.11.2
   Compiling ryu v1.0.17
   Compiling subtle v2.5.0
   Compiling hashbrown v0.14.3
   Compiling either v1.10.0
   Compiling quote v1.0.35
   Compiling syn v2.0.52
   Compiling url v2.5.0
   Compiling Inflector v0.11.4
   Compiling slab v0.4.9
   Compiling getrandom v0.2.12
   Compiling num_cpus v1.16.0
   Compiling uuid v1.7.0
   Compiling futures-sink v0.3.30
   Compiling glob v0.3.1
   Compiling anyhow v1.0.81
   Compiling num-bigint v0.4.4
   Compiling clang-sys v1.7.0
   Compiling unicode-id v0.3.4
   Compiling arc-swap v0.4.8
   Compiling new_debug_unreachable v1.0.4
   Compiling equivalent v1.0.1
   Compiling data-encoding v2.5.0
   Compiling rustix v0.38.31
   Compiling if_chain v1.0.2
   Compiling rustc-hash v1.1.0
   Compiling bitflags v2.4.2
   Compiling signal-hook-registry v1.1.1 (https://github.com/wasix-org/signal-hook.git?branch=registry-v1.1.1#3de7855b)
   Compiling errno v0.3.8
   Compiling indexmap v2.2.5
   Compiling num-integer v0.1.46
   Compiling futures-channel v0.3.30
   Compiling socket2 v0.5.5 (https://github.com/wasix-org/socket2.git?branch=v0.5.5#87e78d44)
   Compiling mio v0.8.9 (https://github.com/wasix-org/mio.git?branch=v0.8.9#f55de7d1)
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling lock_api v0.4.11
   Compiling pin-utils v0.1.0
   Compiling parking_lot_core v0.9.9
   Compiling futures-task v0.3.30
   Compiling futures-io v0.3.30
   Compiling scoped-tls v1.0.1
   Compiling minimal-lexical v0.2.1
   Compiling thiserror v1.0.58
   Compiling nom v7.1.3
   Compiling better_scoped_tls v0.1.1
   Compiling libloading v0.8.3
   Compiling swc_macros_common v0.3.9
   Compiling digest v0.10.7
   Compiling cpufeatures v0.2.12
   Compiling atty v0.2.14
   Compiling unicase v2.7.0
   Compiling home v0.5.9
   Compiling log v0.4.21
   Compiling termcolor v1.4.1
   Compiling scopeguard v1.2.0
   Compiling bindgen v0.68.1
   Compiling rustversion v1.0.14
   Compiling which v4.4.2
   Compiling cexpr v0.6.0
   Compiling ring v0.17.7 (https://github.com/wasix-org/ring.git?branch=0.17.7#be27e9a6)
   Compiling core-foundation-sys v0.8.6
   Compiling pkg-config v0.3.30
   Compiling shlex v1.3.0
   Compiling serde_derive v1.0.197
   Compiling tracing-attributes v0.1.27
   Compiling phf_macros v0.11.2
   Compiling swc_visit_macros v0.5.11
   Compiling phf v0.11.2
   Compiling hstr v0.2.7
   Compiling tracing v0.1.40
   Compiling futures-macro v0.3.30
   Compiling tokio-macros v2.2.0 (https://github.com/wasix-org/tokio.git?branch=wasix-1.35.1#833de725)
   Compiling swc_eq_ignore_macros v0.1.3
   Compiling swc_visit v0.5.10
   Compiling futures-util v0.3.30
   Compiling from_variant v0.1.7
   Compiling ast_node v0.9.6
   Compiling is-macro v0.3.5
   Compiling string_enum v0.4.2
   Compiling thiserror-impl v1.0.58
   Compiling vcpkg v0.2.15
   Compiling peeking_take_while v0.1.2
   Compiling lazycell v1.3.0
   Compiling libz-sys v1.1.15
   Compiling psm v0.1.21
   Compiling bytes v1.5.0
   Compiling debugid v0.8.0
   Compiling swc_atoms v0.6.5
   Compiling base64 v0.21.7
   Compiling same-file v1.0.6
   Compiling tokio v1.35.1 (https://github.com/wasix-org/tokio.git?branch=wasix-1.35.1#833de725)
   Compiling http v0.2.12
   Compiling sourcemap v6.4.1
   Compiling swc_common v0.33.19
   Compiling encoding_c_mem v0.2.6
   Compiling encoding_c v0.9.8
   Compiling spin v0.9.8
   Compiling walkdir v2.5.0
   Compiling stacker v0.1.15
   Compiling smartstring v1.0.1
   Compiling ahash v0.8.11
   Compiling camino v1.1.6
   Compiling semver v1.0.22
   Compiling swc_ecma_ast v0.112.5
   Compiling unicode-segmentation v1.11.0
   Compiling httparse v1.8.0
   Compiling untrusted v0.9.0
   Compiling mozjs_sys v0.68.2 (https://github.com/wasmerio/mozjs.git?branch=wasi-gecko#91349dc0)
   Compiling encoding_rs v0.8.33
   Compiling typed-arena v2.0.2
   Compiling mime v0.3.17
   Compiling syn v1.0.109
   Compiling bitflags v1.3.2
   Compiling zerocopy v0.7.32
   Compiling static_assertions v1.1.0
   Compiling swc_ecma_visit v0.98.6
   Compiling mime_guess v2.0.4
   Compiling tokio-util v0.7.10 (https://github.com/wasix-org/tokio.git?branch=wasix-1.35.1#833de725)
error: failed to run custom build command for `mozjs_sys v0.68.2 (https://github.com/wasmerio/mozjs.git?branch=wasi-gecko#91349dc0)`

Caused by:
  process didn't exit successfully: `/var/folders/kz/yrcq8n4n6_v14nj1006m7r940000gn/T/cargo-install132gyE/release/build/mozjs_sys-6e1e5710c5169c96/build-script-build` (exit status: 101)
  --- stdout
  cargo:outdir=/var/folders/kz/yrcq8n4n6_v14nj1006m7r940000gn/T/cargo-install132gyE/release/build/mozjs_sys-e2942f4e27260e91/out/build
  [[ '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure -ot '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure.in ]] && touch '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure || true
  [[ '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/old-configure -ot '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/old-configure.in ]] && touch '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/old-configure || true
  ! [[ '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure.in -ot '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure ]] && touch '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure || true
  ! [[ '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/old-configure.in -ot '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/old-configure ]] && touch '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/old-configure || true
  if [[ '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure -nt config.status ]] ; then \
      CC="cc" CFLAGS="" \
      CPP="cc -E" CPPFLAGS="-I/Users/eveeify/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_c_mem-0.2.6/include " \
      CXX="c++" CXXFLAGS="-stdlib=libc++" \
      AS="" AR="ar" \
      '/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys'/mozjs/js/src/configure --disable-jemalloc --disable-js-shell --disable-tests --disable-export-js --disable-shared-js --build-backends=RecursiveMake --enable-js-streams || (cat config.log && exit 1) ; \
    fi

  --- stderr
  Traceback (most recent call last):
    File "/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys/mozjs/js/src/../../configure.py", line 35, in <module>
      from mozbuild.configure import TRACE, ConfigureSandbox
    File "/Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys/mozjs/python/mozbuild/mozbuild/configure/__init__.py", line 18, in <module>
      from six.moves import builtins as __builtin__
  ModuleNotFoundError: No module named 'six.moves'
  cat: config.log: No such file or directory
  make: *** [maybe-configure] Error 1
  thread 'main' panicked at /Users/eveeify/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/91349dc/mozjs-sys/build.rs:272:5:
  assertion failed: result.success()
  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 `winterjs v0.4.3 (https://github.com/wasmerio/winterjs#2af3bfa1)`, intermediate artifacts can be found at `/var/folders/kz/yrcq8n4n6_v14nj1006m7r940000gn/T/cargo-install132gyE`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Stead08 commented 8 months ago

Could you tell me your Python version? I encountered the same error on macOS, but it was resolved after changing the global Python version to 3.11.8 using pyenv and then installing six.

Here is my spec:

Hardware:

    Hardware Overview:

      Model Name: MacBook Air
      Model Identifier: Mac14,2
      Model Number: Z160001CJJ/A
      Chip: Apple M2
      Total Number of Cores: 8 (4 performance and 4 efficiency)
      Memory: 16 GB
      System Firmware Version: 10151.81.1
      OS Loader Version: 10151.81.1
psimk commented 8 months ago

I upgraded to the latest Python version (3.12.2, after first encountering the problem on 3.11.7) and I am still getting this same build error. six is installed on my machine via brew.


Seems like an issue with wasmerio/mozjs, which was fixed in the upstream repo - https://github.com/servo/mozjs/pull/426.

Arshia001 commented 7 months ago

Thanks for reporting this!

@psimk the PR you linked mentions fixing the build on rust 1.73, which is odd since we've been using rustc 1.73 (and later 1.76) throughout most of the project's lifetime. I'll investigate the issue.

Eveeifyeve commented 7 months ago

Yeah it's was something to do with rust i looked at the error log

Eveeifyeve commented 7 months ago

I upgraded to the latest Python version (3.12.2, after first encountering the problem on 3.11.7) and I am still getting this same build error. six is installed on my machine via brew.


Seems like an issue with wasmerio/mozjs, which was fixed in the upstream repo - https://github.com/servo/mozjs/pull/426.

Yeah it the error was on python 3.12.2