x/mobile: gomobile bind fails to find cgo library

41 views
Skip to first unread message

onthest...@gmail.com

unread,
Apr 14, 2020, 1:05:34 AM4/14/20
to golang-nuts
It seems like "gomobile" bind command cannot find CGO libraries. 
I enabled CGO, and still, the issue remains the same.
I would really appreciate it if someone could help me with this matter.

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

<pre>

    $ go version
    go version go1.14.1 darwin/amd64

</pre>

### Does this issue reproduce with the latest release?
Yes


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

    $ go env
    
    GO111MODULE=""
    GOARCH="amd64"
    GOBIN=""
    GOCACHE="/Users/younseo/Library/Caches/go-build"
    GOENV="/Users/younseo/Library/Application Support/go/env"
    GOEXE=""
    GOFLAGS=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOINSECURE=""
    GONOPROXY=""
    GONOSUMDB=""
    GOOS="darwin"
    GOPATH="/Users/younseo/go"
    GOPRIVATE=""
    GOPROXY="https://proxy.golang.org,direct"
    GOROOT="/usr/local/opt/go/libexec"
    GOSUMDB="sum.golang.org"
    GOTMPDIR=""
    GOTOOLDIR="/usr/local/opt/go/libexec/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/yq/4rz_9mts3w725cccjrp66pxm0000gn/T/go-build490416867=/tmp/go-build -gno-record-gcc-switches -fno-common"

</pre></details>

### What did you do?

    $gomobile bind -target ios
    $gomobile bind -target android




### What did you expect to see?
*.arr, *.jar, Framework files being generated 



### What did you see instead?
gomobile bind failed to find cgo libraries.  

[![enter image description here][1]][1]



Reply all
Reply to author
Forward
0 new messages