The flux readme advises to install pkg-config and a „pkg-config wrapper“. IMHO, the instructions for installing the wrapper are outdated. „go get“ downloads only, but does not compile and install a binary.
Try using go install instead:
go install github.com/influxdata/pkg-config@latest
Then use which -a pkg-config to verify it the wrapper is found before the actual pkg-config binary.
I see and thank you for your answer
The thing is that with 1.19.7 it wasn’t required…
And from my perspective it is kind of a regression…
Coz’ I don’t think for testing I need to have pkg-config…
I’m working on Windows… so why do I need pkg-config?
I see your point. I have no idea what might have changed.
In any case, the error message is clear: go test cannot find the binary pkg-config (or rather, the wrapper) in $PATH. The first step would thus be to ensure that the binary and the wrapper are installed.
Curious: have you tried rolling back to Go 1.19 and repeat the test? I wonder if the problem is with Go or rather with the latest flux release that was published two weeks ago.
And there is an interesting detail in the flux repo:
The error message occurs for go build github.com/influxdata/flux/libflux/go/libflux.
Chances are that this fix breaks path handling on Windows.
I have no better explanation at the moment. If the binary and the wrapper are properly installed and the error does not go away, I’d suggest reaching out to the flux team; they would be in a better position to track down the source of this error.