bigquery-emulator icon indicating copy to clipboard operation
bigquery-emulator copied to clipboard

Can't compile with Golang 1.23 toolchain

Open sonic-martin opened this issue 6 months ago • 1 comments

What happened?

After upgrading my Golang toolchain to 1.23 on my Ubuntu running in WSL the compilation of bigquery-emulator fails:

link: github.com/segmentio/parquet-go/hashprobe/aeshash: invalid reference to runtime.aeskeysched

What did you expect to happen?

Successful compilation.

How can we reproduce it (as minimally and precisely as possible)?

$ go version
go version go1.23.0 linux/amd64
$ CGO_ENABLED=1 CXX="clang++" go install github.com/goccy/bigquery-emulator/cmd/[email protected]
# github.com/goccy/bigquery-emulator/cmd/bigquery-emulator
link: github.com/segmentio/parquet-go/hashprobe/aeshash: invalid reference to runtime.aeskeysched

Anything else we need to know?

According to https://github.com/parquet-go/parquet-go/pull/142 the root cause probably is this change from Go 1.23:

The linker now disallows using a //go:linkname directive to refer to internal symbols in the standard library (including the runtime) that are not marked with //go:linkname on their definitions. Similarly, the linker disallows references to such symbols from assembly code. For backward compatibility, existing usages of //go:linkname found in a large open-source code corpus remain supported. Any new references to standard library internal symbols will be disallowed.

According to https://github.com/grafana/pyroscope/issues/3485 this can be fixed by upgrading parquet-go to v0.23.0

sonic-martin avatar Aug 16 '24 07:08 sonic-martin