Gomobile bind fails to find cgo libraries

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)?


    $ go version
    go version go1.14.1 darwin/amd64

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"

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.