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

x/mobile/cmd/gomobile: bind fail for ios #64633

Open
cxcel opened this issue Dec 10, 2023 · 1 comment
Open

x/mobile/cmd/gomobile: bind fail for ios #64633

cxcel opened this issue Dec 10, 2023 · 1 comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@cxcel
Copy link

cxcel commented Dec 10, 2023

Go version

go1.21.5 darwin_amd64

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

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/devs/Library/Caches/go-build'
GOENV='/Users/devs/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/devs/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/devs/go'
GOPRIVATE=''
GOPROXY='https://mirrors.aliyun.com/goproxy/,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/devs/gocode/elkmi/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/q_/k5lz0gmj5vzgx79dmwf1jjy00000gn/T/go-build853643340=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

gomobile bind -v -target=ios ./core 

What did you expect to see?

build ok

What did you see instead?

# gobind/gobind
Core_darwin.m:893:13: error: redefinition of '_cmd' with a different type: 'nbyteslice' (aka 'struct nbyteslice') vs 'SEL'
note: previous definition is here
Core_darwin.m:895:42: error: passing 'SEL' to parameter of incompatible type 'nbyteslice' (aka 'struct nbyteslice')
cgo-gcc-export-header-prolog:175:72: note: passing argument to parameter 'param_cmd' here
Core_darwin.m:897:13: error: member reference base type 'SEL' is not a structure or union
# gobind/gobind
Core_darwin.m:893:13: error: redefinition of '_cmd' with a different type: 'nbyteslice' (aka 'struct nbyteslice') vs 'SEL'
note: previous definition is here
Core_darwin.m:895:42: error: passing 'SEL' to parameter of incompatible type 'nbyteslice' (aka 'struct nbyteslice')
cgo-gcc-export-header-prolog:175:72: note: passing argument to parameter 'param_cmd' here
Core_darwin.m:897:13: error: member reference base type 'SEL' is not a structure or union
# gobind/gobind
Core_darwin.m:893:13: error: redefinition of '_cmd' with a different type: 'nbyteslice' (aka 'struct nbyteslice') vs 'SEL'
note: previous definition is here
Core_darwin.m:895:42: error: passing 'SEL' to parameter of incompatible type 'nbyteslice' (aka 'struct nbyteslice')
cgo-gcc-export-header-prolog:175:72: note: passing argument to parameter 'param_cmd' here
Core_darwin.m:897:13: error: member reference base type 'SEL' is not a structure or union
gomobile: iossimulator/amd64: go build -v -buildmode=c-archive -o /var/folders/q_/k5lz0gmj5vzgx79dmwf1jjy00000gn/T/gomobile-work-3616695288/core-iossimulator-amd64.a ./gobind failed: exit status 1
@seankhliao seankhliao changed the title gomobile bind fail for ios x/mobile/cmd/gomobile: bind fail for ios Dec 10, 2023
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Dec 10, 2023
@gopherbot gopherbot added this to the Unreleased milestone Dec 10, 2023
@prattmic prattmic added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 11, 2023
@prattmic
Copy link
Member

cc @hyangah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants