invalid flag in pkg-config
lamarios opened this issue · 1 comments
lamarios commented
I'm trying to use the go get command but I'm getting the following error:
go get github.com/rthornton128/goncurses
go build github.com/rthornton128/goncurses: invalid flag in pkg-config --libs: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
OS: Arch linux
ncurses: ncurses-6.2-1
go version
go version go1.15.6 linux/amd64
vsakkas commented
Here's a quick workaround for this:
export CGO_CFLAGS_ALLOW=".*"
export CGO_LDFLAGS_ALLOW=".*"
go get github.com/rthornton128/goncurses
export CGO_CFLAGS_ALLOW=
export CGO_LDFLAGS_ALLOW=
Reset back the flags for security reasons.
Relevant link: https://github.com/golang/go/wiki/InvalidFlag