Skip to content

Commit

Permalink
Update README to include Go 1.23.0 section
Browse files Browse the repository at this point in the history
Recent changes [1] in go liker breaks `anet` build with go 1.23.0. An
information about how to deal with it should be helpful.

[1] golang/go#67401
  • Loading branch information
bobrofon committed Aug 22, 2024
1 parent e684438 commit ac7b7fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,9 @@ fe80::7e4f:4446:eb3:1eb8/64

## Other issues due to #40569
- https://github.com/golang/go/issues/68082

## How to build with Go 1.23.0 or later
The `anet` library internally relies on `//go:linkname` directive. Since the usage of `//go:linkname` has been restricted since Go 1.23.0 ([Go 1.23 Release Notes](https://tip.golang.org/doc/go1.23#linker)), it is necessary to specify the `-checklinkname=0` linker flag when building the `anet` package with Go 1.23.0 or later. Without this flag, the following linker error will occur:
```
link: github.com/wlynxg/anet: invalid reference to net.zoneCache
```

0 comments on commit ac7b7fd

Please sign in to comment.