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 while installing CLI: could not compile pathfinder_simd #4

Closed
hcheng826 opened this issue May 5, 2024 · 11 comments
Closed

Error while installing CLI: could not compile pathfinder_simd #4

hcheng826 opened this issue May 5, 2024 · 11 comments
Labels

Comments

@hcheng826
Copy link

getting this error when I tried to run cargo install --path .

...
error[E0425]: cannot find function `simd_or` in this scope
   --> /Users/hungcheng/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_simd-0.5.3/src/arm/mod.rs:831:24
    |
831 |         unsafe { U32x2(simd_or(self.0, other.0)) }
    |                        ^^^^^^^ not found in this scope
Some errors have detailed explanations: E0425, E0432, E0635.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `pathfinder_simd` due to 577 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `halo2-zk-email v0.1.0

my versions is the same as in the README

➜  halo2-zk-email git:(main) rustc --version
rustc 1.68.0-nightly (0468a00ae 2022-12-17)
➜  halo2-zk-email git:(main) cargo --version
cargo 1.68.0-nightly (cc0a32087 2022-12-14)

Anyone has the same problem? Could it be related to this comment in README?
https://github.com/zkemail/halo2-zk-email/blob/main/README.md?plain=1#L17

@hcheng826
Copy link
Author

hcheng826 commented May 5, 2024

found a might-be-related issue here.
zed-industries/zed#7644
but tried this fix as patching the pathfinder_simd in Cargo.toml doesn't work

@hcheng826
Copy link
Author

related issue: servo/pathfinder#558

@hcheng826
Copy link
Author

@Divide-By-0 @SoraSuegami Any chance that you would know about how to go around this issue? Appreciate it!

@Divide-By-0
Copy link
Member

Hey, thanks for pointing it out and filing the issue. We've just pushed a change to main that should allow it to compile, do you mind trying again?

@shreyas-londhe
Copy link
Member

Works for me!

@hcheng826
Copy link
Author

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/hungcheng/.cargo/git/checkouts/ahash-ef438ec1e3d51f58/2153ab9/src/operations.rs:126:24
    |
126 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information
    = help: add `#![feature(stdsimd)]` to the crate attributes to enable

hmmm I'm still getting this error.

➜  cargo --version                                         
cargo 1.68.0-nightly (cc0a32087 2022-12-14)
➜  rustc --version
rustc 1.68.0-nightly (0468a00ae 2022-12-17)
➜  solc --version
solc, the solidity compiler commandline interface
Version: 0.8.25+commit.b61c2a91.Darwin.appleclang
➜  anvil --version
anvil 0.2.0 (24abca6 2024-01-16T00:26:29.218821000Z)

This is my version. Some higher than the README.

But i found a similar issue. Will try it out: tkaitchuck/aHash#195

@hcheng826
Copy link
Author

hcheng826 commented May 30, 2024

According to the related issue I shared above, using M1, M2 device could be the reason. I'm using M1 laptop. @shreyas-londhe may I ask if you are using M1 device?

@hcheng826
Copy link
Author

hcheng826 commented Jun 2, 2024

tkaitchuck/aHash#195 (comment)
according to this reply, it says Rust nightly 1.77 works but 1.78 failed

I tried with Rust nightly 1.77 and got this error

error[E0080]: evaluation of constant value failed
    --> /Users/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/v8-0.68.0/src/isolate.rs:1599:5
     |
1599 |     assert!(size_of::<TypeId>() == size_of::<u64>());
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<TypeId>() == size_of::<u64>()', /Users/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/v8-0.68.0/src/isolate.rs:1599:5
     |
     = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0080`.
error: could not compile `v8` (lib) due to 1 previous error

I found the issue reported here: denoland/rusty_v8#1400
seems that I need to update v8 from 0.68.0 to 0.83.2
I checked the Cargo.lock, the dependency path: v8 -> deno_core -> js-sandbox -> halo2-regex
Is there a way I can change the version of v8 used here 🤔?

@shreyas-londhe
Copy link
Member

shreyas-londhe commented Jun 5, 2024

@hcheng826 Can you try running cargo clean && rm -rf Cargo.lock, and run cargo update. If that doesn't work, can you try re-installing rust all together, I have the same cargo and rustc versions you have. I'm running this on a M3 chip.

@SoraSuegami
Copy link
Contributor

@hcheng826 @shreyas-londhe
Thank you for sharing your compiling outputs.
@hcheng826
I fixed the rust version and some dependencies versions to avoid the compile errors.
As @shreyas-londhe mentioned, could you run cargo clean && rm Cargo.lock && cargo update and compile it again?
I expect your compile failed because the cache left.

@hcheng826
Copy link
Author

@SoraSuegami @shreyas-londhe Thanks for your help! I reset my laptop and it's working now! Appreciate all your help! Let me close this issue.

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

No branches or pull requests

4 participants