Skip to content

I want to run a go project on iOS , but I have some issues #27620

Closed
@a303268287

Description

@a303268287

Please answer these questions before submitting your issue. Thanks!

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

go version go1.11 darwin/amd64

Does this issue reproduce with the latest release?

YES

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

GOARCH="amd64"
GOBIN="/Users/xunlongorangepi/Downloads/syncthing-ios-cc/syncthing-ios/golang/bin"
GOCACHE="/Users/xunlongorangepi/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/xunlongorangepi/Downloads/syncthing-ios-cc/syncthing-ios/golang"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
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/4h/l8y1t21j4mj08y8zrm9js2tw0000gn/T/go-build220311633=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

et -e
echo "Done 1"

HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
GO=$HOME/golang/bin/go

if [ ! -d "$HOME/cgo-obj" ]; then
mkdir $HOME/cgo-obj
fi

if [ ! -d "$HOME/go-obj" ]; then
mkdir $HOME/go-obj
fi

echo "Done 2"
CGO_ENABLED=1 GOARCH=arm64 GOARM=7 $GO tool cgo -objdir $HOME/cgo-obj
$HOME/syncthing/src/github.com/syncthing/syncthing/cmd/syncthing/main.go
echo "Done 3"
GOPATH=$HOME/syncthing CGO_ENABLED=1 GOARCH=arm64
$GO build -v -o syncthing-exc
-ldflags "-tmpdir $HOME/go-obj -linkmode external"
github.com/syncthing/syncthing/cmd/syncthing
echo "Done 4"
run the shell with xcode

What did you expect to see?

get files in the go-obj/

What did you see instead?

when I run it on xcode
1
when I run it on terminal
2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions