coze-dev / coze-dev/coze-studio
在构建本地化ci过程中,go build 时候出现问题
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
本地构建自己的gitlab-ci时候,需要构建backend下的main.go文件,但是出现如下错误
GOROOT='/usr/local/go' /usr/local/go/pkg/tool/linux_amd64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -buildmode=exe -buildid=vUyIkP04GZhoP4yXmwj-/qwR1rFYTMfXsMZxKgAIA/7Tl8yxEqBVW0-Ev8k1bl/vUyIkP04GZhoP4yXmwj- -s -w -extld=gcc $WORK/b001/_pkg_.a
# command-line-arguments
link: github.com/bytedance/sonic/loader: invalid reference to runtime.lastmoduledatap
尝试解决方式
1、查看Sonic的依赖的mod文件,看到使用的是go1.7,而且,Notice: Go1.24.0 is not supported due to the https://github.com/golang/go/issues/71672, please use higher go version or add build tag --ldflags="-checklinkname=0",但是,coze-studio项目中mod文件是使用go1.24.0版本,这里是否存在冲突
Contributor guide
Assessment
This issue has not been assessed yet.