cmd/go: go mod vendor and cgo preambles #29479
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
wget https://github.com/gohugoio/hugo/archive/v0.53.tar.gz
tar -xzf v0.53.tar.gz
cd hugo-0.53
go mod vendor
CGO_ENABLED=1 go build -mod=vendor -a -v -tags extended
What did you expect to see?
A successful build
What did you see instead?
github.com/wellington/go-libsass/libs
vendor/github.com/wellington/go-libsass/libs/encoding.go:4:11: fatal error: sass/context.h: No such file or directory
// #include "sass/context.h"
^~~~~~~~~~~~~~~~
compilation terminated.
What do you think happened?
cgo can't find it's preamble, I think "go mod vendor" doesn't look for cgo dependencies of build tags. If I run "go build" without the vendor only flag, it works fine.
The text was updated successfully, but these errors were encountered: