-
Notifications
You must be signed in to change notification settings - Fork 311
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
"illegal combination" error when used in gomobile bind #681
Comments
@lizthegrey Can you take a look at this? Seems like a regression from #464 |
I think this is a bug in gomobile rather than a problem with the assembly. PCALIGN is a supported operation in Golang. https://github.com/golang/go/blob/master/src/cmd/internal/obj/arm64/doc.go#L54:L94 |
Is there some ways to walk around? |
I don't believe it's essential to PCALIGN for correctness, only performance. You could try building from a branch with those directives removed, or manually add NOPs to make the alignment work out. Meanwhile I'd recommend filing a bug upstream on the gomobile component. |
Thanks a lot for your response. Could you give some advice which branch I should choose to avoid PCALIGN? Thanks. |
@ICU2020 You can build with |
I build my android lib with:
gomobile bind -target=android/arm64 -tags='headless' -o=$(my_android_lib) -ldflags="-w -X -s" $(my_dir)
and found the error below:
//# github.com/klauspost/compress/zstd/internal/xxhash
asm: illegal combination: 00072 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00072 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00072 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00072 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00032 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00032 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00032 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: illegal combination: 00032 () PCALIGN $16 ABCON0 NONE NONE NONE, 4 0
asm: assembly failed
make: *** [my_android_lib.aar] Error 1
Update:
But when I use :
gomobile bind -target=android/arm -tags='headless' -o=$(my_android_lib) -ldflags="-w -X -s" $(my_dir)
the error disappear.
Used commit: 7484543
The text was updated successfully, but these errors were encountered: