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

Incompatible with Go 1.23, which doesn't allow //go:linkname to internal symbols, including to runtime package #54197

Closed
stefanb opened this issue Jun 25, 2024 · 5 comments
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@stefanb
Copy link

stefanb commented Jun 25, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Try building with Go 1.23 rc1, eg in while testing Go 1.23 rc1 in homebrew:

2. What did you expect to see? (Required)

Succesfull build

3. What did you see instead (Required)

Build error:

  # github.com/pingcap/tidb/dumpling/cmd/dumpling
  link: github.com/pingcap/tidb/pkg/util/printer: invalid reference to runtime.buildVersion

4. What is your TiDB version? (Required)


Note, that Go 1.23 no longer allows //go:linkname * runtime.* link instructioins, see

It is used several times in tidb:
https://github.com/search?q=repo%3Apingcap%2Ftidb%20linkname&type=code

@stefanb stefanb added the type/bug The issue is confirmed as a bug. label Jun 25, 2024
@hawkingrei
Copy link
Member

Great, Thank for your report. We will start to support the go1.23. TiDB 8.5 will use go 1.23.

@rsc
Copy link

rsc commented Jun 27, 2024

Note that you can use runtime/debug.ReadBuildInfo and then use info.GoVersion instead of runtime.buildVersion.

@hawkingrei
Copy link
Member

It has been fixed by #53619.

I have success to build tidb with go1.23rc1.

@lance6716
Copy link
Contributor

It has been fixed by #53619.

I have success to build tidb with go1.23rc1.

the original post is about dumpling not tidb. Can you check make build for dumpling?

@stefanb
Copy link
Author

stefanb commented Jul 1, 2024

Please don't forget to tag a release sometime before Go 1.23 is released in August.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants