- 
                Notifications
    
You must be signed in to change notification settings  - Fork 962
 
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
Version
Other
What happened?
Hello sqlc contributors 👋 !
I was about to start hacking on sqlc, because it lacks some sqlite features that I need. Unfortunately I was unable to run tests. Probably because of some issues with C linker and postgresql parser (I'm not really experienced in that field, its just first assumption).
Have anyone here run into similar issues?
I've pasted go test ./... below.
btw, for anyone who is also somehow blocked because of this issue, on linux everything works great. You can still use docker to run sqlc.
$ docker run --rm -it -v $(pwd):/app golang:1.19 sh -c "cd /app; go generate ./..."
Relevant log output
?   	github.com/kyleconroy/sqlc	[no test files]
# github.com/pganalyze/pg_query_go/v2/parser
In file included from gram.y:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/postgres.h:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/c.h:1330:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/port.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:425:1: error: expected ';' after top level declarator
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:587:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:415:1: note: expanded from here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:563:14: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_3'
In file included from gram.y:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/postgres.h:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/c.h:1330:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/port.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:425:1: error: expected ';' after top level declarator
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:588:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:420:1: note: expanded from here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:567:11: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_4'
In file included from gram.y:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/postgres.h:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/c.h:1330:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/port.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:471:1: error: typedef redefinition with different types ('struct sockaddr_storage *' vs 'struct sockaddr *')
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:587:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:540:38: note: expanded from macro '__CCT_CONTRACT_TO_ATTR'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:429:1: note: expanded from here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:425:1: note: previous definition is here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:588:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:540:38: note: expanded from macro '__CCT_CONTRACT_TO_ATTR'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:421:1: note: expanded from here
In file included from gram.y:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/postgres.h:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/c.h:1330:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/port.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:471:1: error: expected ';' after top level declarator
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:587:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:428:1: note: expanded from here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:563:14: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_3'
In file included from gram.y:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/postgres.h:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/c.h:1330:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/port.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:471:1: error: typedef redefinition with different types ('struct sockaddr_storage *' vs 'struct sockaddr *')
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:588:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:540:38: note: expanded from macro '__CCT_CONTRACT_TO_ATTR'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:6:1: note: expanded from here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:425:1: note: previous definition is here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:588:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:540:38: note: expanded from macro '__CCT_CONTRACT_TO_ATTR'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:421:1: note: expanded from here
In file included from gram.y:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/postgres.h:46:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/c.h:1330:
In file included from ../../../../go/pkg/mod/github.com/pganalyze/pg_query_go/v2@v2.1.2/parser/include/port.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:471:1: error: expected ';' after top level declarator
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:588:101: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2: note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2: note: expanded from macro '__CCT_DISPATCH'
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note: expanded from macro '__CONCAT'
<scratch space>:5:1: note: expanded from here
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:567:11: note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_4'
ok  	github.com/kyleconroy/sqlc/internal/codegen/golang	0.606s
ok  	github.com/kyleconroy/sqlc/internal/codegen/sdk	0.455s
ok  	github.com/kyleconroy/sqlc/internal/config	0.711s
FAIL	github.com/kyleconroy/sqlc/internal/endtoend [build failed]
FAIL	github.com/kyleconroy/sqlc/internal/engine/postgresql [build failed]
ok  	github.com/kyleconroy/sqlc/internal/engine/sqlite	0.974s
ok  	github.com/kyleconroy/sqlc/internal/metadata	0.272s
ok  	github.com/kyleconroy/sqlc/internal/migrations	0.368s
ok  	github.com/kyleconroy/sqlc/internal/python/printer	0.824s
ok  	github.com/kyleconroy/sqlc/internal/source	0.975s
ok  	github.com/kyleconroy/sqlc/internal/sql/named	0.969sDatabase schema
No response
SQL queries
No response
Configuration
No response
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed