Skip to content

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

Description

@TajangSec

我现在是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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions