You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go run -mod=mod github.com/sqlc-dev/sqlc/cmd/sqlc generate
Getting the log:
Relevant log output
# github.com/pganalyze/pg_query_go/v5/parser
src_port_snprintf.c:374:1: error: static declaration of 'strchrnul' follows non-static declaration
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: previous declaration is here
src_port_snprintf.c:438:27: warning: 'strchrnul' is only available on macOS 15.4 or newer [-Wunguarded-availability-new]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
src_port_snprintf.c:438:27: note: enclose 'strchrnul'in a __builtin_available check to silence this warning
Database schema
Any schema
SQL queries
Any queries
Configuration
Fails even without any config
Playground URL
I think it's clear without it
What operating system are you using?
MacOS 15.4
What database engines are you using?
Postgres
What type of code are you generating?
Go code
Reacted by John Mullins, Hisham Khalifa, Vlad Miller, Florian Billot, Vegard Solheim Theriault, Paul Gross, Cory, Himmet Avsar, Edwin, Ankit Patial and 19 more
This is a temporary solution that worked for me until it gets fixed.
Reacted by Joe McCall, Hisham Khalifa, Harsh Raj, Gligor Gudjevski, Florian Billot, Tim Schaub, Rob, Eugene Glybin, Paul Lantow, Michael Lunøe and 2 more
Reacted by Rob, Michael Lunøe, Ihor Bukin and Marin Bezhanov
Not sure if this helps. I stumbled across this issue while looking for a solution to the same problem with the ruby gem pg_query. pganalyze/pg_query#327
If I understand correctly, we need the pg_query_go upgrade (which is part of #3922) and then we need a new release of sqlc. Any chance we can get a timeline on these changes? Thanks!
Reacted by Kyle Gray, Connor McCarthy and Cesar Alvarado P.
@vladmiller the latest main should not include any references to github.com/pganalyze/pg_query_go/v5. I've verified that it doesn't exist in go.mod or go.sum
painfully, if you're stuck on 15.2 then this seems to happen;
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
# github.com/pganalyze/pg_query_go/v5/parser
src_port_snprintf.c:374:1: error: static declaration of 'strchrnul' follows non-static declaration
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: previous declaration is here
src_port_snprintf.c:438:27: warning: 'strchrnul' is only available on macOS 15.4 or newer [-Wunguarded-availability-new]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
src_port_snprintf.c:438:27: note: enclose 'strchrnul' in a __builtin_available check to silence this warning
On Tue, Apr 15, 2025 at 12:28 Nathan Ollerenshaw ***@***.***> wrote:
painfully, if you're stuck on 15.2 then this seems to happen;
go install ***@***.***
# github.com/pganalyze/pg_query_go/v5/parser
src_port_snprintf.c:374:1: error: static declaration of 'strchrnul' follows non-static declaration
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: previous declaration is here
src_port_snprintf.c:438:27: warning: 'strchrnul' is only available on macOS 15.4 or newer [-Wunguarded-availability-new]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
src_port_snprintf.c:438:27: note: enclose 'strchrnul' in a __builtin_available check to silence this warning
I'll make sure my SDK is up to date.
—
Reply to this email directly, view it on GitHub
<#3916 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAIQTJILVRNV454PUPNQSD2ZVMVNAVCNFSM6AAAAAB2JOQCDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXGI3DGNZRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*matjam* left a comment (sqlc-dev/sqlc#3916)
<#3916 (comment)>
painfully, if you're stuck on 15.2 then this seems to happen;
go install ***@***.***
# github.com/pganalyze/pg_query_go/v5/parser
src_port_snprintf.c:374:1: error: static declaration of 'strchrnul' follows non-static declaration
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: previous declaration is here
src_port_snprintf.c:438:27: warning: 'strchrnul' is only available on macOS 15.4 or newer [-Wunguarded-availability-new]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
src_port_snprintf.c:438:27: note: enclose 'strchrnul' in a __builtin_available check to silence this warning
I'll make sure my SDK is up to date.
—
Reply to this email directly, view it on GitHub
<#3916 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAIQTJILVRNV454PUPNQSD2ZVMVNAVCNFSM6AAAAAB2JOQCDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXGI3DGNZRGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
Alright, sadly the release workflow is borked right now due to some Apple code signing issues. I'm going to be traveling, so I'm not sure a release will happen in the next 10 days. I could tag a new release and not provide binaries, but that would cause more confusion.
In the meantime, please install from main which fixes this issue.
$ go install github.com/sqlc-dev/sqlc/cmd/sqlc@main
Activity
hishamk commentedon Apr 2, 2025
Same error as well
hishamk commentedon Apr 2, 2025
Set
export MACOSX_DEPLOYMENT_TARGET=15.4But the static declaration is causing issues:
jrmullins commentedon Apr 2, 2025
I was able to get around this by adding this to my zshrc
export CGO_CFLAGS="-DHAVE_STRCHRNUL"havsar commentedon Apr 2, 2025
export CGO_CFLAGS="-DHAVE_STRCHRNUL -mmacosx-version-min=15.4"export MACOSX_DEPLOYMENT_TARGET="15.4"This is a temporary solution that worked for me until it gets fixed.
nginx-nickc commentedon Apr 3, 2025
sqlc from
main, withgithub.com/pganalyze/pg_query_go/v6@v6.1.0seems to work too.rubberduck203 commentedon Apr 7, 2025
Not sure if this helps. I stumbled across this issue while looking for a solution to the same problem with the ruby gem
pg_query.pganalyze/pg_query#327
pgr0ss commentedon Apr 7, 2025
If I understand correctly, we need the
pg_query_goupgrade (which is part of #3922) and then we need a new release ofsqlc. Any chance we can get a timeline on these changes? Thanks!kyleconroy commentedon Apr 8, 2025
Yep! New release was supposed to go out last week, but I'm glad I waited for pg_query_go 6.1.0 to land
kyleconroy commentedon Apr 11, 2025
The upgrade to pg_query_go 6.1.0 has been merged. For those that can, please build from main and let me know if your issue is fixed.
connor15mcc commentedon Apr 14, 2025
The upgraded
pg_query_go(from main) fixes this for me. Thanks! Will wait for a release2 remaining items
kyleconroy commentedon Apr 14, 2025
@vladmiller the latest main should not include any references to
github.com/pganalyze/pg_query_go/v5. I've verified that it doesn't exist in go.mod or go.sumWillAbides commentedon Apr 14, 2025
The current HEAD (b4f2571) works for me on macos 15.4.
vladmiller commentedon Apr 15, 2025
@kyleconroy yay! Latest
mainworks fine. Thank you!In docs, one way to install sqlc is
and latest points to the version that was released in January. I'd suggest maybe do a GH release as well or update the docs.
And, the side note – thank you for building sqlc! The thing is amazing and has helped a lot!
matjam commentedon Apr 15, 2025
painfully, if you're stuck on 15.2 then this seems to happen;
I'll make sure my SDK is up to date.
kyleconroy commentedon Apr 15, 2025
macrael commentedon Apr 15, 2025
Who has the power to cut a new release? We're on v1.28.0 which is still broken and would rather update to a real release rather than main
kyleconroy commentedon Apr 16, 2025
That's me! Been busy at work but trying to create a release in the next two days. Thanks for understanding.
kyleconroy commentedon Apr 16, 2025
Alright, sadly the release workflow is borked right now due to some Apple code signing issues. I'm going to be traveling, so I'm not sure a release will happen in the next 10 days. I could tag a new release and not provide binaries, but that would cause more confusion.
In the meantime, please install from
mainwhich fixes this issue.kyleconroy commentedon Apr 17, 2025
1.29.0 is out!
macrael commentedon Apr 17, 2025
Thanks so much!
Update sqlc from v1.27.0 to v1.30.0
Update sqlc from v1.27.0 to v1.30.0 (#4608)
Update sqlc from v1.27.0 to v1.30.0 (armadaproject#4608)