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

m1 mac/arm docker environment setup #146

Open
TyceHerrman opened this issue Jul 20, 2022 · 3 comments
Open

m1 mac/arm docker environment setup #146

TyceHerrman opened this issue Jul 20, 2022 · 3 comments

Comments

@TyceHerrman
Copy link

While using the docker-compose up environment setup, I receive the following warning (not sure if it's relevant) and error on my m1 mac:


=> ERROR [rust-builder 22/31] RUN wasm-pack build  --release --scope maticoapp

#0 384.1 warning: be sure to add `/root/.cache/.wasm-pack/.wasm-bindgen-cargo-install-0.2.81/bin` to your PATH to be able to run the installed binaries
#0 384.2 Error: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target!
#0 384.2 To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
------
failed to solve: executor failed running [/bin/sh -c wasm-pack build  --release --scope maticoapp]: exit code: 1

This seems to be related to this issue with wasm-pack: rustwasm/wasm-pack#913.

It looks like it was addressed in wasm-pack v0.10.2: https://github.com/rustwasm/wasm-pack/releases/tag/v0.10.2

I'm not able to definitively determine which version of wasm-pack Matico is using, but it looks like in the Dockerfile that it's pulling the latest version from the wasm-pack github repo (I could be misinterpreting that though). If that's the case, not sure why this error would occur.

@TyceHerrman
Copy link
Author

TyceHerrman commented Jul 20, 2022

Tried disabling wasm-opt as suggested in the original error message, but was unsuccessful (don't really know how to use Cargo.toml). First tried adding wasm-opt = false, then tried adding
[package.metadata.wasm-pack.profile.release] wasm-opt = false

to Cargo.toml in my local repo cloned from Matico repo (the second Cargo.toml edit based on https://rustwasm.github.io/docs/wasm-pack/cargo-toml-configuration.html).

Both attempts to no avail - same error for the first attempt, and the second attempt produced the following:

`=> ERROR [rust-builder 20/31] RUN cargo build --release

[rust-builder 20/31] RUN cargo build --release:
#0 0.215 error: failed to parse manifest at /app/Cargo.toml
#0 0.215
#0 0.215 Caused by:
#0 0.215 missing field name for key package


failed to solve: executor failed running [/bin/sh -c cargo build --release]: exit code: 101
`

@stuartlynn
Copy link
Collaborator

Hey @TyceHerrman Thanks for the bug report. I unfortunately don't have an M1 mac to reproduce this but @nofurtherinformation does. He is away on holiday for a little bit but when he gets back I can ask him to take a look at this.

We are revamping the way we do builds this week. There is a good chance the tweaks will fix this problem. Will ping you when it's merged to give it a go.

@TyceHerrman
Copy link
Author

TyceHerrman commented Jul 27, 2022

Tried this again today and am now getting the same issue as #148. Found this https://stackoverflow.com/questions/72061535/getting-this-error-message-while-installing-solana-error-failed-to-run-custom, which after completing the steps described, allowed me to run first step of individual components (cd matico_spec; cargo build; wasm-pack build --scope maticoapp), which had been failing previous to following the steps linked above. Still failed at (cd matico_charts; yarn build) - see #151.

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