goccy / bigquery-emulator

BigQuery emulator server implemented in Go
MIT License
840 stars 107 forks source link

Can't compile with Golang 1.23 toolchain #348

Closed sonic-martin closed 2 months ago

sonic-martin commented 3 months ago

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 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

jordanfowler commented 3 months ago

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