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

Building for iOS with gomobile fails with: undefined: syscall.O_DSYNC #4524

Closed
wehriam opened this issue Dec 27, 2017 · 6 comments
Closed

Building for iOS with gomobile fails with: undefined: syscall.O_DSYNC #4524

wehriam opened this issue Dec 27, 2017 · 6 comments
Labels
kind/bug A bug in existing code (including security flaws) topic/build Topic build topic/ios Topic ios

Comments

@wehriam
Copy link

wehriam commented Dec 27, 2017

Version information:

N/A

Type:

Bug

Severity:

Low

Description:

Building for iOS with gomobile fails with an undefined: syscall.O_DSYNC error associated with Badger, see lines 23-25.

Compiling with Go 1.10 beta throws the same error.

saucer:ipfs-ios wehriam$ gomobile build -target=ios github.com/ipfs/go-ipfs/cmd/ipfs
gomobile: go build -pkgdir=/Users/wehriam/go/pkg/gomobile/pkg_darwin_arm -tags ios -o=/var/folders/2s/cx9fndsd5md4yxcrx6z50rch0000gn/T/gomobile-work-919090730/arm github.com/ipfs/go-ipfs/cmd/ipfs failed: exit status 2
# gx/ipfs/QmXtSA4dxoDKMzhHkwqeoBoBYASov1ZWnLQo38juKNbe3z/badger/y
../../go/src/gx/ipfs/QmXtSA4dxoDKMzhHkwqeoBoBYASov1ZWnLQo38juKNbe3z/badger/y/file_dsync.go:24:21: undefined: syscall.O_DSYNC
saucer:ipfs-ios wehriam$ go version
go version go1.9.2 darwin/amd64
saucer:ipfs-ios wehriam$ gomobile version
gomobile version +50b7067 Sun Dec 17 15:46:28 2017 +0000 (android,ios); androidSDK=/Users/wehriam/Library/Android/sdk/platforms/android-26
saucer:ipfs-ios wehriam$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/wehriam/go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2s/cx9fndsd5md4yxcrx6z50rch0000gn/T/go-build097124384=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
saucer:ipfs-ios wehriam$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.13.1 (17B1003)
      Kernel Version: Darwin 17.2.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: saucer
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 6 days 23:51

Thanks:

Huge thanks to the contributors and maintainers of the go-ipfs project and IPFS community at large. You do great work with huge impact.

@wehriam
Copy link
Author

wehriam commented Dec 27, 2017

See also:

@Stebalien
Copy link
Member

There was an issue in badger and has been recently fixed. Unfortunately, the recent fix wasn't quite correct. The new fix is at dgraph-io/badger#378. Once that gets merged, we'll bubble it up to here.

  • issue building ipfs for ios #4210 has been fixed (forgot to close it).
  • We have no information on that crashing issue so we can't really debug it. It may have already been fixed, for all we know (it has been a year).
  • With regards to the android issue, I believe the reporter was trying to use go-ipfs as a library.

@Stebalien Stebalien added kind/bug A bug in existing code (including security flaws) topic/build Topic build topic/ios Topic ios labels Dec 27, 2017
@wehriam
Copy link
Author

wehriam commented Dec 27, 2017

Thanks @Stebalien - just mentioned those others for your reference in case they were helpful in resolving this one.

@Stebalien
Copy link
Member

@magik6k this has now been fixed in badger. Mind updating go-ds-badger?

@magik6k
Copy link
Member

magik6k commented Jan 29, 2018

So you can now close issues cross-repo, fun.. Keeping this open until it's in merged to master.

@Stebalien mind including this in #4610?

@magik6k magik6k reopened this Jan 29, 2018
@Stebalien Stebalien mentioned this issue Jan 29, 2018
1 task
@Stebalien
Copy link
Member

@magik6k done.

AFDudley pushed a commit to vulcanize/go-ipfs that referenced this issue Mar 22, 2018
fixes ipfs#4524

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/build Topic build topic/ios Topic ios
Projects
None yet
Development

No branches or pull requests

3 participants