Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: failed to run custom build command for mozjs_sys v0.68.2 (cargo install) #96

Open
jerrygreen opened this issue Nov 9, 2024 · 2 comments

Comments

@jerrygreen
Copy link

It pretty much looks like I have some incompatible versions to building all of this. I've built almost entire project, it only stucks on 413/422 of all steps. Most of them are successfully completed. I have solved a lot of errors myself to get this far. But this one is hard.

When installing winterjs natively, I stuck into this error during cargo install:

   Compiling mozjs_sys v0.68.2 (https://github.com/wasmerio/mozjs.git?branch=wasi-gecko#7f760f85)
error: failed to run custom build command for `mozjs_sys v0.68.2 (https://github.com/wasmerio/mozjs.git?branch=wasi-gecko#7f760f85)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/tmp/cargo-installKaSe9z/release/build/mozjs_sys-4bc6b709ed99beab/build-script-build` (exit status: 101)
stdout
  --- stdout
  cargo:outdir=/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build
  [[ '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure -ot '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure.in ]] && touch '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure || true
  [[ '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/old-configure -ot '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/old-configure.in ]] && touch '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/old-configure || true
  ! [[ '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure.in -ot '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure ]] && touch '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure || true
  ! [[ '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/old-configure.in -ot '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/old-configure ]] && touch '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/old-configure || true
  if [[ '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure -nt config.status ]] ; then \
    CC="gcc" CFLAGS="" \
    CPP="cc -E" CPPFLAGS="-I/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_c_mem-0.2.6/include " \
    CXX="g++" CXXFLAGS="" \
    AS="as" AR="ar" \
    '/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys'/mozjs/js/src/configure --disable-jemalloc --disable-js-shell --disable-tests --disable-export-js --disable-shared-js --with-intl-api --build-backends=RecursiveMake --enable-js-streams || (cat config.log && exit 1) ; \
  fi
  make -f Makefile
  make[1]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[2]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make recurse_pre-export
  make[3]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  /root/.mozbuild/srcdirs/mozjs-5b6c9179ce6c/_virtualenvs/build/bin/python -m mozbuild.action.process_install_manifest --track install_dist_include.track dist/include _build_manifests/install/dist_include
  Elapsed: 0.02s; From dist/include: Kept 547 existing; Added/updated 0; Removed 0 files and 0 directories.
  BUILDTASK {"argv": ["/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/python/mozbuild/mozbuild/action/process_install_manifest.py", "--track", "install_dist_include.track", "dist/include", "_build_manifests/install/dist_include"], "start": 279490.377479066, "end": 279490.395654683, "context": null}
  /root/.mozbuild/srcdirs/mozjs-5b6c9179ce6c/_virtualenvs/build/bin/python -m mozbuild.action.process_install_manifest --track install_dist_public.track dist/public _build_manifests/install/dist_public
  Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
  BUILDTASK {"argv": ["/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/python/mozbuild/mozbuild/action/process_install_manifest.py", "--track", "install_dist_public.track", "dist/public", "_build_manifests/install/dist_public"], "start": 279490.50158224, "end": 279490.502651148, "context": null}
  /root/.mozbuild/srcdirs/mozjs-5b6c9179ce6c/_virtualenvs/build/bin/python -m mozbuild.action.process_install_manifest --track install_dist_private.track dist/private _build_manifests/install/dist_private
  Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
  BUILDTASK {"argv": ["/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/python/mozbuild/mozbuild/action/process_install_manifest.py", "--track", "install_dist_private.track", "dist/private", "_build_manifests/install/dist_private"], "start": 279490.608008409, "end": 279490.6090755, "context": null}
  /root/.mozbuild/srcdirs/mozjs-5b6c9179ce6c/_virtualenvs/build/bin/python -m mozbuild.action.process_install_manifest --track install__tests.track _tests _build_manifests/install/_tests
  Elapsed: 0.04s; From _tests: Kept 467 existing; Added/updated 0; Removed 0 files and 0 directories.
  BUILDTASK {"argv": ["/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/python/mozbuild/mozbuild/action/process_install_manifest.py", "--track", "install__tests.track", "_tests", "_build_manifests/install/_tests"], "start": 279490.714248203, "end": 279490.750554734, "context": null}
  /root/.mozbuild/srcdirs/mozjs-5b6c9179ce6c/_virtualenvs/build/bin/python -m mozbuild.action.process_install_manifest --track install_dist_bin.track dist/bin _build_manifests/install/dist_bin
  Elapsed: 0.00s; From dist/bin: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
  BUILDTASK {"argv": ["/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/python/mozbuild/mozbuild/action/process_install_manifest.py", "--track", "install_dist_bin.track", "dist/bin", "_build_manifests/install/dist_bin"], "start": 279490.855620499, "end": 279490.856807373, "context": null}
  make[3]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[2]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[2]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make recurse_export
  make[3]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config'
  make[4]: Nothing to be done for 'host-objects'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config'
  make[4]: Nothing to be done for 'host'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/build/rust/mozbuild'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/build/rust/mozbuild'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/build'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/build'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/frontend'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/frontend'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/gc'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/gc'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/jit'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/jit'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/wasm'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/js/src/wasm'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/memory/build'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/memory/build'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/mozglue/baseprofiler'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/mozglue/baseprofiler'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/mozglue/build'
  make[4]: Nothing to be done for 'export'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/mozglue/build'
  make[3]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[2]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[2]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make recurse_compile
  make[3]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config/external/icu/common'
  make[4]: Nothing to be done for 'target-objects'.
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config/external/icu/common'
  make[4]: Entering directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config/external/icu/data'
  config/external/icu/data/icu_data.o
  /nix/store/r6k305g2rn0qqkvdxfvzqg7mhh7rw679-gcc-wrapper-13.2.0/bin/as -o icu_data.o -DNDEBUG=1 -DTRIMMED=1 '-DICU_DATA_FILE="/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/external/icu/data/icudt73l.dat"' -DICU_DATA_SYMBOL=icudt73_dat -fPIC -Wa,--noexecstack -gdwarf-4 -I/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/external/icu/data  -c /root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/external/icu/data/icu_data.S
  make[4]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build/config/external/icu/data'
  make[3]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[2]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'
  make[1]: Leaving directory '/tmp/cargo-installKaSe9z/release/build/mozjs_sys-0d3d56042ed8d14f/out/build'

stderr:

  --- stderr
  make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  make[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  /nix/store/r6k305g2rn0qqkvdxfvzqg7mhh7rw679-gcc-wrapper-13.2.0/bin/as: invalid option -- 'N'
  make[4]: *** [/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/rules.mk:656: icu_data.o] Error 1
  make[3]: *** [/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/recurse.mk:72: config/external/icu/data/target-objects] Error 2
  make[2]: *** [/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/recurse.mk:34: compile] Error 2
  make[1]: *** [/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/mozjs/config/rules.mk:361: default] Error 2
  make: *** [/root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/makefile.cargo:147: all] Error 2
  thread 'main' panicked at /root/.cargo/git/checkouts/mozjs-e1c76167ba7c548f/7f760f8/mozjs-sys/build.rs:272:5:
  assertion failed: result.success()
  stack backtrace:
     0: rust_begin_unwind
     1: core::panicking::panic_fmt
     2: core::panicking::panic
     3: build_script_build::build_jsapi
     4: build_script_build::main
     5: core::ops::function::FnOnce::call_once

What I am finding is this:

But I highly doubt it's real cause worth fixing. Am I using wrong clang version? Or gcc? I use nix by the way.

And also this:

Which is both related to nix and mozilla, but seems to be fixed and I don't see any mozjs in there.

Versions:

gcc --version
gcc (GCC) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

clang --version
clang version 17.0.6
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /run/current-system/sw/bin

make --version
GNU Make 4.4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law

pkg-config --version
0.29.2

Any idea what can it be?

@jerrygreen jerrygreen changed the title error: failed to run custom build command for `mozjs_sys v0.68.2 (cargo install) error: failed to run custom build command for mozjs_sys v0.68.2` (cargo install) Nov 9, 2024
@jerrygreen jerrygreen changed the title error: failed to run custom build command for mozjs_sys v0.68.2` (cargo install) error: failed to run custom build command for mozjs_sys v0.68.2 (cargo install) Nov 9, 2024
@Arshia001
Copy link
Member

I don't see any mozjs in there.

the mozjs-sys dependency exists to compile SpiderMonkey/mozjs for use in WinterJS. That is very much a SpiderMonkey compilation issue.

@jerrygreen
Copy link
Author

To compile spidermonkey? What if then maybe I use precompiled spidermonkey, is that possible when building natively?

How do I tell the process to use existing spidermonkey?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants