$ pacman -Q glibc
glibc 2.38-1
$ go version
go version go1.20.7 linux/amd64
$ go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.20.0
# github.com/pganalyze/pg_query_go/v4/parser
src_port_snprintf.c:374:1: error: conflicting types for ‘strchrnul’; have ‘const char *(const char *, int)’
374 | strchrnul(const char *s, int c)
| ^~~~~~~~~
In file included from /home/mvdan/go/pkg/mod/github.com/pganalyze/pg_query_go/v4@v4.2.1/parser/include/c.h:61,
from src_port_snprintf.c:62:
/usr/include/string.h:286:14: note: previous declaration of ‘strchrnul’ with type ‘char *(const char *, int)’
286 | extern char *strchrnul (const char *__s, int __c)
| ^~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-deprecated-non-prototype’ may have been intended to silence earlier diagnostics
I think the cause here is that Arch Linux recently updated from glibc 2.37 to 2.38, so the header at /usr/include/string.h likely changed considerably.
I build this library via https://github.com/sqlc-dev/sqlc, and recently it's started failing the C build:
I think the cause here is that Arch Linux recently updated from glibc 2.37 to 2.38, so the header at /usr/include/string.h likely changed considerably.