ethereum / go-ethereum

Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
47.39k stars 20.05k forks source link

v1.12.0 tag make failed #27440

Closed godeamon closed 1 year ago

godeamon commented 1 year ago

System information

Geth version: v1.12.0

OS & Version: centos gcc 4.8.5

Expected behaviour

make failed: image

godeamon commented 1 year ago

v1.11.6 tag compile successed, maybe blst repo?

godeamon commented 1 year ago

build/ci.go file add this code will be success buildTags = []string{"CGO_CFLAGS", "-std=c99"} 213 line.

holiman commented 1 year ago

I wonder if it's worth opening this as a ticket on blst instead -- the code is here: https://github.com/supranational/blst/blob/master/bindings/go/blst.go#L44

I mean sure, we can change flags, but fixing it at the source benefits all consumers of the library.

godeamon commented 1 year ago

I wonder if it's worth opening this as a ticket on blst instead -- the code is here: https://github.com/supranational/blst/blob/master/bindings/go/blst.go#L44

I mean sure, we can change flags, but fixing it at the source benefits all consumers of the library.

@holiman thanks, but how should I compile geth version v1.12.0 ?

fjl commented 1 year ago

I also wonder why this issue did not occur in any of the build environments that we have. Maybe newer gcc versions default to C99?

fjl commented 1 year ago

It looks like gcc 5 does have the required features by default.

godeamon commented 1 year ago

I also wonder why this issue did not occur in any of the build environments that we have. Maybe newer gcc versions default to C99?

Yes, gcc 5 may not have this problem.

godeamon commented 1 year ago

I upgraded the gcc version to 12, now it works, thanks for the reply