Created attachment 232717 [details] poudriere build log Tried building syncthing with poudriere (13.0-RELEASE, ports HEAD) today and it breaks. Attached the poudriere log, let me know if anything more is needed. I know nothing about Go, but this part of the log sticks out for me: # github.com/marten-seemann/qtls-go1-18 vendor/github.com/marten-seemann/qtls-go1-18/cipher_suites.go:143:43: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/cipher_suites.go:413:45: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/cipher_suites.go:418:46: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/cipher_suites.go:426:45: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/conn.go:177:10: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/conn.go:183:13: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/conn.go:211:62: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/conn.go:973:14: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/conn.go:1056:33: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/common.go:1496:41: undeclared name: any (requires version go1.18 or later) vendor/github.com/marten-seemann/qtls-go1-18/conn.go:1056:33: too many errors The thing is, Go is version 1.18: # pkg search go go-1.18,1 Go programming language Any ideas?
qtls-go1-18 means it's only compatible with go 1.18
(In reply to Mikael Urankar from comment #1) Yes, and 1.18 is installed, citing the build log: =======================<phase: build-depends >============================ ===> syncthing-1.19.1 depends on file: /usr/local/bin/go - not found ===> Installing existing package /packages/All/go-1.18,1.pkg [13_0_release-HEAD-job-01] Installing go-1.18,1... [13_0_release-HEAD-job-01] Extracting go-1.18,1: .......... done ===> syncthing-1.19.1 depends on file: /usr/local/bin/go - found ===> Returning to build of syncthing-1.19.1
I'm having the same problem on amd64 FreeBSD 13.0-RELEASE-p10.
I believe this may be due to the update of lang/go.
(In reply to Steve Wills from comment #4) FWIW, it builds fine if we don't use the ports infra.
(In reply to Mikael Urankar from comment #5) Looks like https://github.com/syncthing/syncthing/releases/download/v1.19.1/syncthing-source-v1.19.1.tar.gz contains a vendor/ dir with prepopulated vendor modules, but it was apparently built with an older go version. Upstream uses 1.16 as the lowest supported version, so it is likely they populate the vendor dir with it. If you don't use -mod=vendor during the build, go will automagically update the vendor dir, but it'll probably download files from the internet, which likely isn't what you want. I'm unsure what the right way is to fix it. The go module system is incomprehensible to me :)
*** Bug 262993 has been marked as a duplicate of this bug. ***
(In reply to Dimitry Andric from comment #6) I've tried to use GO_MODULE and gomod-vendor to not avail. It always fails if the vendor dir is populated.
Can we use go 1.17 until this issue is sorted out? https://cgit.freebsd.org/ports/commit/?id=661c4c760599326c8ca273a1cfe945d553d1249a
(In reply to Mikael Urankar from comment #9) Since syncthing's own mod files refer to go 1.16, did you check that go 1.17 can build it without the same type of 'outdated module' error? Specifically, inside a poudriere jail where it can't access internet? :)
(In reply to Dimitry Andric from comment #10) But before lang/go was upgraded to 1.18, syncthing was building with go 1.17. Why do we need to check it?
(In reply to Denis Shaposhnikov from comment #11) Ah sorry, I wasn't aware that the previous go version was 1.17. So if that used to build syncthing 1.19.1 OK in the past, it should be fine.
I didn't want to fight with gomod so I cheated. I know it's not a good solution but I rolled my local poudriere syncthing build (not lang/go) back from 1.19.x to 1.18.x which "fixed" it. I feel bad, but FYI.
Created attachment 232991 [details] v0 This patch seems to work. Mk/Uses/go.mk: - do not extract the go modules in the vendor dir as it causes problem for certain ports - remove -mod=vendor as it's not used anymore net/syncthing: Update to 1.19.2 and switch to GO_MODULE
(In reply to Mikael Urankar from comment #14) Works for me on amd64. Thanks Mikael.
(In reply to Mikael Urankar from comment #14) Thanks, works for me here too.
the go.mk change is too intrusive and breaks some ports. I'll try to come up with a better fix.
Hey all, I finally got a chance today to set up poudriere on my FreeBSD 13.0-RELEASE server (first time) and so far it's great. I noticed that syncthing was the only thing that failed so I went ahead and took a look at the logs and saw the same error that was already reported. Just wanted to mention this here as well. I was going to try out the patch that works but I see that Mikael said it's a bit too intrusive. I'll await for an improved version and I can help test. Keep up the good work everyone :). - Jonathan
I've opened https://reviews.freebsd.org/D34857 for review. net/syncthing still needs to be patched to use GO_MODULES and no_vendor_dir needs to be put in the USES list.
Syncthing not building is, at least to us, becoming problematic. Is there any way to get it to build (with poudriere) until D34857 goes through? Also, what's the right way to bring attention to your review? It's been sitting there for a while now.. /Eirik
Hi Eirik, as a workaround I'm using GO_PORT= lang/go117 in poudriere's make.conf. Hope it'll help you too.
Created attachment 233430 [details] Upgrade to 1.19.2 I used the latest release and switched it to go:modules and it builds in testport again for me. I didn't had time to really test it and i have no idea how GO stuff works so maybe the patch is bad.
I have syncthing 1.19.1 installed and running as of Sun Mar 27 21:35:53 2022 UTC I can't find the build log right now...
It fails here, just last night: Wed Apr 27 07:27:08 UTC 2022 https://services.unixathome.org/poudriere/data/122amd64-default-primary/latest-per-pkg/syncthing-1.19.1_1.log
My first failed build at my install on 27 March was https://services.unixathome.org/poudriere/build.html?mastername=122amd64-default-primary&build=2022-03-28_15h26m00s
I just installed my patched version which seems to work, would be great to get some feedback on the patch and move forward with that to unbreak syncthing in the ports tree for everyone
I can help test. What's the recommended way to test it? Download attachment and throw the file into the corresponding ports folder or is there some sort of 'overlay folder' that FreeBSD can apply when selecting the port?
Created attachment 233717 [details] syncthing-1.20.0.patch Update to 1.20.0, unbreak build. I didn't attempt to run it, but poudriere testport passes in 130a, 130i, 123a
(In reply to Dmitri Goutnik from comment #28) Works good on my 13.0 amd64.
Created attachment 233794 [details] Upgrade to 1.20.1 Updated and tested the patch from Dmitri Goutnik but updated to 1.20.1. What is required to get this merged?
(In reply to Sir l33tname from comment #30) Thank you! I've just upgraded net/syncthing using your patch and it works fine.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=2ff27291417d9a79b9c43d6d128817e5ec465a17 commit 2ff27291417d9a79b9c43d6d128817e5ec465a17 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-05-08 15:05:07 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-05-08 15:05:07 +0000 net/syncthing: Fix broken build and upgrade to 1.20.1 After lang/go was updated to 1.18, net/syncthing failed to build under poudriere, with errors similar to: vendor/github.com/marten-seemann/qtls-go1-18/cipher_suites.go:143:43: undeclared name: any (requires version go1.18 or later) This is because the packaged vendor libraries in the upstream tarball don't work with go 1.18. Fix this by using USES=go:modules and changing the build commands. Also, upgrade to 1.20.1. PR: 262808 Reported by: Oscar Carlsson <oscar@spindel.tax> Approved by: maintainer timeout (2 weeks) Submitted by: dmgk MFH: 2022Q2 net/syncthing/Makefile | 13 ++++++------- net/syncthing/distinfo | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-)
Thank you :).