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

Miscellaneous problems when trying to build winter #94

Open
AlexIII opened this issue Oct 9, 2024 · 0 comments
Open

Miscellaneous problems when trying to build winter #94

AlexIII opened this issue Oct 9, 2024 · 0 comments

Comments

@AlexIII
Copy link

AlexIII commented Oct 9, 2024

First of all, thanks for the awesome work you are doing! 🎉
Submitting here a feedback on the build process.

There are a few problems I've encountered when trying to build from sources with git clone https://github.com/wasmerio/winterjs && cd winterjs && cargo build

I used rust docker image for the build.

  1. Problems with libc version.

Full error when running cargo update on the repo (commit cf3c9ae)

error: failed to select a version for the requirement libc = "=0.2.139"
candidate versions found which didn't match: 0.2.151
location searched: Git repository https://github.com/wasix-org/libc.git
required by package rustls-native-certs v0.6.3 (https://github.com/wasix-org/rustls-native-certs.git?branch=main#678174c9)
    ... which satisfies git dependency rustls-native-certs of package hyper-rustls v0.25.0 (https://github.com/wasix-org/hyper-rustls.git?branch=v0.25.0#bb883300)
    ... which satisfies git dependency hyper-rustls of package winterjs v1.1.5 (/home/app/winterjs)

The problem is rustls-native-certs from hyper-rust "doesn't get it" that it needs to use libc v0.2.152. I had to clone both rustls-native-certs and hyper-rust locally, change libc version in rustls-native-certs to v0.2.152, point local hyper-rust to use local rustls-native-certs and finally point winter to use local hyper-rust. That fixed the issue.

  1. No human readable error when the system does not have node (npx) installed. This is what I got:
error: failed to run custom build command for winterjs v1.1.5 (/home/app/winterjs)

Caused by:
  process didn't exit successfully: /tmp/cargo-debug-build/debug/build/winterjs-1d5e47ce251dff41/build-script-build (exit status: 101)
  --- stderr
  thread 'main' panicked at build.rs:17:14:
  called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
  1. Missing npm i before attempting to run npx tsc. I suggest either to add this as the build instruction for people to run npm i manually or add it to the build process. Human readable error also missing for this, it just says
assertion failed: Command::new("npx").arg("tsc").current_dir(dir).output().unwrap().status.success()
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

1 participant