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 · 16 comments

Comments

Projects
None yet
10 participants
@sashabaranov
Copy link

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

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

Might be related to #25297 #25704 #28517

@sashabaranov

This comment has been minimized.

Copy link
Author

commented Nov 30, 2018

Go 1.10.4 does not cause such problem

@agnivade

This comment has been minimized.

Copy link
Member

commented Dec 2, 2018

@zhoujian12

This comment has been minimized.

Copy link

commented Feb 1, 2019

I also has this problem in version 1.11.4

@eliasnaur

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

commented Feb 1, 2019

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

@girish-koundinya

This comment has been minimized.

Copy link

commented Feb 2, 2019

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

@steeve

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2019

@steeve

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2019

Apparently the offending command is:

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

cmd/link/internal/ld: fix c-archive mach-o compatibility
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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

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

@champo

This comment has been minimized.

Copy link

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.