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

Installation errors "go install" #1473

Closed
nakem1 opened this issue Mar 5, 2022 · 5 comments
Closed

Installation errors "go install" #1473

nakem1 opened this issue Mar 5, 2022 · 5 comments
Labels
bug Something isn't working 💻 darwin question Further information is requested upstream Issue is caused by a dependency

Comments

@nakem1
Copy link

nakem1 commented Mar 5, 2022

Version

1.12.0

go version go1.17.5

What happened?

../vendor/github.com/pganalyze/pg_query_go/v2/parser/parser.go:6:10: fatal error: pg_query.h: No such file or directory
#include "pg_query.h"
^~~~~~~~~~~~

What operating system are you using?

macOS(darwin/amd64)

What database engines are you using?

PostgreSQL

What type of code are you generating?

Go

@nakem1 nakem1 added bug Something isn't working triage New issues that hasn't been reviewed labels Mar 5, 2022
@kyleconroy
Copy link
Collaborator

I notice you're using Go 1.12. Building sqlc requires Go >= 1.16. Once you've upgraded to that version, let me know if you're still seeing this bug

@kyleconroy
Copy link
Collaborator

Oops, after reading this again, 1.12 is the sqlc version.

What version of Go are you using?

@kyleconroy kyleconroy added 💻 darwin question Further information is requested and removed triage New issues that hasn't been reviewed labels Mar 15, 2022
@zmitry
Copy link

zmitry commented Apr 1, 2022

same for me
go 1.17
sqlc version from main

@flicaflow
Copy link

I'm seeing the same problem after I tried to vendor my dependencies. Reason seems to be that the include sub-folder below parser does not make it into the vendor tree.
Are you vendor as well?

This issue explains it golang/go#26366 .
Solution from the sqlcs end would be to move the .h files in the parser package instead of having them in the include folder which apparently gets dropped because there are no go files in it. Also putting a dummy go file in the include dir could work (don't know if that needs to get used to not be dropped by vendoring).

@kyleconroy kyleconroy added the upstream Issue is caused by a dependency label Aug 8, 2022
@ryanrolds
Copy link

The instructions on the module with the vendoring issue resolved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 💻 darwin question Further information is requested upstream Issue is caused by a dependency
Projects
None yet
Development

No branches or pull requests

5 participants