goccy/bigquery-emulator

Can't compile with Golang 1.23 toolchain

Closed this issue · 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/bigquery-emulator@v0.6.4
# 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 parquet-go/parquet-go#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 grafana/pyroscope#3485 this can be fixed by upgrading parquet-go to v0.23.0

Quick note, this might be fixed by using the non-archived version of parquet-go, now located here: https://github.com/parquet-go/parquet-go