Skip to content

x/sys: gomobile build failed for x/crypto/ssh/terminal #22727

Description

@bonly

Please answer these questions before submitting your issue. Thanks!

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

1.9.2 darwin/amd64

Does this issue reproduce with the latest release?

gomobile bind -v -x target ios myModule

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Volumes/opt/go.my"
GORACE=""
GOROOT="/Volumes/opt/go"
GOTOOLDIR="/Volumes/opt/go/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/fr/rwmjkhj940l99k591w076wvm0000gp/T/go-build769283346=/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"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

package myPackage

import (
"fmt"
_"golang.org/x/crypto/ssh/terminal"
_"golang.org/x/net/ipv4"
)

//export Fnc
func Fnc(){
  fmt.Printf("hhhh\n");
}

What did you expect to see?

buid sucess and got a static lib for xcode project

What did you see instead?

GOPATH=`pwd`:/Volumes/opt/go.my; GOARCH=arm64; GOOS=darwin; CGO_ENABLED=1; \
	gomobile bind -v -x -target ios ios
GOMOBILE=/Volumes/opt/go.my/pkg/gomobile
WORK=/var/folders/fr/rwmjkhj940l99k591w076wvm0000gp/T/gomobile-work-865984906
write /var/folders/fr/rwmjkhj940l99k591w076wvm0000gp/T/gomobile-work-865984906/src/gomobile_bind/interfaces.go
mkdir -p $WORK/src/gomobile_bind
write /var/folders/fr/rwmjkhj940l99k591w076wvm0000gp/T/gomobile-work-865984906/gen/src/ObjC/interfaces.go
mkdir -p $WORK/gen/src/ObjC
write /var/folders/fr/rwmjkhj940l99k591w076wvm0000gp/T/gomobile-work-865984906/src/gomobile_bind/interfaces.h
mkdir -p $WORK/src/gomobile_bind
write /var/folders/fr/rwmjkhj940l99k591w076wvm0000gp/T/gomobile-work-865984906/src/gomobile_bind/interfaces.m
mkdir -p $WORK/src/gomobile_bind
GOOS=darwin GOARCH=arm GOARM=7 CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CGO_CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk -miphoneos-version-min=6.1 -arch armv7 CGO_LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk -miphoneos-version-min=6.1 -arch armv7 CGO_ENABLED=1 GOPATH=$WORK/gen:$HOME/game2:$GOROOT.my go install -pkgdir=$GOMOBILE/pkg_darwin_arm -tags ios -v -x ios
WORK=/var/folders/fr/rwmjkhj940l99k591w076wvm0000gp/T/go-build631284828
golang.org/x/sys/unix
mkdir -p $WORK/golang.org/x/sys/unix/_obj/
mkdir -p $WORK/golang.org/x/sys/
cd /Volumes/opt/go.my/src/golang.org/x/sys/unix
/Volumes/opt/go/pkg/tool/darwin_amd64/compile -o $WORK/golang.org/x/sys/unix.a -trimpath $WORK -shared -goversion go1.9.2 -p golang.org/x/sys/unix -buildid c8254e6d47d96859d437468aa6d2e996ee3d8ade -dwarf=false -D _/Volumes/opt/go.my/src/golang.org/x/sys/unix -I $WORK -I /Volumes/opt/go.my/pkg/gomobile/pkg_darwin_arm -pack -asmhdr $WORK/golang.org/x/sys/unix/_obj/go_asm.h ./constants.go ./dev_darwin.go ./dirent.go ./endian_little.go ./env_unix.go ./env_unset.go ./flock.go ./pagesize_unix.go ./race0.go ./sockcmsg_unix.go ./str.go ./syscall.go ./syscall_bsd.go ./syscall_darwin.go ./syscall_darwin_arm.go ./syscall_unix.go ./syscall_unix_gc.go ./timestruct.go ./zerrors_darwin_arm.go ./zsyscall_darwin_arm.go ./zsysnum_darwin_arm.go ./ztypes_darwin_arm.go
golang.org/x/sys/unix
/Volumes/opt/go.my/src/golang.org/x/sys/unix/zsyscall_darwin_arm.go:224:23: undefined: SYS___SYSCTL
rm -r -f "$WORK"
gomobile: go install -pkgdir=/Volumes/opt/go.my/pkg/gomobile/pkg_darwin_arm -tags ios -v -x ios failed: exit status 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions