bimg
bimg copied to clipboard
go build gopkg.in/h2non/bimg.v1: invalid flag in pkg-config --cflags: -Xpreprocessor
my go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/zzz/Library/Caches/go-build"
GOENV="/Users/zzz/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/zzz/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/local/Cellar/go/1.14.2_1/libexec"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.2_1/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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/cm/36h2xt1s0tddycbx3wbc1qhw0000gn/T/go-build965641162=/tmp/go-build -gno-record-gcc-switches -fno-common"
please try:
export CGO_CFLAGS_ALLOW="-Xpreprocessor"
please try:
export CGO_CFLAGS_ALLOW="-Xpreprocessor"
This worked for me!
Also, may be helpful to note in the READ.me that users must have pkg-config
installed.
May be obvious but I ran into an issue, (right before this one), complaining that the "pkg-config" executable could not be found in $PATH.
All I had to do was: brew install pkg-config
and then the above mentioned export, and that got me up and running.
Thanks again!
All I had to do was: brew install pkg-config and then the above mentioned export, and that got me up and running.
+1, up and running now thanks!
Has anyone tried doing this delve ? This runs without delve when I do go run main.go but doesnt work with delve
doesnt
The same to you,have you resolved it?