make geth报错:error: 'for' loop initial declarations are only allowed in C99 mode

环境: centos7,go version go1.21.6 linux/amd64

[root@localhost go-ethereum]# make all go run build/ci.go install go version go1.21.6 linux/amd64

/root/go/bin/go build -ldflags "-X github.com/ethereum/go-ethereum/internal/ version.gitCommit=89575aeb4be48a77389a2916965246641bdf3f1a -X github.com/ethereu m/go-ethereum/internal/version.gitDate=20240209 -extldflags '-Wl,-z,stack-size=0 x800000'" -tags urfave_cli_no_docs,ckzg -trimpath -v -o /usr/local/go-ethereum/b uild/bin/abidump ./cmd/abidump internal/unsafeheader internal/goarch internal/cpu internal/abi internal/bytealg internal/coverage/rtcov internal/godebugs internal/goexperiment internal/goos runtime/internal/atomic runtime/internal/math runtime/internal/sys runtime/internal/syscall internal/itoa math/bits math runtime unicode/utf8 internal/race sync/atomic unicode encoding unicode/utf16 crypto/internal/alias crypto/subtle crypto/internal/boring/sig vendor/golang.org/x/crypto/cryptobyte/asn1 log/internal golang.org/x/exp/constraints golang.org/x/exp/slices golang.org/x/exp/slog/internal github.com/ethereum/go-ethereum/params/forks internal/reflectlite sync internal/testlog internal/bisect errors sort strconv io internal/oserror syscall reflect internal/syscall/unix time internal/fmtsort internal/safefilepath internal/poll internal/syscall/execenv path io/fs strings os bytes encoding/binary fmt encoding/base64 context internal/godebug math/rand encoding/hex flag encoding/json database/sql/driver database/sql math/big hash crypto golang.org/x/crypto/sha3 path/filepath regexp/syntax github.com/holiman/uint256 regexp github.com/ethereum/go-ethereum/common/hexutil runtime/debug crypto/cipher github.com/ethereum/go-ethereum/common crypto/internal/boring crypto/aes crypto/internal/edwards25519/field crypto/internal/nistec/fiat embed crypto/internal/randutil crypto/internal/bigmod crypto/internal/boring/bbig crypto/sha512 encoding/asn1 crypto/internal/nistec vendor/golang.org/x/crypto/cryptobyte crypto/ecdh crypto/elliptic crypto/sha256 github.com/ethereum/go-ethereum/common/math crypto/ecdsa bufio crypto/rand github.com/ethereum/go-ethereum/rlp/internal/rlpstruct runtime/cgo github.com/ethereum/go-ethereum/rlp os/exec html net/url text/template/parse github.com/ethereum/go-ethereum/crypto/secp256k1 text/template html/template io/ioutil rsc.io/tmplfunc/internal/parse rsc.io/tmplfunc github.com/consensys/bavard internal/saferio encoding/gob github.com/mmcloughlin/addchain/internal/bigint github.com/mmcloughlin/addchain/internal/bigints github.com/mmcloughlin/addchain github.com/mmcloughlin/addchain/internal/errutil text/tabwriter github.com/mmcloughlin/addchain/internal/print github.com/mmcloughlin/addchain/acc/ast github.com/mmcloughlin/addchain/acc/ir github.com/mmcloughlin/addchain/acc/parse/internal/parser github.com/mmcloughlin/addchain/acc/parse container/heap github.com/mmcloughlin/addchain/internal/container/heap github.com/mmcloughlin/addchain/acc/pass github.com/mmcloughlin/addchain/acc/printer github.com/mmcloughlin/addchain/acc github.com/mmcloughlin/addchain/alg github.com/mmcloughlin/addchain/alg/contfrac github.com/mmcloughlin/addchain/internal/bigvector github.com/mmcloughlin/addchain/alg/dict github.com/mmcloughlin/addchain/alg/heuristic github.com/mmcloughlin/addchain/alg/opt github.com/mmcloughlin/addchain/alg/ensemble log github.com/mmcloughlin/addchain/alg/exec github.com/mmcloughlin/addchain/meta github.com/consensys/gnark-crypto/field/generator/internal/addchain github.com/consensys/gnark-crypto/field/generator/config github.com/consensys/gnark-crypto/internal/generator/config github.com/consensys/gnark-crypto/ecc github.com/bits-and-blooms/bitset github.com/consensys/gnark-crypto/field/hash github.com/consensys/gnark-crypto/field/pool golang.org/x/sys/cpu github.com/consensys/gnark-crypto/ecc/bls12-381/fp github.com/consensys/gnark-crypto/ecc/bls12-381/fr github.com/consensys/gnark-crypto/ecc/bls12-381/internal/fptower github.com/consensys/gnark-crypto/internal/parallel github.com/consensys/gnark-crypto/ecc/bls12-381 github.com/crate-crypto/go-kzg-4844/internal/multiexp github.com/crate-crypto/go-kzg-4844/internal/utils github.com/crate-crypto/go-kzg-4844/internal/kzg golang.org/x/sync/errgroup github.com/crate-crypto/go-kzg-4844 github.com/supranational/blst/bindings/go

github.com/supranational/blst/bindings/go

/root/go_path/pkg/mod/github.com/supranational/blst@v0.3.11/bindings/go/blst.go: In function 'go_pairing_init': /root/go_path/pkg/mod/github.com/supranational/blst@v0.3.11/bindings/go/blst.go: 44:10: error: 'for' loop initial declarations are only allowed in C99 mode // for(size_t i = 0; i < DST_len; i++) dst[i] = DST[i]; ^* /root/go_path/pkg/mod/github.com/supranational/blst@v0.3.11/bindings/go/blst.go: 44:10: note: use option -std=c99 or -std=gnu99 to compile your code golang.org/x/exp/slog/internal/buffer golang.org/x/exp/slog github.com/ethereum/go-ethereum/crypto github.com/ethereum/go-ethereum/log github.com/ethereum/go-ethereum/params github.com/ethereum/go-ethereum/common/mclock github.com/ethereum/go-ethereum/accounts/abi github.com/ethereum/go-ethereum/event util.go:48: exit status 1 exit status 1 make: [all] Error 1

安装go-ethereum的geth 报错,请问下这个问题怎么解决?

请先 登录 后评论

1 个回答

nil
请先 登录 后评论
  • 1 关注
  • 0 收藏,1320 浏览
  • nil 提出于 2024-02-10 11:19