aerospike / aerospike-client-go

Aerospike Client Go
Apache License 2.0
433 stars 199 forks source link

Use of internal package (atomic;lua;particle_type) not allowed, while building with gollvm #317

Closed advancedwebdeveloper closed 3 years ago

advancedwebdeveloper commented 4 years ago

Hi. Was not able to find any module metadata - so "go mod vendor" couldn't be of help, here.

I tried to do

$go build -i -v -x inside project's root folder - but caught these errors:

WORK=/tmp/go-build672390171 package . client.go:33:2: use of internal package github.com/aerospike/aerospike-client-go/internal/atomic not allowed package . client_appengine_exclusions.go:24:2: use of internal package github.com/aerospike/aerospike-client-go/internal/lua not allowed package . command.go:30:2: use of internal package github.com/aerospike/aerospike-client-go/internal/particle_type not allowed

advancedwebdeveloper commented 4 years ago

$go env && go version

GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/tools" GCCGO="/usr/local/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/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=/tmp/go-build819237923=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

advancedwebdeveloper commented 4 years ago

Removed conflicting packages:

$rm -Rf ~/go/src/github.com/aerospike/aerospike-client-go/internal/atomic $rm -Rf ~/go/src/github.com/aerospike/aerospike-client-go/internal/lua $rm -Rf ~/go/src/github.com/aerospike/aerospike-client-go/internal/particle_type

and ran

$ go get -u github.com/aerospike/aerospike-client-go

bad luck:

cannot find package "github.com/aerospike/aerospike-client-go/internal/atomic" in any of: /usr/local/src/github.com/aerospike/aerospike-client-go/internal/atomic (from $GOROOT) /home/oceanfish81/go/src/github.com/aerospike/aerospike-client-go/internal/atomic (from $GOPATH) cannot find package "github.com/aerospike/aerospike-client-go/internal/lua" in any of: /usr/local/src/github.com/aerospike/aerospike-client-go/internal/lua (from $GOROOT) /home/oceanfish81/go/src/github.com/aerospike/aerospike-client-go/internal/lua (from $GOPATH) cannot find package "github.com/aerospike/aerospike-client-go/internal/particle_type" in any of: /usr/local/src/github.com/aerospike/aerospike-client-go/internal/particle_type (from $GOROOT) /home/oceanfish81/go/src/github.com/aerospike/aerospike-client-go/internal/particle_type (from $GOPATH)

advancedwebdeveloper commented 4 years ago

Exporting a proper path for GOROOT env. var. did not helm either:

$ export GOPATH="/home/oceanfish81/go" re-ran "go get ..." but the bug is the same

advancedwebdeveloper commented 4 years ago

CC @ksedgwic

khaf commented 4 years ago

You should first set the GOPATH, make sure github.com/aerospike/aerospike-client-go does not exist on that path, and then go get github.com/aerospike/aerospike-client-go. We do not officially support nor test this library on gollvm, but this should do the trick.

khaf commented 3 years ago

I'll go ahead and close this ticket. Feel free to reopen, or report new issues.