Windows build resource.syso creation fails since v1.4.0.rcX

Hi there,

I’ve just tried to build syncthing.exe on Windows with

[INFO] go version
go version go1.13.4 windows/amd64
[INFO] go get github.com/josephspurrier/goversioninfo
go: finding github.com/josephspurrier/goversioninfo latest
[INFO] go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo
[INFO] go mod download
[INFO] go run build.go -no-upgrade -goos windows -goarch amd64 build syncthing
Warning: Windows binaries will not have file information encoded: failed to create C:\Temp\git\SYNCTH~1\cmd\syncthing\resource.syso: exit status 2

… and it fails with “status 2”. The file “resource.syso” doesn’t get created but I get a “syncthing.exe” without a resource manifest that can be started properly. I did checkout v1.4.0-rc.1 to test this.

When checking out at v1.3.4 (release) the build fully succeeds and the exe icon (indicating the resource.syso was successfully compiled) appears in Windows Explorer. No error message so far during build.

I’ve narrowed it down to the commit to blame for this behaviour:

When I do:

git checkout v1.4.0-rc.1 (or v1.4.0-rc.9)
git revert b4064e07dce0268c8d228ed507ae3cf2b4c8b432
go run build.go -no-upgrade -goos windows -goarch amd64 build syncthing

It builds fine with the exe resources included and icon shows up.

image

Should I raise the bug to GitHub?

Kind regards Catfriend1

Please do. goversioninfo seems to get confused:

Could not parse the .json file: json: cannot unmarshal string into Go struct field FileVersion.FixedFileInfo.FileVersion.Build of type int

Which is strange, because the field i’m looking at is “24”, so it should be parseable as int.

Not that it worked properly before, see “0.0.0.0” for version on your screenshot.

2 Likes

OK, I see the issue, will fix. Still, do open an issue.

4 Likes

Thank you , here’s the ticket : https://github.com/syncthing/syncthing/issues/6386

2 Likes

Here’s the PR: https://github.com/syncthing/syncthing/pull/6387

3 Likes