Ticket created by ~utkarshverma on ~emersion/soju
I use the following command to build soju (
master
) for ARMv6.$ GOOS=linux GOARCH=arm GOARM=6 make GOFLAGS="-tags=moderncsqlite"It builds fine and I can verify that the executable is valid since it runs with
./soju -help
on my Pi Zero W (arm32v6
). However, when I launch it with my database and config, it errors.For ease of testing, I use
qemu-static-arm
, but the results mirror the hardware.$ qemu-static-arm./soju -config soju.config 2025/03/27 06:51:04 warning: hostname "metia" is not a fully qualified domain name 2025/03/27 06:51:04 failed to open database: failed to query schema version: database disk image is malformed (11)My
soju.config
is nothing special:listen irc+insecure:// db sqlite3 main.db message-store db
I investigated the code, and the driver (
moderncsqlite
) seemed to be having issues loading the DB when checking the DB version schema. Hence, I tried updatingmoderncsqlite
and found thatmoderncsqlite >=v1.35.0
do not have this issue (currently we use 1.34.1).The fix is simple:
$ go get modernc.org/sqlite@v1.35.0 $ go mod tidyWith this,
soju
now works perfectly for me on my Zero.$ qemu-static-arm ./soju soju.config 2025/03/27 07:01:25 warning: hostname "metia" is not a fully qualified domain name 2025/03/27 07:01:25 server listening on "irc+insecure://" 2025/03/27 07:01:25 starting bouncer for user "barusu" 2025/03/27 07:01:26 user "barusu": upstream "libera": connecting to TLS server at address "irc.libera.chat:6697" 2025/03/27 07:01:26 user "barusu": upstream "oftc": connecting to TLS server at address "irc.oftc.net:6697"Here's the diff just in case: https://pastebin.com/345cE7Z6