Skip to content

解决编译为exe时的报错问题 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TajangSec opened this issue Feb 20, 2023 · 0 comments
Open

解决编译为exe时的报错问题 #5

TajangSec opened this issue Feb 20, 2023 · 0 comments

Comments

@TajangSec
Copy link

我现在是2023/2/20,当我按照README默认安装最新的garble打包exe时,遇到了如下错误
image

C:\Users\Tajang\AppData\Local\Temp\garble-shared2514198858\runtime\ezwnxcZ.s:205: expected '(', found /
asm: InitTextSym double init for sync
panic: invalid use of LSym - NewFuncInfo with Extra of type *obj.FuncInfo

goroutine 1 [running]:
cmd/internal/obj.(*LSym).NewFuncInfo(0x53aceb?)
        c:/go/src/cmd/internal/obj/link.go:516 +0xf4
cmd/internal/obj.(*Link).InitTextSym(0xc00012e400, 0xc000220e00, 0x4)
        c:/go/src/cmd/internal/obj/plist.go:170 +0xfc
cmd/asm/internal/asm.(*Parser).asmText(0xc000123e78, {0xc000123d18, 0x3, 0x0?})
        c:/go/src/cmd/asm/internal/asm/asm.go:181 +0x505
cmd/asm/internal/asm.(*Parser).pseudo(0xc000123e78?, {0xc000226148?, 0xc000226140?}, {0xc000123d18?, 0x0?, 0x0?})
        c:/go/src/cmd/asm/internal/asm/parse.go:298 +0x54
cmd/asm/internal/asm.(*Parser).Parse(0xc000123e78)
        c:/go/src/cmd/asm/internal/asm/parse.go:106 +0xd6
main.main()
        c:/go/src/cmd/asm/main.go:93 +0x805
exit status 2
exit status 2

这是因为最新garble做了一些变化导致了错误,而太旧版本的garble v0.7.0以前不支持go1.19,所以安装garble那一步按照下列方式安装

go install mvdan.cc/garble@v0.7.1
@TajangSec TajangSec reopened this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant