serfreeman1337 / asterlink

Asterisk integration with Bitrix24 and SuiteCRM
MIT License
29 stars 18 forks source link

İssue resolvng a dependency #2

Closed r9host closed 4 years ago

r9host commented 4 years ago

I'm trying to build from scratch but I still get this error: "../../sirupsen/logrus/terminal_check_unix.go:6:8: cannot finad package "golang.org/x/sys/unix" and "go get golang.org/x/sys/unix" fails with error: "no go-import meta tags"

serfreeman1337 commented 4 years ago

Please, post output of following commands:

go version
go env
r9host commented 4 years ago

$ go version go version go1.11.6 linux/arm

$ go env GOARCH="arm" GOBIN="" GOCACHE="/root/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="arm" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go-1.11" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.11/pkg/tool/linux_arm" GCCGO="gccgo" GOARM="6" CC="gcc" CXX="g++" 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 -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build341972499=/tmp/go-build -gno-record-gcc-switches"

serfreeman1337 commented 4 years ago

I don't have access to ARM hardware right now and can't take a look at this issue.

You can setup golang on windows/linux os and compile it for ARM:

set GOOS=linux
set GOARCH=arm
go get
go build

Or use compiled binary from Releases page (Added binary for ARM platform).

r9host commented 4 years ago

Somehow "go get" was unable to fetch the dependecy. I did cloned the project on a CentOS machine then ran the command against it and it worked. Then transferred whole /root/go/src to my RPI box and "go build" was successful and binary is now executable.