Opened 10 months ago
Last modified 8 months ago
#69156 assigned defect
ipfs build failure: "The version of quic-go you're using can't be built on Go 1.21 yet."
Reported by: | scott-mackenzie (Scott E. MacKenzie) | Owned by: | herbygillot (Herby Gillot) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | sirn (Kridsada Thanabulpong), catap (Kirill A. Korinsky) | |
Port: | ipfs |
Description (last modified by scott-mackenzie (Scott E. MacKenzie))
Build of port beets-full fails with quick-go vs go conflict.
Build Logs Error:
:info:build # github.com/quic-go/quic-go/internal/qtls :info:build vendor/github.com/quic-go/quic-go/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration :info:build make: * [cmd/ipfs/ipfs] Error 1 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ipfs/ipfs/work/gopath/src/github.com/ipfs/kubo' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ipfs/ipfs/work/gopath/src/github.com/ipfs/kubo" && make -j12 -w build :info:build Exit code: 2 :error:build Failed to build ipfs: command execution failed
Upstream developer note on quick-go versus go version: https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions
port version Version: 2.8.1 The following go port installed: go @1.21.6_0 (active)
Hardware:
Hardware and OS Overview: Operating System: Sonoma (arm64) Model Name: MacBook Pro Model Identifier: Mac14,6 Model Number: Z179000H4LL/A Chip: Apple M2 Max Total Number of Cores: 12 (8 performance and 4 efficiency) Memory: 96 GB System Firmware Version: 10151.61.4 OS Loader Version: 10151.61.4 Serial Number (system): Hardware UUID: Provisioning UDID Activation Lock Status: Enabled
Should this port be removed if the developer is not going to update their go to quick-go versions?
Change History (7)
comment:1 Changed 10 months ago by scott-mackenzie (Scott E. MacKenzie)
Description: | modified (diff) |
---|
comment:2 Changed 10 months ago by jmroot (Joshua Root)
Cc: | sirn catap added |
---|---|
Description: | modified (diff) |
Keywords: | build error ipfs fails removed |
Owner: | set to herbygillot |
Port: | ipfs added; beets-full removed |
Status: | new → assigned |
Summary: | Error: Processing of port beets-full failed | Error: Failed to build ipfs → ipfs build failure: "The version of quic-go you're using can't be built on Go 1.21 yet." |
comment:3 Changed 10 months ago by scott-mackenzie (Scott E. MacKenzie)
Description: | modified (diff) |
---|
comment:4 Changed 10 months ago by scott-mackenzie (Scott E. MacKenzie)
comment:5 Changed 9 months ago by jmon12
The ticket #68468 proposes a workaround for cloudflared. The idea is to install and use Go 1.20 during the build. Here is the diff of the Portfile I'm using:
--- Portfile.orig 2024-02-11 14:08:24 +++ Portfile 2024-02-11 14:48:41 @@ -58,6 +58,17 @@ extract.dir ${workpath}/${go.author}-${go.project}-${version} +# TMP: Attempt to pin a Go version +# See ticket #69156 +# Install Go 1.20 in the working directory +set goversion go1.20.14 +pre-build { + system "GOPATH=${gopath} go install golang.org/dl/${goversion}@latest" + system "HOME=${workpath} ${gopath}/bin/${goversion} download" +} +# Override the Go binary used by the build +set go.bin "${workpath}/sdk/${goversion}/bin/go" + destroot { xinstall -m 0755 ${worksrcpath}/cmd/ipfs/ipfs ${destroot}${prefix}/bin xinstall -d ${destroot}${prefix}/share/examples/${name}
However, I tried and for some unknown reason the Go version used is still the one on my system (1.21.6), even if the local installation of Go 1.20 succeeded. I don't understand why: the go.bin
variable has been set accordingly...
Here is an extract of the verbose output: indeed, the Go version I installed is not used. I also attach the diff portfile. I give up for now since I'm not familiar enough with macports internals and Go.
Unpacking /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ipfs/ipfs/work/sdk/go1.20.14/go1.20.14.darwin-amd64.tar.gz ... Success. You may now run 'go1.20.14' Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ipfs/ipfs/work/gopath/src/github.com/ipfs/kubo" && make -j8 -w build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_ipfs/ipfs/work/gopath/src/github.com/ipfs/kubo' plugin/loader/preload.sh > plugin/loader/preload.go go version go1.21.6 darwin/amd64
comment:6 Changed 8 months ago by jmon12
The following PR should solve the problem by updating IPFS: it can now be built with recent Go versions.
Does anyone know of a workaround or will the developer be updating the port?