qjfoidnh / BaiduPCS-Go

iikira/BaiduPCS-Go原版基础上集成了分享链接/秒传链接转存功能
Apache License 2.0
3.01k stars 455 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 4 months ago

stefanb commented 4 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 3 months ago

Build is still failing with Go 1.23 rc2

Ted-bug commented 3 months ago

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

stefanb commented 3 months 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.