mylxsw / aidea-server

AIdea 是一款支持 GPT 以及国产大语言模型通义千问、文心一言等,支持 Stable Diffusion 文生图、图生图、 SDXL1.0、超分辨率、图片上色的全能型 APP。
https://ai.aicode.cc
1.58k stars 433 forks source link

make build-release出错 #45

Closed tangyiyong closed 7 months ago

tangyiyong commented 10 months ago

项目根目录下执行 make build-release

错误信息: pkg/misc/misc.go:305:156: cannot use 9999999999 (untyped int constant) as int value in argument to rand.Intn (overflows)

修改: Line305: rand.Intn(9999999999) -> rand.Int63n(9999999999)

另外在mac下make build 编译成功,但是在ubuntu下编译失败,错误信息: ~/aidea-server# make build go build -race -ldflags "-s -w -X main.Version=202401171548 -X main.GitCommit=3a4805df090e055c55703f27bd4d34f802846b62 -X main.DEBUG=true" -o build/debug/aidea-server cmd/main.go build command-line-arguments: cannot load embed: malformed module path "embed": missing dot in first path element make: *** [Makefile:7: build] Error 1

go开发入门新手,不知道这个怎么解决? 谢谢!

mylxsw commented 9 months ago

这个问题大概率是 Go 版本问题,升级到最新版 (建议 Go 1.21,至少 1.20+)应该就没有这个问题了