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

New point release for Apple Silicon Homebrew #959

Closed
richiksc opened this issue Jan 12, 2021 · 3 comments
Closed

New point release for Apple Silicon Homebrew #959

richiksc opened this issue Jan 12, 2021 · 3 comments

Comments

@richiksc
Copy link

wasm-pack 0.9.1 fails to build with --locked flag on Homebrew macOS arm64 CI

Homebrew is trying to port all its Rust-based formulae to Apple Silicon (Homebrew/homebrew-core#68301). Some formulae failed to build with Rust 1.49, including wasm-pack. This is usually due to outdated dependencies.

🐛 Bug description

When compiling wasm-pack 0.9.1 with cargo install --locked --path . on an Apple Silicon-based Mac CI server with Rust v1.49 stable fails to build with this error:

The following warnings were emitted during compilation:

warning: error: unknown target triple 'unknown-apple-macosx11.0.0', please use -triple or -arch

error: failed to run custom build command for `backtrace-sys v0.1.32`

The above error is usally due to an outdated version of the cc crate defined in Cargo.lock. The latest master branch builds succesfully with --locked natively on a local Apple Silicon MacBook.

When are you planning to cut a new release of wasm-pack, since Homebrew can only build tagged versions? Is it possible to release a new patch version with an updated Cargo.lock?

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.9.1
rustc version: 1.49

@richiksc
Copy link
Author

richiksc commented Jan 12, 2021

On both 0.9.1 and master built with a patched lockfile from #960, running wasm-pack new results in this error:

% wasm-pack new hello-wasm
[INFO]: ⬇️  Installing cargo-generate...
error: the `--vers` provided, `latest`, is not a valid semver version: cannot parse 'latest' as a semver

Error: Installing cargo-generate with cargo
Caused by: failed to execute `cargo install`: exited with exit code: 101
  full command: "cargo" "install" "--force" "cargo-generate" "--version" "latest" "--root" "/Users/richiksc/Library/Caches/.wasm-pack/.cargo-generate-cargo-install-latest"

@paytonrules
Copy link

paytonrules commented Feb 4, 2021

I have the same issue wasm-pack: 0.9.1.

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.49.0 (e1884a8e3 2020-12-29)

Above was updated after I tried updating Rust

Is there a workaround?

@paytonrules
Copy link

Just to help other people who might get here via the quickstart guide.

The "workaround" is to just install cargo generate manually and use it to generate the app, skipping the new command until it's fixed.

cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name hello-wasm

I don't think that the wasm-pack new commands problem has anything to do with Apple Silicon, but this is the first issue I found googling the error when I tried it so I wanted to leave the note here.

@drager drager closed this as completed Jun 17, 2023
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

3 participants