App not building on macOS
Describe the bug Got error whyle trying to build on macOS:
make build
go build -pgo=auto -o spqr-balancer -ldflags "-X github.com/pg-sharding/spqr/pkg.GitRevision=`git rev-parse --short HEAD` -X github.com/pg-sharding/spqr/pkg.SpqrVersion=`git describe --tags --abbrev=0`" -gcflags=all="-N -l" ./cmd/balancer
# github.com/pg-sharding/spqr/pkg/conn
pkg/conn/instance.go:190:52: undefined: syscall.SOL_TCP
make: *** [build_balancer] Error 1
To Reproduce Steps to reproduce the behavior:
- Clone repo
- execute
make build
Desktop (please complete the following information):
- MacBook m3 pro
- OS: macOS
- Version 14.4 (23E214)
Additional context I'm not sure but but it seems to me that syscall.IPPROTO_TCP is more suitable than syscall.SOL_TCP in this context. Changed it locally and app built successfully.
Hi, @zetsub0! We are trying to set up a user tcp socket timeout and, yes, we broke the build on Mac OS. As a temporary workaround, you can comment out this line locally, and then the build will pass.
If you know how to fix this problem, we are open for your PRs!
I think we need to do something here to make the router buildable.