prysmaticlabs / prysm

Go implementation of Ethereum proof of stake
https://www.offchainlabs.com
GNU General Public License v3.0
3.46k stars 985 forks source link

Prysm v5.0.4 fail building from source #14141

Closed chichi13 closed 2 months ago

chichi13 commented 2 months ago

Describe the bug

I'm trying to build prysm from source with go1.22.0:

ethereum@ethereum-holesky-01:~/prysm$ git branch
* (HEAD detached at v5.0.4)
  develop
ethereum@ethereum-holesky-01:~/prysm$ ls
api       beacon-chain  cache   consensus-types  CONTRIBUTING.md  deps.bzl             fuzzbuzz.yaml  hack        LICENSE.md    MODULE.bazel.lock  nogo_config.json  prysm.bat  README.md    service-account.json.enc  third_party  validator
async     build         cmd     container        crypto           distroless_deps.bzl  go.mod         INTEROP.md  math          monitoring         proto             prysm.ps1  runtime      TERMS_OF_SERVICE.md       time         WORKSPACE
bazel.sh  BUILD.bazel   config  contracts        DEPENDENCIES.md  encoding             go.sum         io          MODULE.bazel  network            prysm             prysm.sh   SECURITY.md  testing                   tools
ethereum@ethereum-holesky-01:~/prysm$ go build -o prysm ./cmd/beacon-chain
beacon-chain/state/interfaces.go:10:2: missing go.sum entry for module providing package github.com/prysmaticlabs/go-bitfield (imported by github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1); to add:
    go get github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1

Has this worked before in a previous version?

Yes, worked in v5.0.3

🔬 Minimal Reproduction

git checkout v5.0.4
go build -o prysm ./cmd/beacon-chain

Error

No response

Platform(s)

Linux (x86)

What version of Prysm are you running? (Which release)

No response

Anything else relevant (validator index / public key)?

No response

prestonvanloon commented 2 months ago

@chichi13 this is now fixed as of #14145. We aren't able to re-tag v5.0.4. If you wish to build with go, please check out the release-v5.0.4 branch and build from commit 080114973c4007f36fde867dda28f1e31c3ad8cc.

Please also see our documentation about building Prysm with bazel.

Here's the equivalent command where you end up with a release asset named prysm.

git checkout v5.0.4
bazel build //cmd/beacon-chain --config=release
cp bazel-bin/cmd/beacon-chain/beacon-chain_/beacon-chain prysm