[MacPorts] #69156: ipfs build failure: "The version of quic-go you're using can't be built on Go 1.21 yet."

MacPorts noreply at macports.org
Sun Feb 11 14:45:40 UTC 2024


#69156: ipfs build failure: "The version of quic-go you're using can't be built on
Go 1.21 yet."
------------------------------+-------------------------
  Reporter:  scott-mackenzie  |      Owner:  herbygillot
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.8.1
Resolution:                   |   Keywords:
      Port:  ipfs             |
------------------------------+-------------------------

Comment (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. 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
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/69156#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list