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

Does not build #3474

Closed
wjmelements opened this issue Aug 16, 2022 · 11 comments
Closed

Does not build #3474

wjmelements opened this issue Aug 16, 2022 · 11 comments

Comments

@wjmelements
Copy link

Description

Does not build

Version

  • rustc 1.59.0
  • cargo 1.59.0

Present Behaviour

Does not build. Log:

cargo install --path lighthouse --force --locked --features ""
  Installing lighthouse v2.5.1 (/home/lighthouse/lighthouse/lighthouse)
    Updating git repository `https://github.com/paritytech/parity-common`
    Updating git repository `https://github.com/macladson/warp`
    Updating crates.io index
    Updating git repository `https://github.com/sigp/milagro_bls`
    Updating git submodule `https://github.com/sigp/incubator-milagro-crypto-rust`
    Updating git repository `https://github.com/ralexstokes/ethereum-consensus`
error: failed to get `ethereum-consensus` as a dependency of package `execution_layer v0.1.0 (/home/lighthouse/lighthouse/beacon_node/execution_layer)`

Caused by:
  failed to load source for dependency `ethereum-consensus`

Caused by:
  Unable to update https://github.com/ralexstokes/ethereum-consensus#592eb44d

Caused by:
  failed to parse manifest at `/home/lighthouse/.cargo/git/checkouts/ethereum-consensus-930744fc44a7f50d/592eb44/Cargo.toml`

Caused by:
  namespaced features with the `dep:` prefix are only allowed on the nightly channel and requires the `-Z namespaced-features` flag on the command-line
make: *** [Makefile:25: install] Error 101

Expected Behaviour

Should build

@wjmelements
Copy link
Author

I have determined that it does not build with rust 1.59.

Rust 1.59 is newer than lighthouse, and it is the stable version for Ubuntu LTS. There is no reason that lighthouse should require such a bleeding edge rust version.

@pawanjay176
Copy link
Member

Hey @wjmelements , you need to use the latest stable version of rust (1.63.0) for building lighthouse. Using rustup https://lighthouse-book.sigmaprime.io/installation-source.html#dependencies for installation is better imo compared to the OS provided packages as it is easier to update.
The newer versions come with useful improvements and more stabilised standard library apis which is useful for code quality.

@wjmelements
Copy link
Author

you need to use the latest stable version of rust (1.63.0) for building lighthouse.

That is the issue I am reporting here. You should support 1.59. It's not old.

easier to update.

Easier than being automatically updated with everything else? That could only mean that it is updating itself in the background, which would be a huge security issue on a crypto system. It's more likely that you don't have a great package manager (or are bad at using them?) than that this is how it behaves, but I could be wrong.

The newer versions come with useful improvements and more stabilised standard library apis which is useful for code quality.

You cannot call it a standard library API if it breaks every 3 months.

Using rustup https://lighthouse-book.sigmaprime.io/installation-source.html#dependencies for installation is better

You should know better than to point crypto users to instructions that tell them to pipe curl output into a shell.

@michaelsproul
Copy link
Member

michaelsproul commented Aug 16, 2022

You're not doing a very good job of persuading us to change anything by being condescending @wjmelements.

Asking for a lower minimum supported Rust version is a fair enough request but there's no need for you to be rude about it.

The recent MSRV bump was made to support a new dependency written by an external collaborator which was written recently. We'll look into whether we can lower the MSRV on that dep.

@wjmelements
Copy link
Author

Asking for a lower minimum supported Rust version is a fair enough request

Is there a documented minimum version? I only see instructions insisting on the latest version.

@wjmelements
Copy link
Author

ah MSRV is "minimum supported rust version"

@wjmelements
Copy link
Author

Asking for a lower minimum supported Rust version is a fair enough request

Is there a documented minimum version? I only see instructions insisting on the latest version.

ok it's in lighthouse/Cargo.toml

@michaelsproul
Copy link
Member

yes the minimum version is stated in lighthouse/Cargo.toml.

Cargo is meant to spit out a nice error about the minimum version but I think old versions of Cargo fail ondep: style dependencies before they have a chance to emit that nice error.

@wjmelements
Copy link
Author

yes the minimum version is stated in lighthouse/Cargo.toml.

Cargo is meant to spit out a nice error about the minimum version but I think old versions of Cargo fail ondep: style dependencies before they have a chance to emit that nice error.

That particular error also was hard to google in that there were no results that just said to bump the rust version, so not great. But the troubleshooting instructions in the docs helped me identify the issue a few hours ago.

@wjmelements
Copy link
Author

Another improvement could be modifying the docs here https://lighthouse-book.sigmaprime.io/installation-source.html#compilation-error to specify >= MSRV instead of latest version.

@michaelsproul
Copy link
Member

Unfortunately I think the ship has sailed on lowering the MSRV below 1.62. I had a look at what would be required and it seems we'd have to revert quite a lot of changes and modify several dependencies.

What we'll try to do is prevent it from drifting upwards in future. I notice that Ubuntu only ships rustc 1.59.1 in 22.04, and in future a constraint like that could help us maintain a lower MSRV. There are open issues tracking .deb packages, which we'll hopefully have some time for after the merge: #2082, #2153.

I've also added a link to the MSRV to the docs in #3509.

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