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

v3.1.3-rc.2 compilation requirements / fix error[E0562]: impl Trait only allowed in function #2691

Closed
ThomasBlock opened this issue Sep 22, 2024 · 2 comments

Comments

@ThomasBlock
Copy link

compilation documentation is poor. i will document here how to do it for each version.

this worked for last versions:

go version
nvm -v
npm -v
yarn -v
rustup -V 
forge --version

go version go1.22.6 linux/amd64
0.39.3
10.7.0
1.22.22
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.73.0 (cc66ad468 2023-10-03)`
forge 0.2.0 (fa0e0c2 2024-08-22T00:19:42.723244048Z)

git checkout v3.1.3-rc.2
nvm use 18.20
make build 

but now we see this:

   Compiling wasmer v4.2.8 (/root/nitro/arbitrator/tools/wasmer/lib/api)
   Compiling prover v0.1.0 (/root/nitro/arbitrator/prover)
   Compiling caller-env v0.1.0 (/root/nitro/arbitrator/caller-env)
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return types
   --> prover/src/machine.rs:350:53
    |
350 |     fn compose(self, other: impl ImportResolver) -> impl ImportResolver {
    |                                                     ^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return types
   --> prover/src/machine.rs:364:44
    |
364 |     fn condition(self, condition: bool) -> impl ImportResolver {
    |                                            ^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information

For more information about this error, try `rustc --explain E0562`.
error: could not compile `prover` (lib) due to 2 previous errors
make: *** [Makefile:328: target/lib/libstylus.a] Error 101

how to fix:

rustup install nightly
rustup default nightly

rustup -V 
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.83.0-nightly (1d68e6dd1 2024-09-21)`
@anegg0
Copy link
Contributor

anegg0 commented Oct 10, 2024

Duly noted, @ThomasBlock. Thanks much for bringing this to our attention. I will update the docs shortly.

@anegg0 anegg0 closed this as completed Oct 10, 2024
@anegg0 anegg0 reopened this Oct 11, 2024
@joshuacolvin0
Copy link
Member

Documentation has been updated

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