bored-spoon-8371012/02/2022, 6:11 PM
after that, I got the following error:
The concerned package is an indirect dependency of the Go Pulumi SDK:
# <http://github.com/pjbgf/sha1cd/cgo|github.com/pjbgf/sha1cd/cgo> vendor/github.com/pjbgf/sha1cd/cgo/sha1.go:3:11: fatal error: lib/sha1.h: No such file or directory 3 | // #include <lib/sha1.h> | ^~~~~~~~~~~~ compilation terminated. error: error in compiling Go: unable to run `go build`: exit status 2
I did some search and I came across this pull request which should have solved the problem: https://github.com/pjbgf/sha1cd/pull/5. However, this is not the case because Pulumi doesn’t seem to build Go programs using
❯ go mod why <http://github.com/pjbgf/sha1cd/cgo|github.com/pjbgf/sha1cd/cgo> # <http://github.com/pjbgf/sha1cd/cgo|github.com/pjbgf/sha1cd/cgo> <my-pulumi-go-project> <http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi> <http://github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin|github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin> <http://github.com/pulumi/pulumi/sdk/v3/go/common/workspace|github.com/pulumi/pulumi/sdk/v3/go/common/workspace> <http://github.com/go-git/go-git/v5/plumbing|github.com/go-git/go-git/v5/plumbing> <http://github.com/go-git/go-git/v5/plumbing/hash|github.com/go-git/go-git/v5/plumbing/hash> <http://github.com/pjbgf/sha1cd/cgo|github.com/pjbgf/sha1cd/cgo>
. What’s the reason why
is not used?
many-telephone-4902512/02/2022, 7:15 PM
and maybe share your project (or parts of it, as possible)?
bored-spoon-8371012/02/2022, 9:31 PM
The root cause seems to be the vendoring: github.com/pjbgf/sha1cd/cgo includes C files in github.com/pjbgf/sha1cd/cgo/lib and vendoring of a package doesn’t include subfolders. However, using
CLI Version 3.48.0 Go Version go1.19.2 Go Compiler gc Plugins NAME VERSION go unknown Host OS fedora Version 37 Arch x86_64 This project is written in go: executable='/usr/bin/go' version='go version go1.19.1 linux/amd64' Current Stack: test TYPE URN pulumi:pulumi:Stack urn:pulumi:test::cgo::pulumi:pulumi:Stack::cgo-test Found no pending operations associated with test Backend Name toolbox URL file://. User yann Organizations Pulumi locates its logs in /tmp by default warning: Failed to get information about the Pulumi program's dependencies: failed to get modules: exit status 1
makes it work.
many-telephone-4902512/04/2022, 1:27 PM
bored-spoon-8371012/04/2022, 1:39 PM