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: "runtime/cgo: chdir" error appears in debug log on startup on iOS #41156

Open
curyous opened this issue Sep 1, 2020 · 1 comment
Open

Comments

@curyous
Copy link

@curyous curyous commented Sep 1, 2020

What version of Go are you using (go version)?

1.15

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/<username>/Library/Caches/go-build"
GOENV="/Users/<username>/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/<username>/dev/gowksp/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/<username>/dev/gowksp"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/<username>/dev/gowksp/src/github.com/curyous/adder/go.mod"
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/z8/x3j7np6x1cjbm_44396n2f680000gn/T/go-build960861663=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  • Made a tiny Go package with 1 function.
  • Built it into a framework using gomobile
  • Imported the framework and called the package within Swift code.
  • Debugged the app on on iPhone.

Here is an example project that produces the error:
https://github.com/curyous/gomobile-bug

What did you expect to see?

No problems logged on startup.

What did you see instead?

In debug log:

runtime/cgo: chdir(/private/var/containers/Bundle/Application/3CB0E6B1-721E-45F6-9C38-CA0EB8D971E6/GoMobile%20Bug.app) failed

@gopherbot gopherbot added the mobile label Sep 1, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 1, 2020
@dmitshur dmitshur changed the title x/mobile: Error appears in debug log on startup on iOS. runtime/cgo: chdir x/mobile: "runtime/cgo: chdir" error appears in debug log on startup on iOS Sep 3, 2020
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Sep 3, 2020

/cc @hyangah per owners.

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
3 participants
You can’t perform that action at this time.