Skip to content
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

panic: unexpected 32-bit segment #295

Open
anyhuang opened this issue Sep 30, 2022 · 2 comments
Open

panic: unexpected 32-bit segment #295

anyhuang opened this issue Sep 30, 2022 · 2 comments
Labels
waiting for info We're waiting for a response

Comments

@anyhuang
Copy link

anyhuang commented Sep 30, 2022

(base) ➜  hello_bud bud build     
# command-line-arguments
panic: unexpected 32-bit segment

goroutine 1 [running]:
cmd/link/internal/ld.machoCombineDwarf(0x10505d798?, 0x14001b5e060?, 0x14000e76080, {0x14001496140?, 0x1?}, {0x14002ad6060, 0x53})
        /usr/local/go/src/cmd/link/internal/ld/macho_combine_dwarf.go:218 +0xfb4
cmd/link/internal/ld.(*Link).hostlink(0x1400014e000)
        /usr/local/go/src/cmd/link/internal/ld/lib.go:1824 +0x44b0
cmd/link/internal/ld.Main(_, {0x10, 0x20, 0x1, 0x1f, 0x1e, 0x7c00000, {0x104f93ed6, 0x14}, {0x104f9785b, ...}, ...})
        /usr/local/go/src/cmd/link/internal/ld/main.go:378 +0x1444
main.main()
        /usr/local/go/src/cmd/link/main.go:72 +0xd98
| exit status 2

go version go1.19.1 darwin/arm64

@matthewmueller
Copy link
Contributor

matthewmueller commented Oct 1, 2022

Hmm... that's odd since you're running the same version and hardware as me :)

I just ran:

curl -sf https://raw.githubusercontent.com/livebud/bud/main/install.sh | sh
bud create testbud
cd testbud
bud build

And it worked for me.

Can you share the steps you ran to reproduce this error?

@matthewmueller matthewmueller added the waiting for info We're waiting for a response label Oct 1, 2022
@zjwang001
Copy link

(base) ➜  hello_bud bud build     
# command-line-arguments
panic: unexpected 32-bit segment

goroutine 1 [running]:
cmd/link/internal/ld.machoCombineDwarf(0x10505d798?, 0x14001b5e060?, 0x14000e76080, {0x14001496140?, 0x1?}, {0x14002ad6060, 0x53})
        /usr/local/go/src/cmd/link/internal/ld/macho_combine_dwarf.go:218 +0xfb4
cmd/link/internal/ld.(*Link).hostlink(0x1400014e000)
        /usr/local/go/src/cmd/link/internal/ld/lib.go:1824 +0x44b0
cmd/link/internal/ld.Main(_, {0x10, 0x20, 0x1, 0x1f, 0x1e, 0x7c00000, {0x104f93ed6, 0x14}, {0x104f9785b, ...}, ...})
        /usr/local/go/src/cmd/link/internal/ld/main.go:378 +0x1444
main.main()
        /usr/local/go/src/cmd/link/main.go:72 +0xd98
| exit status 2

我本地 安装go1.18.5 也遇到这个问题了 切换到 go1.17 就可以正常打包
go version go1.18.5 darwin/arm64

go build -o ./ ./cmd/main.go

command-line-arguments

panic: unexpected 32-bit segment

goroutine 1 [running]:
cmd/link/internal/ld.machoCombineDwarf(0x102513c78?, 0x140100e8030?, 0x14000772380, {0x140068dae60?, 0x1?}, {0x14010790000, 0x51})
/usr/local/go/src/cmd/link/internal/ld/macho_combine_dwarf.go:218 +0x1024
cmd/link/internal/ld.(*Link).hostlink(0x1400015e000)
/usr/local/go/src/cmd/link/internal/ld/lib.go:1709 +0x4b9c
cmd/link/internal/ld.Main(_, {0x10, 0x20, 0x1, 0x1f, 0x1e, 0x7c00000, {0x10245189b, 0x14}, {0x102454ff8, ...}, ...})
/usr/local/go/src/cmd/link/internal/ld/main.go:373 +0x143c
main.main()
/usr/local/go/src/cmd/link/main.go:69 +0xc5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for info We're waiting for a response
Projects
None yet
Development

No branches or pull requests

3 participants