Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation with go 1.22 #52

Open
antonijakubiak-samsung opened this issue May 7, 2024 · 1 comment
Open

Compilation with go 1.22 #52

antonijakubiak-samsung opened this issue May 7, 2024 · 1 comment

Comments

@antonijakubiak-samsung
Copy link

Hi,

Compilation fails with go 1.22.

make USE_PGXS=1 with_llvm=no GO_CLIENT=1
[...]
go build -buildmode=c-archive query.go
query.go:67:2: no required module provides package github.com/influxdata/influxdb1-client/models: go.mod file not found in current directory or any parent directory; see 'go help modules'
query.go:68:2: no required module provides package github.com/influxdata/influxdb1-client/v2: go.mod file not found in current directory or any parent directory; see 'go help modules'
make: *** [Makefile:95: query.a] Error 1

A fix is to add go.mod file.

module github.com/pgspider/influxdb_fdw

go 1.22

require github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect

Kind regards
Antoni Jakubiak

@weiting1lee
Copy link
Contributor

weiting1lee commented May 15, 2024

@antonijakubiak-samsung

Thank you for highlighting the issue with Go 1.22. I have confirmed that your suggestion to add a go.mod file is correct. Alternatively, to resolve the problem, I initialized the Go module and added the necessary dependencies with the following commands:

go mod init github.com/pgspider/influxdb_fdw
go get github.com/influxdata/influxdb1-client/v2
go mod tidy

I will consider adding the go.mod file to the repository in the next update. Thanks again for your valuable input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants