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

x/mobile: unable to include symbols for App Store submission #28997

Open
sashabaranov opened this issue Nov 29, 2018 · 20 comments
Open

x/mobile: unable to include symbols for App Store submission #28997

sashabaranov opened this issue Nov 29, 2018 · 20 comments
Labels
Milestone

Comments

@sashabaranov
Copy link

@sashabaranov sashabaranov commented Nov 29, 2018

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:

  1. Added EasyPGP.framework to XCode project
  2. Build→Archive
  3. Submit build to App Store
  4. Set following checkmark

screen shot 2018-11-28 at 22 45 29

  1. Got "Symbol tool failed" error message while processing build

screen shot 2018-11-28 at 22 40 00

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.

@gopherbot gopherbot added this to the Unreleased milestone Nov 29, 2018
@gopherbot gopherbot added the mobile label Nov 29, 2018
@sashabaranov
Copy link
Author

@sashabaranov sashabaranov commented Nov 29, 2018

Might be related to #25297 #25704 #28517

@sashabaranov
Copy link
Author

@sashabaranov sashabaranov commented Nov 30, 2018

Go 1.10.4 does not cause such problem

@agnivade
Copy link
Contributor

@agnivade agnivade commented Dec 2, 2018

@zhoujian12
Copy link

@zhoujian12 zhoujian12 commented Feb 1, 2019

I also has this problem in version 1.11.4

@eliasnaur
Copy link
Contributor

@eliasnaur eliasnaur commented Feb 1, 2019

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.

@sashabaranov
Copy link
Author

@sashabaranov sashabaranov commented Feb 1, 2019

@eliasnaur without checkbox binary gets uploaded and crash logs arrive without symbols

@girish-koundinya
Copy link

@girish-koundinya girish-koundinya commented Feb 2, 2019

I am having a similar issue and I use go version go1.11.5 darwin/amd64

@steeve
Copy link
Contributor

@steeve steeve commented Feb 7, 2019

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.

@steeve
Copy link
Contributor

@steeve steeve commented Feb 7, 2019

@steeve
Copy link
Contributor

@steeve steeve commented Feb 7, 2019

Apparently the offending command is:

symbols -noTextInSOD -noDaemon -arch all -symbolsPackageDir <PATH TO DSYM> App.app/App
@qmathe
Copy link

@qmathe qmathe commented Mar 4, 2019

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.

@gopherbot
Copy link

@gopherbot gopherbot commented Apr 2, 2019

Change https://golang.org/cl/170377 mentions this issue: cmd/link/internal/ld: fix c-archive mach-o compatibility

gopherbot pushed a commit that referenced this issue Apr 11, 2019
These workarounds predate proper DWARF support
and are no longer necessary.

Before this patch, running `/usr/bin/symbols go.o`
using the object in the c-archive would fail, causing
App Store rejections.

Fixes #31022 #28997

Change-Id: I6a210b6369c13038777c6e21e874e81afcb50c2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/170377
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@tmm1
Copy link
Contributor

@tmm1 tmm1 commented Apr 13, 2019

What did you see instead?

Symbol tool failed error message.

This bug has been resolved and I think this issue can be closed.

@champo
Copy link

@champo champo commented Apr 16, 2019

@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

@tmm1
Copy link
Contributor

@tmm1 tmm1 commented Apr 16, 2019

You have to compile and use golang from master so it includes 3cb92fc

@champo
Copy link

@champo champo commented Apr 16, 2019

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" to gomobile 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?)

steeve added a commit to znly/go that referenced this issue May 31, 2019
These workarounds predate proper DWARF support
and are no longer necessary.

Before this patch, running `/usr/bin/symbols go.o`
using the object in the c-archive would fail, causing
App Store rejections.

Fixes golang#31022 golang#28997

Change-Id: I6a210b6369c13038777c6e21e874e81afcb50c2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/170377
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@steeve
Copy link
Contributor

@steeve steeve commented Jun 4, 2019

@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```
@steeve
Copy link
Contributor

@steeve steeve commented Jun 4, 2019

Ok I found out I was missing b56d1ba too

mssun added a commit to mssun/passforios that referenced this issue Jun 8, 2019
Caused by golang/go#28997
mssun added a commit to mssun/passforios that referenced this issue Sep 15, 2019
@tmm1
Copy link
Contributor

@tmm1 tmm1 commented Apr 14, 2020

Can this be closed now?

@steeve
Copy link
Contributor

@steeve steeve commented Apr 16, 2020

I think, no problems on our side anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.