alecthomas / kingpin

CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unexpected directory layout while building linux executable on windows machine

mkc-msit opened this issue · comments

What did I do:
Trying to build an executable for linux on windows machine

commands used:
set GOOS=linux
set GOARCH=amd64
go build -v main.go of my package with kingpin dependency

Issue:
Below message shows up
unexpected directory layout:
import path: github.com/alecthomas/kingpin
root: C:\GIT\Go\src
dir: C:\GIT\Go\src\aa\bb\cc\vendor\github.com\alecthomas\kingpin
expand root: C:\GIT\Go\src
expand dir: C:\GIT\Go\src\aa\bb\cc\vendor\github.com\alecthomas\kingpin
separator: \

Go ENV Below:

set GOARCH=amd64
set GOBIN=
set GOEXE=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=linux
set GOPATH=C:\GIT\Go
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

Sorry, but to be blunt this has nothing to do with Kingpin. This is some kind of setup issue with your environment.