I’ve been a long time lurker but I finally decided to register an account and join the community . I also thought I’d try tinkering with development, which is where I’ve got stuck.
I’m trying to build Syncthing by following the instructions in the docs, however when building I only get this output:
C:\Users\...\Documents\Syncthing\syncthing-sadphi>go run build.go
Warning: Windows binaries will not have file information encoded: failed to create C:\Users\...\Documents\Syncthing\syncthing-sadphi\cmd\syncthing\resource.syso: exec: "goversioninfo": executable file not found in %PATH%
github.com/DataDog/zstd
# github.com/DataDog/zstd
exec: "gcc": executable file not found in %PATH%
exit status 2
exit status 1
A few months ago I was testing around and built Syncthing the exact same way on this machine, but this time it doesn’t work. I found this thread which said to download TDM-GCC, but that didn’t work. I have also tried updating go.
Or make sure gcc.exe is in your path, looks like the tdm-gcc installer didn’t take care of that (or you first need to rerun/-start something for the change to take effect).
Badger has two build modes apparently, with zstd when CGO_ENABLED=1 and with lz4 when it’s disabled. (I haven’t tested whether the databases are compatible between the two; I’d hope they are…)
I looked at the code: They are not fully compatible. There’s an option to choose the compression, i.e. on a cgo build you can open both, but you need to specify the correct compression to open an existing db. On a no-cgo build you can’t open dbs compressed with zstd. There’s some chance zstd will be available without cgo soon: https://github.com/dgraph-io/badger/issues/1162