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

Makefiles error when build geth #58

Open
ccwall3 opened this issue May 19, 2024 · 2 comments
Open

Makefiles error when build geth #58

ccwall3 opened this issue May 19, 2024 · 2 comments

Comments

@ccwall3
Copy link

ccwall3 commented May 19, 2024

[root@192 bsc]# go version
go version go1.21.5 linux/amd64

###make geth find errors####
[root@192 bsc]# make geth
go run build/ci.go install ./cmd/geth -std=c99

/usr/local/go/bin/go build -ldflags "-X github.com/ethereum/go-ethereum/internal/version.gitCommit=f45305b1ad8914201611f47d6dafb4f1279c7d76 -X github.com/ethereum/go-ethereum/internal/version.gitDate=20240517 -extldflags '-Wl,-z,stack-size=0x800000'" -tags urfave_cli_no_docs,ckzg -trimpath -v -o /usr/local/bnb/bsc/build/bin/geth ./cmd/geth
github.com/supranational/blst/bindings/go

github.com/supranational/blst/bindings/go

/root/go/pkg/mod/github.com/supranational/blst@v0.3.11/bindings/go/blst.go: In function 'go_pairing_init':
/root/go/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/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
^Csignal: interrupt
make: *** [geth] Error 1


###if not use-std=c99###
go run build/ci.go install ./cmd/geth

/usr/local/go/bin/go build -ldflags "-X github.com/ethereum/go-ethereum/internal/version.gitCommit=f45305b1ad8914201611f47d6dafb4f1279c7d76 -X github.com/ethereum/go-ethereum/internal/version.gitDate=20240517 -extldflags '-Wl,-z,stack-size=0x800000'" -tags urfave_cli_no_docs,ckzg -trimpath -v -o /usr/local/bnb/bsc/build/bin/geth ./cmd/geth
github.com/supranational/blst/bindings/go

github.com/supranational/blst/bindings/go

/root/go/pkg/mod/github.com/supranational/blst@v0.3.11/bindings/go/blst.go: In function 'go_pairing_init':
/root/go/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/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

@ccwall3
Copy link
Author

ccwall3 commented May 19, 2024

and gcc version is 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

@buddh0
Copy link
Contributor

buddh0 commented Aug 14, 2024

pls refer https://github.com/bnb-chain/bsc/blob/master/README.md

please try to add the following environment variables and build again:

export CGO_CFLAGS="-O -D__BLST_PORTABLE__" 
export CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__"

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

2 participants