Original post

Hello everyone!

So I’m trying to install Openshift 4 but unfortunately, it doesn’t support libvirt by default, so I need to add it through this command: TAGS=libvirt hack/build.sh

but it just keeps complaining about “build from your ${GOPATH}” when I’m actually in my GOPATH. Here’s more details about the issue:

[root@host installer]# echo $GOPATH

/home/ocpinst/dev/git/

[root@host installer]# cat ~/.bash_profile

.....

PATH=$PATH:$HOME/bin

#export GOROOT=/usr/local/go

export GOPATH=/home/ocpinst/dev/git/go

#export GOROOT=/home/ocpinst/dev/lang/go

#export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

export PATH

[root@host installer]# go env

GOARCH="amd64"

GOCACHE="/root/.cache/go-build"

GOENV="/root/.config/go/env"

GOHOSTARCH="amd64"

GOHOSTOS="linux"

GOOS="linux"

GOPATH="/home/ocpinst/dev/git/go"

GOPROXY="direct"

GOROOT="/usr/lib/"

GOSUMDB="off"

GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"

GCCGO="gccgo"

AR="ar"

CC="gcc"

CXX="g++"

CGO_ENABLED="1"

GOMOD="/home/ocpinst/dev/git/go/src/go.mod"

CGO_CFLAGS="-g -O2"

CGO_CXXFLAGS="-g -O2"

CGO_FFLAGS="-g -O2"

CGO_LDFLAGS="-g -O2"

PKG_CONFIG="pkg-config"

GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build492071802=/tmp/go-build -gno-record-gcc-switches"

now when I try to build the installer:

[root@host installer]# pwd

/home/ocpinst/dev/git/go/src/github.com/openshift/installer

[root@host installer]# TAGS=libvirt hack/build.sh

+ minimum_go_version=1.10

++ go version

++ cut -d ' ' -f 3

+ current_go_version=go1.13.3

++ version 1.13.3

++ IFS=.

++ printf '%03d%03d%03dn' 1 13 3

++ unset IFS

++ version 1.10

++ IFS=.

++ printf '%03d%03d%03dn' 1 10

++ unset IFS

+ '[' 001013003 -lt 001010000 ']'

+ LAUNCH_PATH=/home/ocpinst/dev/git/go/src/github.com/openshift/installer

++ dirname hack/build.sh

+ cd hack/..

++ go list -e -f '{{.Dir}}' github.com/openshift/installer

+ PACKAGE_PATH=

+ test -z ''

++ go env GOPATH

+ echo 'build from your ${GOPATH} (/home/ocpinst/dev/git/go/src/github.com/openshift/installer is not in /home/ocpinst/dev/git/go)'

build from your ${GOPATH} (/home/ocpinst/dev/git/go/src/github.com/openshift/installer is not in /home/ocpinst/dev/git/go)

+ exit 1

I’m using “go version go1.13.3 linux/amd64”.

I don’t quite understand the issue here, although I am building in my GOPATH, so technically home/ocpinst/dev/git/go/src/github.com/openshift/installer is in /home/ocpinst/dev/git/go

Can someone please help me fix this issue?

Thank you all for your time.

submitted by /u/miiraheart
[link] [comments]