Comment by Kimitri
2 days ago
This is interesting and very timely for me. Just this week I was building a small Go system that uses SQLite. I needed to cross-compile it for FreeBSD on a Mac and ran into issues with CGO. The easiest fix seemed to be to switch from a CGO based library to a pure Go one.
I don't know for freebsd but at least for Linux I started using the zig toolchain and it's wonderful. https://zig.news/kristoff/building-sqlite-with-cgo-for-every...
I hit the same issue, building on mac to deploy to linux.
I added this build step before `scp`ing the binary to the server
Looking at the article, I should give modernc sqlite driver a try.