foxcpp / maddy

✉️ Composable all-in-one mail server.
https://maddy.email
GNU General Public License v3.0
5.13k stars 249 forks source link

Linux arm64 build - failed to open db: sql: unknown driver "sqlite3" (forgotten import?) #724

Open DmitriiMukhin opened 2 months ago

DmitriiMukhin commented 2 months ago

Describe the bug

Tried to build on macOS with GOOS=linux GOARCH=arm64 ./build.sh --static.

Got 2024-08-31T14:33:06.027Z [debug] systemd: STATUS="failed to open db: sql: unknown driver "sqlite3" (forgotten import?)"

I even tried to build such way: GOOS=linux GOARCH=arm64 CC=aarch64-linux-musl-cc go build -v github.com/mattn/go-sqlite3 GOOS=linux GOARCH=arm64 CC=aarch64-linux-musl-cc ./build.sh --static No success.

Steps to reproduce

  1. Build with GOOS=linux GOARCH=arm64 ./build.sh --static
  2. Deploy as systemd service on Debian 12 arm64
  3. Edit /etc/maddy/maddy.conf (hostname, domain, etc...)
  4. Try to start

Log files

failed to open db: sql: unknown driver "sqlite3" (forgotten import?)

Configuration file

/etc/maddy/maddy.conf

Environment information