pingcap / pingcap/tidb

Build fails with Go 1.27

Open Beginner friendly
#70,069 0 comments 3 reactions 0 assignees View on GitHub
component/build contribution
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

Hey,

build with Go 1.27 fails with `pkg/util/hack/hack.go:41:2: undefined: checkMapABI`

...due to unmet `!go1.27` build constraints:
https://github.com/pingcap/tidb/blob/05b396fb6636f73b3bc06b09107cf43f2c725c35/pkg/util/hack/map_abi_go126.go#L15
https://github.com/pingcap/tidb/blob/05b396fb6636f73b3bc06b09107cf43f2c725c35/pkg/util/hack/map_abi_test_type_go126_test.go#L15
https://github.com/pingcap/tidb/blob/05b396fb6636f73b3bc06b09107cf43f2c725c35/pkg/util/hack/map_abi_test.go#L15

Found in
* https://github.com/Homebrew/homebrew-core/pull/288803

Contributor guide

Open the contributing guide

Research direction

Start with pkg/util/hack/hack.go:41 and inspect the Go version build constraints in map_abi_go126.go, map_abi_test_type_go126_test.go, and map_abi_test.go. Reproduce the failure with Go 1.27, then verify that the hack package and its tests build successfully without the undefined checkMapABI error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.