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

[IOS] gomobile bind -v -target ios github.com/ethereum/go-ethereum/mobile #20160

Closed
whoerau opened this issue Oct 10, 2019 · 7 comments
Closed

Comments

@whoerau
Copy link

whoerau commented Oct 10, 2019

System information

  • Geth version: geth version=1.9.6
  • OS & Version: OSX=10.14.6
  • Xcode version 11.1
  • gomobile version : gomobile version +6d0d39b Wed Oct 2 17:59:09 2019 +0000 (android,ios); androidSDK=
  • go env

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/anonymous/Library/Caches/go-build"
GOENV="/Users/anonymous/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/anonymous/go"
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=""
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/fb/xsktp2t146j0gmgv5nct16z00000gn/T/go-build993821391=/tmp/go-build -gno-record-gcc-switches -fno-common"

Expected behaviour

  • generate framework

Actual behaviour

  • gomobile bind failed
github.com/ethereum/go-ethereum/vendor/github.com/elastic/gosigar
github.com/ethereum/go-ethereum/vendor/github.com/elastic/gosigar/sigar_darwin.go:12:10: fatal error: 'libproc.h' file not found
#include <libproc.h>
         ^~~~~~~~~~~
1 error generated.

Steps to reproduce the behaviour

  • I have already installed the Xcode(version 11.1) and Command LIne Tools for Xcode 11
  • gomobile bind -v -target ios github.com/ethereum/go-ethereum/mobile

Backtrace

➜  src gomobile bind  -v -target ios github.com/ethereum/go-ethereum/mobile
runtime/cgo
golang.org/x/mobile/internal/mobileinit
os/user
github.com/ethereum/go-ethereum/vendor/github.com/karalabe/usb
github.com/ethereum/go-ethereum/crypto/secp256k1
net
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
# github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
github.com/ethereum/go-ethereum/vendor/gopkg.in/olebedev/go-duktape.v3
github.com/ethereum/go-ethereum/vendor/github.com/elastic/gosigar
# github.com/ethereum/go-ethereum/vendor/github.com/elastic/gosigar
github.com/ethereum/go-ethereum/vendor/github.com/elastic/gosigar/sigar_darwin.go:12:10: fatal error: 'libproc.h' file not found
#include <libproc.h>
         ^~~~~~~~~~~
1 error generated.
github.com/ethereum/go-ethereum/rpc
gomobile: darwin-arm: /usr/local/go/bin/go build -tags ios -v -buildmode=c-archive -o /var/folders/fb/xsktp2t146j0gmgv5nct16z00000gn/T/gomobile-work-330301147/geth-arm.a gobind failed: exit status 2
@c20liu
Copy link

c20liu commented Oct 17, 2019

I build one old version, there is no problem, after updating go-ethereum to the latest version, I also run into this problem

@whoerau
Copy link
Author

whoerau commented Oct 17, 2019

@c20liu Indeed it is

@Jinxiansen
Copy link

@c20liu Yes, can you share your old version? I also have this problem in the new edition.

@GuiltyMorishita
Copy link
Contributor

I was able to bind with [email protected].

@ngo275
Copy link

ngo275 commented Jun 16, 2020

elastic/gosigar#134

Got the same issue. In my case, the root cause was this. Ended up using [email protected].

@whoerau
Copy link
Author

whoerau commented Jun 16, 2020

@ngo275 thank you, I will close the issues

@whoerau
Copy link
Author

whoerau commented Jun 16, 2020

elastic/gosigar#134

Got the same issue. In my case, the root cause was this. Ended up using [email protected].

@onemedicine

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

No branches or pull requests

7 participants