qjfoidnh / BaiduPCS-Go

iikira/BaiduPCS-Go原版基础上集成了分享链接/秒传链接转存功能
Apache License 2.0
2.9k stars 440 forks source link

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

Open stefanb opened 2 months ago

stefanb commented 2 months ago

While testing Go 1.23 rc1 in

there was an error:

  # github.com/qjfoidnh/BaiduPCS-Go
  link: github.com/qjfoidnh/BaiduPCS-Go/pcsutil/cachepool: invalid reference to runtime.rawbyteslice

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

It is used in https://github.com/search?q=repo%3Aqjfoidnh%2FBaiduPCS-Go%20linkname&type=code

stefanb commented 1 month ago

Build is still failing with Go 1.23 rc2

Ted-bug commented 1 month ago

maybe you can try "ldflags=-checklinkname=0" if you just want to run.

stefanb commented 1 month ago

Thanks for the workaround. I don't need to run it just for myself, I encountered this problem when trying to build it with upcoming Go 1.23 and giving you a heads-up to find a solution before it annoys more users.