Subject: Re: Errors building NNCP with Go 1.22

From: Alexis <[email-masked]>
Date: Tue, 23 Jul 2024 16:36:23 +1000

John Goerzen <[email-masked]> writes:

> Hi Sergey,
>
> I received an email earlier this week about problems building 
> NNCP with
> Golang 1.22:
>
> vendor/gvisor.dev/gvisor/pkg/sync/gate_unsafe.go:114:3: 
> undefined: goready
> vendor/gvisor.dev/gvisor/pkg/sync/gate_unsafe.go:144:2: 
> undefined: gopark
> vendor/gvisor.dev/gvisor/pkg/sync/rwmutex_unsafe.go:76:3: 
> undefined: semacquire
> vendor/gvisor.dev/gvisor/pkg/sync/rwmutex_unsafe.go:102:4: 
> undefined: semrelease
> vendor/gvisor.dev/gvisor/pkg/sync/rwmutex_unsafe.go:152:3: 
> undefined: semacquire
> vendor/gvisor.dev/gvisor/pkg/sync/rwmutex_unsafe.go:179:3: 
> undefined: semrelease
> vendor/gvisor.dev/gvisor/pkg/sync/rwmutex_unsafe.go:207:3: 
> undefined: semrelease
> vendor/gvisor.dev/gvisor/pkg/sync/seqcount.go:87:6: undefined: 
> canSpin
> vendor/gvisor.dev/gvisor/pkg/sync/seqcount.go:89:4: undefined: 
> doSpin
>
> I can confirm that myself.  Maybe the fix would be as easy as 
> updating
> the dependencies?
>
> By the way, still going strong with NNCP over here.  The 
> quux.org public
> node is slowly adding new peers also.  Thanks for what you do 
> for NNCP!
>
> - John

Thanks John, you beat me to it!

i was the person who sent the initial email to John (as i'd 
incorrectly assumed he was the primary maintainer).

In addition to the above:

* i get this error regardless of whether i build and use the 
  Gentoo package (which only has one patch to upstream, 
  `go-never-download-newer-toolchains.patch`), or download and use 
  the version provided at go.dev.

* Although 
  https://nncp.mirrors.quux.org/Build_002dinstructions.html notes 
  that:

> currently building with Go 1.22 is impossible unless noyggdrasil 
> tag is set

(which doesn't seem to be noted in the INSTALL file in the 8.10.0 
tarball), trying to build via:

    GO_CFLAGS="-tags noyggdrasil" bin/build

fails with the error:

    # go.cypherpunks.ru/nncp/v8/yggdrasil
    yggdrasil/yggdrasil_dummy.go:30:53: undefined: ConnDeadlined

Alexis.