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

syscall: undefined symbols _readdir_r$INODE64, _fdopendir$INODE64 on iOS simulators #31447

Open
eliasnaur opened this Issue Apr 12, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@eliasnaur
Copy link
Contributor

commented Apr 12, 2019

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

$ go version
go version devel +08e1823a63 Tue Apr 9 05:45:34 2019 +0000 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/elias/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/elias/go"
GOPROXY=""
GORACE=""
GOROOT="/Users/elias/go-tip"
GOTMPDIR=""
GOTOOLDIR="/Users/elias/go-tip/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/elias/go/src/golang.org/x/mobile/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/_7/lnt35k555hl2bs7fjygkhgx00000gp/T/go-build472586928=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go test -short golang.org/x/mobile/bind/objc

What did you expect to see?

no errors

What did you see instead?

...
        	Undefined symbol: _readdir_r$INODE64
        	Undefined symbol: _fdopendir$INODE64
...

This is caused by the fix for #30933, where getdirentries is replaced by calls to readdir_r and fdopendir. Unfortunately, the 64-bit inode versions of those syscalls are suffixed with $INODE64 on macOS but not on iOS. Since Go does not use a separate GOOS for iOS, the error above appear when running on a simulator (amd64).

CC @randall77.

@bcmills bcmills added this to the Go1.13 milestone Apr 12, 2019

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.