x/mobile: unable to include symbols for App Store submission
Closed this issue · 20 comments
What version of Go are you using (go version
)?
$ go version go version go1.11.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/ab/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/ab/code/et" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11.2/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11.2/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4v/80xls6wn4gbc8y1phf9x3908ld03pg/T/go-build963348685=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
After running
gomobile bind -target=ios -o EasyPGP.framework github.com/lastochkanetwork/EasyPGP
I've did the following:
- Added EasyPGP.framework to XCode project
- Build→Archive
- Submit build to App Store
- Set following checkmark
- Got "Symbol tool failed" error message while processing build
Exclusion of EasyPGP.framework fixed error message. Previous .framework build (from around5 month ago) works just fine.
What did you expect to see?
Correct build upload
What did you see instead?
Symbol tool failed
error message. At the end of the debug log:
2018-11-29 06:47:18 +0000 Running /Applications/Xcode.app/Contents/Developer/usr/bin/symbols '-noTextInSOD' '-noDaemon' '-arch' 'all' '-symbolsPackageDir' '/var/folders/4v/80xls6wn4gbc8y1phf9x3908ld03pg/T/XcodeDistPipeline.OCM/Symbols' '/var/folders/4v/80xls6wn4gbc8y1phf9x3908ld03pg/T/XcodeDistPipeline.OCM/sayana.app.dSYM/Contents/Resources/Dwarf/myappname'
2018-11-29 06:47:18 +0000 error: Could not load symbol information for 22B5CECF-8729-324E-96B5-01D56C25DF88. Symbols file will contain no data.
Go 1.10.4 does not cause such problem
/cc @eliasnaur
I also has this problem in version 1.11.4
What happens if you don't check the "Upload your app's symbols..." checkbox?
I'm not sure the Go way to store Dwarf symbols inside the binary has ever worked with Apple's developer tools. Their tools generally expect symbols in separate files.
@eliasnaur without checkbox binary gets uploaded and crash logs arrive without symbols
I am having a similar issue and I use go version go1.11.5 darwin/amd64
We just got this issue when migrating to Bazel, so we assumed it was because of that. Apparently it is not.
I'm not sure why Go DWARF attributes would cause this, since they've always been there (admittedly with improvements in go 1.11). #25297 was for the gradle Crashlytics plugin.
Related:
Apparently the offending command is:
symbols -noTextInSOD -noDaemon -arch all -symbolsPackageDir <PATH TO DSYM> App.app/App
For the record, I have the same issue with Go 1.11.5 darwin/amd64.
In the meantime, my current workaround is to strip all debug symbols by passing -ldflags="-s -w"
to go bind
.
Change https://golang.org/cl/170377 mentions this issue: cmd/link/internal/ld: fix c-archive mach-o compatibility
What did you see instead?
Symbol tool failed error message.
This bug has been resolved and I think this issue can be closed.
@tmm1 how can I try the fix you mention? I've tried the workaround and it still fails: gomobile bind -v -ldflags="-s -w" -target=ios -o mypkg.framework github.com/mypkg/mypkg
I've tried using the latest master and I'm getting the same error. Some things I've checked:
- Uninstalled my previous golang version to make sure I'm building with the right version
- symbols after generating the .framework still prints a single
null-uuid
record - archiving & upload to app store fails with an "empty symbols table" error
- rebuilt gomobile using go master
- adding
-ldflags="-s -w"
togomobile bind
fails with the same error
I'm willing to try out any patches or contribute one with some guidance (I don't really know about dwarf symbol tables?)
@tmm1 I tried to cherry-pick 277609f and 2ae793e on top of Go 1.11.10, and I get a failure at the symbols test:
--- FAIL: TestDWARF (14.77s)
--- FAIL: TestDWARF/testprog#01 (1.71s)
dwarf_test.go:86: symbols go.o: parsed as empty
--- FAIL: TestDWARF/testprogcgo#01 (7.53s)
dwarf_test.go:86: symbols go.o: parsed as empty
FAIL
FAIL cmd/link 14.963s```
Can this be closed now?
I think, no problems on our side anymore.