erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.12k stars 1.11k forks source link

Please provide official binaries #4153

Closed ytrezq closed 1 year ago

ytrezq commented 2 years ago

Many times building fails because of things like environment/compiler differences, especially in the case of Windows (Win64) or osx.

Providing build scripts is good but because of environment différences, they tend to fails.

AskAlexSharov commented 2 years ago

Support docker is easier: https://hub.docker.com/r/thorax/erigon

ytrezq commented 2 years ago

@AskAlexSharov for Linux, likely. That s why I m talking about Windows and osx. And in my case, I need to pipe to Windows programs.

AskAlexSharov commented 2 years ago
  1. In my head "Docker" - works on any host OS. On osx it works well. I believe on WSL2 docker works as well.
  2. logs - it's just text. if can't deal with stdin/stdout on win - you can write logs to file, then pipe file content where need.
  3. On win don't use "make" use "wmake.ps1"
  4. if you provide binaries, why don't provide deb/brew/nix packages, etc... geth has some toolset for building: https://github.com/ethereum/go-ethereum/tree/master/build - but we never really supported it
  5. maybe somebody will get ownership on it in future
ytrezq commented 2 years ago

@AskAlexSharov

  1. In my head "Docker" - works on any host OS. On osx it works well. I believe on WSL2 docker works as well.

Right, the issue is if you need to interface the node with Windows or osx specific programs which is my case. On Linux there are several distributions and incompatibles Libraries. On Windows, the os comes a complete stack of backward compatible Microsoft s dll which by the way would avoid compiling build time dependencies.

  1. logs - it's just text. if can't deal with stdin/stdout on win - you can write logs to file, then pipe file content where need.

I was talking about Windows pipes.

  1. On win don't use "make" use "wmake.ps1"

It works, provided it match an unspecified installed toolchain version. Else lot of errors.

  1. if you provide binaries, why don't provide deb/brew/nix packages, etc... geth has some toolset for building: https://github.com/ethereum/go-ethereum/tree/master/build - but we never really supported it

I do note you already have automated build scripts for automated pull request testing which could be used on purpose.

  1. maybe somebody will get ownership on it in future
AskAlexSharov commented 2 years ago

“ backward compatible Microsoft s dll ” - does it include mingw runtime dll (Golang can’t link to msvc runtime)? libmdbx dll? Probably all our C dependencies (dozen) will create individual dll. It’s impossible to create statically-linked binary on windows. Who will ensure that dll versions are correct on user’s machine?

“already have automated build scripts for automated pull request testing” - and you just can’t imagine how much time, pain and blood took us to setup it for Windows. Weeks and 2 developers.

I’m not complaining - just as I understand it’s big and likely unsolvable (no static-linking on win) task.

thank you for opening issue. If you like to do PR - you are welcome.

ytrezq commented 2 years ago

“ backward compatible Microsoft s dll ” - does it include mingw runtime dll (Golang can’t link to msvc runtime)? libmdbx dll? Probably all our C dependencies (dozen) will create individual dll. It’s impossible to create statically-linked binary on windows. Who will ensure that dll versions are correct on user’s machine?

Disagree. With mingw, static linked is possible if the static versions of the Libraries are present. But it s about runtimes. Not things such as glibc versus musl. Those missing libraries are still common to all Windows versions.

“already have automated build scripts for automated pull request testing” - and you just can’t imagine how much time, pain and blood took us to setup it for Windows. Weeks and 2 developers.

Correct, and since the work is almost done, it s not up the end users to spend almost so much time in order to deal with this (for building the executables).

I’m not complaining - just as I understand it’s big and likely unsolvable (no static-linking on win) task.

thank you for opening issue. If you like to do PR - you are welcome.

AskAlexSharov commented 2 years ago

If anybody willing to work on it - some link which maybe working: https://github.com/shadowmint/go-static-linking

ytrezq commented 2 years ago

@AskAlexSharov what about simply making erigon compatible with gcc-go? It would also solve this problem while bringing better run time optimisations as well as support to other architectures like riscv or mips and thus loongson (a way explored by China for replacing x86).

Similar software ported from Linux have no problem distributing those third party dlls in their installer.

AskAlexSharov commented 2 years ago

Maybe it’s good idea - I don’t have any opinion here.

ytrezq commented 2 years ago

@AskAlexSharov gccgo is only compatible with go up to 1.16. Is there lot of Erigon code concerned by this?

AskAlexSharov commented 2 years ago
ytrezq commented 2 years ago
  • some our deps (like anacrolix/torrent) already switched to go1.18

Care must be made in order to ensure Erigon isn t using the versions affected. @AskAlexSharov does Erigon already rely on those versions?

  • don't know if pprof and other go tools will work with gccgo or not

Instead of using those specific tools you use the gcc and binutils tools used by all the other languages.

AskAlexSharov commented 2 years ago

https://goreleaser.com has https://github.com/goreleaser/goreleaser-cross

ytrezq commented 2 years ago

@AskAlexSharov gcc remains king for supported architectures (more than llvm). You won t get Erigon running in China and Russia with this.

AskAlexSharov commented 2 years ago

scope of this issue getting bigger and bigger: need research about cross-compilation and research gccgo and sign binaries and support all platforms in the world and configure CI for this and ...

cons of gccgo:

what done now:

I personally will try to distance from this issue: it's big, it's not related to core-functionality - size and usability of Archive node. Also long list of higher-priority things: SnapSync, Erigon2 upgrades, TheMerge, Hive integration, etc... I will drop link to this issue in our Discord chat - if somebody willing to work on it i'm fine (postpone it for several months also fine).

Thank you for advises.

ytrezq commented 2 years ago

cons of gccgo: not much people using it, no community (i'm about gccgo, not about gcc), way slower compilation, unclear support of goroutines.

Correct, it’s trading development time at the expense of slower user runtime (choosing faster to build instead of faster to run binaries).

we have SilkWarm project - it's C++, it's already buildable by pure GCC and Clang. I think it's better solution than gccgo: https://erigon.substack.com/p/current-status-of-silkworm-and-silkrpc?s=r

That sounds like the way to go. Except of course it doesn’t runs nor not even support tracing.

Docker image: https://hub.docker.com/r/thorax/erigon

Which don’t run Windows‑only programs inside it.

Makefile (wmake.ps1 provided for windows) does check pre-installed version of cc and go. then user can build us by make erigon

Just doesn’t works on a Fresh Windows 10 install with many errors like this one to be fixed :

PS C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06> .\wmake.ps1

Avertissement de sécurité
N’exécutez que des scripts que vous approuvez. Bien que les scripts en provenance d’Internet puissent être utiles, ce script est susceptible d’endommager votre ordinateur. Si
 vous approuvez ce script, utilisez l’applet de commande Unblock-File pour autoriser le script à s’exécuter sans ce message d’avertissement. Voulez-vous exécuter
C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\wmake.ps1 ?
[N] Ne pas exécuter  [O] Exécuter une fois  [S] Suspendre  [?] Aide (la valeur par défaut est « N ») : O

 ------------------------------------------------------------------------------
  Erigon's wmake.ps1 : Selected target(s) erigon rpcdaemon sentry downloader integration
 ------------------------------------------------------------------------------

 Found Git version 2.36.1
 Erigon Branch :
 Erigon Tag    :
 Erigon Commit :

 Building erigon
go: downloading github.com/ledgerwatch/log/v3 v3.4.1
go: downloading github.com/ledgerwatch/erigon-lib v0.0.0-20220620073929-46bebb3317d9
go: downloading github.com/urfave/cli v1.22.9
go: downloading github.com/c2h5oh/datasize v0.0.0-20200825124411-48ed595a09d2
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/holiman/uint256 v1.2.0
go: downloading github.com/anacrolix/go-libutp v1.2.0
go: downloading github.com/anacrolix/log v0.13.1
go: downloading github.com/anacrolix/torrent v1.44.0
go: downloading golang.org/x/time v0.0.0-20220411224347-583f2d630306
go: downloading github.com/spf13/cobra v1.4.0
go: downloading golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6
go: downloading google.golang.org/grpc v1.46.2
go: downloading google.golang.org/protobuf v1.28.0
go: downloading github.com/gofrs/flock v0.8.1
go: downloading github.com/rs/cors v1.8.2
go: downloading github.com/huin/goupnp v1.0.3
go: downloading github.com/jackpal/go-nat-pmp v1.0.2
go: downloading github.com/pion/stun v0.3.5
go: downloading github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
go: downloading github.com/edsrzf/mmap-go v1.1.0
go: downloading github.com/goccy/go-json v0.9.7
go: downloading github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
go: downloading golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122
go: downloading github.com/torquem-ch/mdbx-go v0.24.3-0.20220614090901-342411560dde
go: downloading golang.org/x/exp v0.0.0-20220428152302-39d4317da171
go: downloading github.com/go-stack/stack v1.8.1
go: downloading github.com/mattn/go-colorable v0.1.11
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading github.com/VictoriaMetrics/metrics v1.18.1
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading go.uber.org/atomic v1.9.0
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.1
go: downloading github.com/anacrolix/missinggo v1.3.0
go: downloading github.com/anacrolix/mmsg v1.0.0
go: downloading github.com/anacrolix/sync v0.4.0
go: downloading github.com/ledgerwatch/secp256k1 v1.0.0
go: downloading github.com/ugorji/go/codec v1.1.13
go: downloading github.com/valyala/fastjson v1.6.3
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
go: downloading github.com/google/btree v1.0.1
go: downloading github.com/flanglet/kanzi-go v1.9.1-0.20211212184056-72dda96261ee
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/gorilla/websocket v1.5.0
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/golang-jwt/jwt/v4 v4.4.1
go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/xsleonard/go-merkle v1.1.0
go: downloading github.com/pelletier/go-toml/v2 v2.0.2
go: downloading github.com/RoaringBitmap/roaring v1.2.1
go: downloading github.com/anacrolix/chansync v0.3.0
go: downloading github.com/anacrolix/dht/v2 v2.16.2-0.20220311024416-dd658f18fd51
go: downloading github.com/anacrolix/generics v0.0.0-20220510042907-b50562b436ec
go: downloading github.com/anacrolix/missinggo/perf v1.0.0
go: downloading github.com/anacrolix/missinggo/v2 v2.7.0
go: downloading github.com/anacrolix/multiless v0.2.1-0.20211218050420-533661eef5dc
go: downloading github.com/anacrolix/upnp v0.1.3-0.20220123035249-922794e51c96
go: downloading github.com/bahlo/generic-list-go v0.2.0
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/lispad/go-generics-tools v1.0.0
go: downloading github.com/pion/datachannel v1.5.2
go: downloading github.com/pion/webrtc/v3 v3.1.24-0.20220208053747-94262c1b2b38
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/pelletier/go-toml v1.9.5
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/emirpasic/gods v1.18.1
go: downloading github.com/stretchr/testify v1.7.2
go: downloading github.com/VictoriaMetrics/fastcache v1.10.0
go: downloading github.com/emicklei/dot v0.16.0
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading github.com/valyala/histogram v1.2.0
go: downloading github.com/huandu/xstrings v1.3.2
go: downloading github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8
go: downloading github.com/anacrolix/envpprof v1.2.1
go: downloading github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0
go: downloading github.com/tidwall/btree v0.7.2-0.20211211132910-4215444137fc
go: downloading github.com/pion/logging v0.2.2
go: downloading github.com/pion/sctp v1.8.2
go: downloading github.com/rs/dnscache v0.0.0-20210201191234-295bba877686
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/tendermint/go-amino v0.14.1
go: downloading github.com/tendermint/tendermint v0.31.11
go: downloading github.com/valyala/fastrand v1.1.0
go: downloading github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/benbjohnson/immutable v0.3.0
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/pion/dtls/v2 v2.1.2
go: downloading github.com/pion/interceptor v0.1.7
go: downloading github.com/pion/ice/v2 v2.1.20
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/pion/rtcp v1.2.9
go: downloading github.com/pion/rtp v1.7.4
go: downloading github.com/pion/sdp/v3 v3.0.4
go: downloading github.com/pion/srtp/v2 v2.0.5
go: downloading github.com/pion/transport v0.13.0
go: downloading golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
go: downloading github.com/anacrolix/stm v0.3.0
go: downloading google.golang.org/genproto v0.0.0-20200825200019-8632dd797987
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91
go: downloading golang.org/x/text v0.3.7
go: downloading github.com/go-sourcemap/sourcemap v2.1.3+incompatible
go: downloading github.com/pion/turn/v2 v2.0.6
go: downloading github.com/pion/mdns v0.0.5
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/btcsuite/btcd v0.22.0-beta
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/go-logfmt/logfmt v0.5.0
go: downloading github.com/go-kit/kit v0.10.0
go: downloading github.com/pion/udp v0.1.1
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
cmd\downloader\trackers\embed.go:17:12: pattern trackerslist/trackers_all_http.txt: no matching files found
turbo\snapshotsync\snapshothashes\embed.go:34:12: pattern erigon-snapshots/bor-mainnet.toml: no matching files found

 Built erigon. Run C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\erigon.exe to launch

 Building rpcdaemon
turbo\snapshotsync\snapshothashes\embed.go:34:12: pattern erigon-snapshots/bor-mainnet.toml: no matching files found

 Built rpcdaemon. Run C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\rpcdaemon.exe to launch

 Building sentry
cmd\downloader\trackers\embed.go:17:12: pattern trackerslist/trackers_all_http.txt: no matching files found
turbo\snapshotsync\snapshothashes\embed.go:34:12: pattern erigon-snapshots/bor-mainnet.toml: no matching files found

 Built sentry. Run C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\sentry.exe to launch

 Building downloader
cmd\downloader\trackers\embed.go:17:12: pattern trackerslist/trackers_all_http.txt: no matching files found
turbo\snapshotsync\snapshothashes\embed.go:34:12: pattern erigon-snapshots/bor-mainnet.toml: no matching files found

 Built downloader. Run C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\downloader.exe to launch

 Building integration
turbo\snapshotsync\snapshothashes\embed.go:34:12: pattern erigon-snapshots/bor-mainnet.toml: no matching files found

 Built integration. Run C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\integration.exe to launch
PS C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06> C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\erigon.exe
C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\erigon.exe : Le terme «
C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\TempState\Downloads\erigon-2022.06.06\build\bin\erigon.exe» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de
script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez.
Au caractère Ligne:1 : 1
+ C:\Users\example\AppData\Local\Packages\Microsoft.MicrosoftEdge_8weky ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\exampl...\bin\erigon.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

@AskAlexSharov : it shouldn’t be the user’s issue instead of the developer’s issue to get Erigon available on \\.\pipe\geth.ipc.

AskAlexSharov commented 2 years ago

“ trackers_all_http.txt: no matching files found” we will fix, it’s about update git submodules.

Ipc - erigon doesn’t support ipc.

AskAlexSharov commented 2 years ago
  1. Fixed by https://github.com/ledgerwatch/erigon/pull/4532
ytrezq commented 2 years ago

“ trackers_all_http.txt: no matching files found” we will fix, it’s about update git submodules.

That’s far from being the single problem. @AskAlexSharov it shouldn’t be the user’s issue instead of the developer’s issue to get the rpcdaemon available on \\.\pipe\geth.ipc. I don’t mind about a Windows based docker but it has to be provided.

Ipc - erigon doesn’t support ipc.

Sorry, I was meaning the rpcdaemon of course.

AskAlexSharov commented 2 years ago

Docker: https://hub.docker.com/r/thorax/erigon If something doesn't work - please create an issue with error message

ytrezq commented 2 years ago

Docker: https://hub.docker.com/r/thorax/erigon If something doesn't work - please create an issue with error message

@AskAlexSharov that version of docker doesn’t let use Windows pipes/ipc because of the underlying operating system of the image. Instead of opening 200 to 300 issues mainly because of incompatible versionning build systems, wouldn’t it be simpler to ensure the user only has to run things but not to write/build them?

AskAlexSharov commented 2 years ago

In perfect world: wouldn’t it be simpler to be always healthy and rich?

I'm totally agree with everything you say, but it's low-priority very-big task. High priority: archive node sync speed and size, the-merge support.

"that version of docker doesn’t let use Windows pipes" - I don't understand the problem, create issue with command and error message we can't fix it.

ytrezq commented 2 years ago

"that version of docker doesn’t let use Windows pipes" - I don't understand the problem, create issue with command and error message we can't fix it.

The image contains a Linux os. Not Windows.

mandrigin commented 2 years ago

Instead of opening 200 to 300 issues mainly because of incompatible versionning build systems

In theory, yes, in practice supporting and updating all possible versions for different OSes and for different linux distros, flavours and versions is a huge job.

I will welcome if someone runs and supports an unofficial package for Windows or something. Unlikely we will do this anytime soon though. Not many from the core contributors use Windows.

Docker is the best way to run unless you want to contribute or debug something. So far we provide linux/amd64 that fits if you want to run it on most public and private cloud location and compatible with cluster management systems.

ytrezq commented 2 years ago

Instead of opening 200 to 300 issues mainly because of incompatible versionning build systems

In theory, yes, in practice supporting and updating all possible versions for different OSes and for different linux distros, flavours and versions is a huge job.

I will welcome if someone runs and supports an unofficial package for Windows or something. Unlikely we will do this anytime soon though. Not many from the core contributors use Windows.

Docker is the best way to run unless you want to contribute or debug something. So far we provide linux/amd64 that fits if you want to run it on most public and private cloud location and compatible with cluster management systems.

@mandrigin this doesn’t have value with Windows where unless you have to use Reactos in russia, the only distributor is Microsoft.

mandrigin commented 2 years ago

Then I am lost in what your point is :) As a core team, this is not high on our list of priorities right now. But you are always free to contribute and build Windows binaries for every new release.

ytrezq commented 2 years ago

Then I am lost in what your point is :).

@mandrigin my point is I need a Windows binary, if you didn t read the whole thread. The logic behind, is I m failing to do it for a single version, so seek core team to update their build integration like I was accustomed to with Openethereum in order to not only have code but something which can be used.

mandrigin commented 2 years ago

and the core team doesn't have resources to do that today :) I will keep this issue open for the post-merge hardfork period

ytrezq commented 2 years ago

@mandrigin meanwhile, what happens when trying to build Erigon2 from the fresh clone even on Linux where no Docker is available :

[liveuser@localhost-live erigon]$ LC_ALL=C make erigon
/bin/sh: line 1: [: ow: integer expression expected
Building erigon
go build: when using gccgo toolchain, please pass linker flags using -gccgoflags, not -ldflags
/home/liveuser/go/pkg/mod/github.com/google/btree@v1.1.2/btree_generic.go:89:16: error: use of undefined type 'T'
   89 | type FreeListG[T any] struct {
      |                ^
# github.com/anacrolix/torrent/smartban
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:7:16: error: expected ']'
    7 | type Cache[Peer, BlockKey, Hash comparable] struct {
      |                ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:10:9: error: expected declaration
   10 |         lock   sync.RWMutex
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:11:9: error: expected declaration
   11 |         blocks map[BlockKey]map[Peer]Hash
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:12:1: error: expected declaration
   12 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:14:16: error: expected ']'
   14 | type Block[Key any] struct {
      |                ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:16:9: error: expected declaration
   16 |         Data []byte
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:17:1: error: expected declaration
   17 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:19:16: error: expected ')'
   19 | func (me *Cache[Peer, BlockKey, Hash]) Init() {
      |                ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:19:16: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:19:16: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:21:1: error: expected declaration
   21 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:23:16: error: expected ')'
   23 | func (me *Cache[Peer, BlockKey, Hash]) RecordBlock(peer Peer, key BlockKey, data []byte) {
      |                ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:23:16: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:23:16: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:25:9: error: expected declaration
   25 |         me.lock.Lock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:26:9: error: expected declaration
   26 |         defer me.lock.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:27:9: error: expected declaration
   27 |         peers := me.blocks[key]
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:28:9: error: expected declaration
   28 |         if peers == nil {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:30:17: error: expected declaration
   30 |                 me.blocks[key] = peers
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:31:9: error: expected declaration
   31 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:32:9: error: expected declaration
   32 |         peers[peer] = hash
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:33:1: error: expected declaration
   33 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:35:16: error: expected ')'
   35 | func (me *Cache[Peer, BlockKey, Hash]) CheckBlock(key BlockKey, data []byte) (bad []Peer) {
      |                ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:35:16: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:35:16: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:37:9: error: expected declaration
   37 |         me.lock.RLock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:38:9: error: expected declaration
   38 |         defer me.lock.RUnlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:39:9: error: expected declaration
   39 |         for peer, hash := range me.blocks[key] {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:42:17: error: expected declaration
   42 |                 }
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:43:9: error: expected declaration
   43 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:44:9: error: expected declaration
   44 |         return
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:45:1: error: expected declaration
   45 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:47:16: error: expected ')'
   47 | func (me *Cache[Peer, BlockKey, Hash]) ForgetBlock(key BlockKey) {
      |                ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:47:16: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:47:16: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:49:9: error: expected declaration
   49 |         defer me.lock.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:50:9: error: expected declaration
   50 |         delete(me.blocks, key)
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/torrent@v1.46.1-0.20220808053819-61302332cfc5/smartban/smartban.go:51:1: error: expected declaration
   51 | }
      | ^
# go.uber.org/atomic
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:28:16: error: expected ']'
   28 | type Pointer[T any] struct {
      |                ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:30:9: error: expected declaration
   30 |         p UnsafePointer
      |         ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:31:1: error: expected declaration
   31 | }
      | ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:34:16: error: expected '('
   34 | func NewPointer[T any](v *T) *Pointer[T] {
      |                ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:34:19: error: expected ']'
   34 | func NewPointer[T any](v *T) *Pointer[T] {
      |                   ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:34:19: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:36:9: error: expected declaration
   36 |         if v != nil {
      |         ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:38:9: error: expected declaration
   38 |         }
      |         ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:39:9: error: expected declaration
   39 |         return &p
      |         ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:40:1: error: expected declaration
   40 | }
      | ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:43:17: error: expected ')'
   43 | func (p *Pointer[T]) Load() *T {
      |                 ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:43:17: error: expected function name
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:43:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:45:1: error: expected declaration
   45 | }
      | ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:48:17: error: expected ')'
   48 | func (p *Pointer[T]) Store(val *T) {
      |                 ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:48:17: error: expected function name
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:48:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:50:1: error: expected declaration
   50 | }
      | ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:53:17: error: expected ')'
   53 | func (p *Pointer[T]) Swap(val *T) (old *T) {
      |                 ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:53:17: error: expected function name
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:53:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:55:1: error: expected declaration
   55 | }
      | ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:58:17: error: expected ')'
   58 | func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) {
      |                 ^
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:58:17: error: expected function name
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:58:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/go.uber.org/atomic@v1.10.0/pointer_go118.go:60:1: error: expected declaration
   60 | }
      | ^
# github.com/anacrolix/missinggo/v2/pubsub
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:7:15: error: expected ']'
    7 | type PubSub[T any] struct {
      |               ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:9:9: error: expected declaration
    9 |         next   chan item[T]
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:10:9: error: expected declaration
   10 |         closed bool
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:11:1: error: expected declaration
   11 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:13:13: error: expected ']'
   13 | type item[T any] struct {
      |             ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:15:9: error: expected declaration
   15 |         next  chan item[T]
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:16:1: error: expected declaration
   16 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:18:21: error: expected ']'
   18 | type Subscription[T any] struct {
      |                     ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:20:9: error: expected declaration
   20 |         Values chan T
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:21:9: error: expected declaration
   21 |         mu     sync.Mutex
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:22:9: error: expected declaration
   22 |         closed chan struct{}
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:23:1: error: expected declaration
   23 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:25:17: error: expected ')'
   25 | func (me *PubSub[T]) init() {
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:25:17: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:25:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:27:1: error: expected declaration
   27 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:29:17: error: expected ')'
   29 | func (me *PubSub[T]) lazyInit() {
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:29:17: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:29:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:31:9: error: expected declaration
   31 |         defer me.mu.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:32:9: error: expected declaration
   32 |         if me.closed {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:34:9: error: expected declaration
   34 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:35:9: error: expected declaration
   35 |         if me.next == nil {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:37:9: error: expected declaration
   37 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:38:1: error: expected declaration
   38 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:40:17: error: expected ')'
   40 | func (me *PubSub[T]) Publish(v T) {
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:40:17: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:40:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:42:9: error: expected declaration
   42 |         next := make(chan item[T], 1)
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:43:9: error: expected declaration
   43 |         i := item[T]{v, next}
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:44:9: error: expected declaration
   44 |         me.mu.Lock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:45:9: error: expected declaration
   45 |         if !me.closed {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:47:17: error: expected declaration
   47 |                 me.next = next
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:48:9: error: expected declaration
   48 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:49:9: error: expected declaration
   49 |         me.mu.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:50:1: error: expected declaration
   50 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:52:23: error: expected ')'
   52 | func (me *Subscription[T]) Close() {
      |                       ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:52:23: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:52:23: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:54:9: error: expected declaration
   54 |         defer me.mu.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:55:9: error: expected declaration
   55 |         select {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:59:9: error: expected declaration
   59 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:60:1: error: expected declaration
   60 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:62:23: error: expected ')'
   62 | func (me *Subscription[T]) runner() {
      |                       ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:62:23: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:62:23: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:64:9: error: expected declaration
   64 |         for {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:69:33: error: expected declaration
   69 |                                 return
      |                                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:70:25: error: expected declaration
   70 |                         }
      |                         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:75:25: error: expected declaration
   75 |                         me.next <- i
      |                         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:78:25: error: expected declaration
   78 |                         me.next = i.next
      |                         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:79:25: error: expected declaration
   79 |                         select {
      |                         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:83:25: error: expected declaration
   83 |                         }
      |                         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:84:17: error: expected declaration
   84 |                 case <-me.closed:
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:86:17: error: expected declaration
   86 |                 }
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:87:9: error: expected declaration
   87 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:88:1: error: expected declaration
   88 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:90:17: error: expected ')'
   90 | func (me *PubSub[T]) Subscribe() (ret *Subscription[T]) {
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:90:17: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:90:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:92:9: error: expected declaration
   92 |         ret = &Subscription[T]{
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:93:43: error: expected ';' or newline after top level declaration
   93 |                 closed: make(chan struct{}),
      |                                           ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:96:9: error: expected declaration
   96 |         me.mu.Lock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:97:9: error: expected declaration
   97 |         ret.next = me.next
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:98:9: error: expected declaration
   98 |         me.mu.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:99:9: error: expected declaration
   99 |         go ret.runner()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:100:9: error: expected declaration
  100 |         return
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:101:1: error: expected declaration
  101 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:103:17: error: expected ')'
  103 | func (me *PubSub[T]) Close() {
      |                 ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:103:17: error: expected function name
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:103:17: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:105:9: error: expected declaration
  105 |         defer me.mu.Unlock()
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:106:9: error: expected declaration
  106 |         if me.closed {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:108:9: error: expected declaration
  108 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:109:9: error: expected declaration
  109 |         if me.next != nil {
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:111:9: error: expected declaration
  111 |         }
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:112:9: error: expected declaration
  112 |         me.closed = true
      |         ^
/home/liveuser/go/pkg/mod/github.com/anacrolix/missinggo/v2@v2.7.0/pubsub/pubsub.go:113:1: error: expected declaration
  113 | }
      | ^
# github.com/anacrolix/torrent/typed-roaring
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:3:12: error: expected ']'
    3 | type Set[K ordered] struct {
      |            ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:5:1: error: expected declaration
    5 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:8:14: error: expected ')'
    8 | func (tr *Set[K]) Copy() *Set[K] {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:8:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:8:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:10:9: error: expected declaration
   10 |         tr2.base = *tr.base.Copy()
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:11:9: error: expected declaration
   11 |         return tr2
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:12:1: error: expected declaration
   12 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:15:14: error: expected ')'
   15 | func (tr *Set[K]) Insert(key K) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:15:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:15:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:17:1: error: expected declaration
   17 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:19:14: error: expected ')'
   19 | func (tr *Set[K]) Scan(iter func(key K) bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:19:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:19:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:22:9: error: expected declaration
   22 |         })
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:23:1: error: expected declaration
   23 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:26:14: error: expected ')'
   26 | func (tr *Set[K]) Contains(key K) bool {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:26:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:26:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:28:9: error: expected declaration
   28 |         return ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:29:1: error: expected declaration
   29 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:32:14: error: expected ')'
   32 | func (tr *Set[K]) Len() int {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:32:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:32:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:34:1: error: expected declaration
   34 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:37:14: error: expected ')'
   37 | func (tr *Set[K]) Delete(key K) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:37:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:37:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:39:1: error: expected declaration
   39 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:44:14: error: expected ')'
   44 | func (tr *Set[K]) Ascend(pivot K, iter func(key K) bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:44:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:44:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:47:9: error: expected declaration
   47 |         })
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:48:1: error: expected declaration
   48 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:50:14: error: expected ')'
   50 | func (tr *Set[K]) Reverse(iter func(key K) bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:50:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:50:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:53:9: error: expected declaration
   53 |         })
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:54:1: error: expected declaration
   54 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:59:14: error: expected ')'
   59 | func (tr *Set[K]) Descend(pivot K, iter func(key K) bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:59:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:59:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:62:9: error: expected declaration
   62 |         })
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:63:1: error: expected declaration
   63 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:66:14: error: expected ')'
   66 | func (tr *Set[K]) Load(key K) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:66:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:66:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:68:1: error: expected declaration
   68 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:72:14: error: expected ')'
   72 | func (tr *Set[K]) Min() (K, bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:72:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:72:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:74:9: error: expected declaration
   74 |         return key, ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:75:1: error: expected declaration
   75 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:79:14: error: expected ')'
   79 | func (tr *Set[K]) Max() (K, bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:79:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:79:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:81:9: error: expected declaration
   81 |         return key, ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:82:1: error: expected declaration
   82 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:86:14: error: expected ')'
   86 | func (tr *Set[K]) PopMin() (K, bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:86:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:86:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:88:9: error: expected declaration
   88 |         return key, ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:90:1: error: expected declaration
   90 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:94:14: error: expected ')'
   94 | func (tr *Set[K]) PopMax() (K, bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:94:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:94:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:96:9: error: expected declaration
   96 |         return key, ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:98:1: error: expected declaration
   98 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:102:14: error: expected ')'
  102 | func (tr *Set[K]) GetAt(index int) (K, bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:102:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:102:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:104:9: error: expected declaration
  104 |         return key, ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:105:1: error: expected declaration
  105 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:109:14: error: expected ')'
  109 | func (tr *Set[K]) DeleteAt(index int) (K, bool) {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:109:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:109:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:111:9: error: expected declaration
  111 |         return key, ok
      |         ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:112:1: error: expected declaration
  112 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:116:14: error: expected ')'
  116 | func (tr *Set[K]) Height() int {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:116:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:116:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:118:1: error: expected declaration
  118 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:121:16: error: expected ']'
  121 | type SetIter[K ordered] struct {
      |                ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:123:1: error: expected declaration
  123 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:126:14: error: expected ')'
  126 | func (tr *Set[K]) Iter() SetIter[K] {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:126:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:126:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:128:1: error: expected declaration
  128 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:132:20: error: expected ')'
  132 | func (iter *SetIter[K]) Seek(key K) bool {
      |                    ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:132:20: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:132:20: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:134:1: error: expected declaration
  134 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:138:20: error: expected ')'
  138 | func (iter *SetIter[K]) First() bool {
      |                    ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:138:20: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:138:20: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:140:1: error: expected declaration
  140 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:144:20: error: expected ')'
  144 | func (iter *SetIter[K]) Last() bool {
      |                    ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:144:20: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:144:20: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:146:1: error: expected declaration
  146 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:151:20: error: expected ')'
  151 | func (iter *SetIter[K]) Next() bool {
      |                    ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:151:20: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:151:20: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:153:1: error: expected declaration
  153 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:158:20: error: expected ')'
  158 | func (iter *SetIter[K]) Prev() bool {
      |                    ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:158:20: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:158:20: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:160:1: error: expected declaration
  160 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:163:20: error: expected ')'
  163 | func (iter *SetIter[K]) Key() K {
      |                    ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:163:20: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:163:20: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:165:1: error: expected declaration
  165 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:168:14: error: expected ')'
  168 | func (tr *Set[K]) Keys() []K {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:168:14: error: expected function name
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:168:14: error: expected ';' or newline after top level declaration
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/set.go:170:1: error: expected declaration
  170 | }
      | ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/btree.go:16:23: error: reference to undefined name 'NewGeneric'
   16 |                 base: NewGeneric(less),
      |                       ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/btree.go:30:23: error: reference to undefined name 'NewGenericOptions'
   30 |                 base: NewGenericOptions(less,
      |                       ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/generic.go:14:14: error: use of undefined type 'T'
   14 | type Generic[T any] struct {
      |              ^
/home/liveuser/go/pkg/mod/github.com/tidwall/btree@v1.3.1/generic.go:14:14: error: use of undefined type 'T'
# github.com/goccy/go-json/internal/runtime
/tmp/cc2urBDi.s: Assembler messages:
/tmp/cc2urBDi.s:1449: Error: junk `(*rtype).Align' after expression
/tmp/cc2urBDi.s:1488: Error: junk `(*rtype).FieldAlign' after expression
/tmp/cc2urBDi.s:1532: Error: junk `(*rtype).Method' after expression
/tmp/cc2urBDi.s:1599: Error: junk `(*rtype).MethodByName' after expression
/tmp/cc2urBDi.s:1692: Error: junk `(*rtype).NumMethod' after expression
/tmp/cc2urBDi.s:1731: Error: junk `(*rtype).Name' after expression
/tmp/cc2urBDi.s:1770: Error: junk `(*rtype).PkgPath' after expression
/tmp/cc2urBDi.s:1809: Error: junk `(*rtype).Size' after expression
/tmp/cc2urBDi.s:1848: Error: junk `(*rtype).String' after expression
/tmp/cc2urBDi.s:1887: Error: junk `(*rtype).Kind' after expression
/tmp/cc2urBDi.s:1926: Error: junk `(*rtype).Implements' after expression
/tmp/cc2urBDi.s:1965: Error: junk `(*rtype).AssignableTo' after expression
/tmp/cc2urBDi.s:2004: Error: junk `(*rtype).ConvertibleTo' after expression
/tmp/cc2urBDi.s:2043: Error: junk `(*rtype).Comparable' after expression
/tmp/cc2urBDi.s:2082: Error: junk `(*rtype).Bits' after expression
/tmp/cc2urBDi.s:2121: Error: junk `(*rtype).ChanDir' after expression
/tmp/cc2urBDi.s:2160: Error: junk `(*rtype).IsVariadic' after expression
/tmp/cc2urBDi.s:2199: Error: junk `(*rtype).Elem' after expression
/tmp/cc2urBDi.s:2245: Error: junk `(*rtype).Field' after expression
/tmp/cc2urBDi.s:2321: Error: junk `(*rtype).FieldByIndex' after expression
/tmp/cc2urBDi.s:2394: Error: junk `(*rtype).FieldByName' after expression
/tmp/cc2urBDi.s:2511: Error: junk `(*rtype).FieldByNameFunc' after expression
/tmp/cc2urBDi.s:2621: Error: junk `(*rtype).In' after expression
/tmp/cc2urBDi.s:2660: Error: junk `(*rtype).Key' after expression
/tmp/cc2urBDi.s:2701: Error: junk `(*rtype).Len' after expression
/tmp/cc2urBDi.s:2740: Error: junk `(*rtype).NumField' after expression
/tmp/cc2urBDi.s:2779: Error: junk `(*rtype).NumIn' after expression
/tmp/cc2urBDi.s:2818: Error: junk `(*rtype).NumOut' after expression
/tmp/cc2urBDi.s:2857: Error: junk `(*rtype).Out' after expression
/tmp/cc2urBDi.s:3322: Error: junk `(*rtype).Kind' after expression
/tmp/cc2urBDi.s:3338: Error: junk `(*rtype).Elem' after expression
/tmp/cc2urBDi.s:8378: Error: junk at end of line, first unrecognized character is `('
/tmp/cc2urBDi.s:8381: Error: unrecognized symbol type ""
/tmp/cc2urBDi.s:8381: Error: junk at end of line, first unrecognized character is `('
/tmp/cc2urBDi.s:8382: Error: expected comma after name `reflect.' in .size directive
/tmp/cc2urBDi.s:8383: Error: invalid character '(' in mnemonic
/tmp/cc2urBDi.s:8384: Error: junk at end of line, first unrecognized character is `('
# github.com/crate-crypto/go-ipa/bandersnatch/fr
/home/liveuser/go/pkg/mod/github.com/crate-crypto/go-ipa@v0.0.0-20220523130400-f11357ae11c7/bandersnatch/fr/element_mul_amd64.s:17:10: fatal error: textflag.h: No such file or directory
   17 | #include "textflag.h"
      |          ^~~~~~~~~~~~
compilation terminated.
# github.com/crate-crypto/go-ipa/bandersnatch/fp
/home/liveuser/go/pkg/mod/github.com/crate-crypto/go-ipa@v0.0.0-20220523130400-f11357ae11c7/bandersnatch/fp/element_mul_amd64.s:17:10: fatal error: textflag.h: No such file or directory
   17 | #include "textflag.h"
      |          ^~~~~~~~~~~~
compilation terminated.
# github.com/ugorji/go/codec
/home/liveuser/go/pkg/mod/github.com/ugorji/go/codec@v1.1.13/helper_unsafe.go:904:3: error: unsafeZeroArr is not a function; '//go:linkname' is only supported for functions
  904 | //go:linkname unsafeZeroArr runtime.zeroVal
      |   ^
# github.com/ledgerwatch/erigon/crypto/bn256/cloudflare
../../crypto/bn256/cloudflare/gfp_amd64.s: Assembler messages:
../../crypto/bn256/cloudflare/gfp_amd64.s:17: Warning: stray `\'
../../crypto/bn256/cloudflare/gfp_amd64.s:17: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:30: Error: junk at end of line, first unrecognized character is `\'
../../crypto/bn256/cloudflare/gfp_amd64.s:31: Error: no such instruction: `cmovqcc b0,a0 CMOVQCC b1,a1 CMOVQCC b2,a2 CMOVQCC b3,a3'
../../crypto/bn256/cloudflare/mul_amd64.h:111: Warning: stray `\'
../../crypto/bn256/cloudflare/mul_amd64.h:111: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/mul_amd64.h:111: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/mul_amd64.h:164: Warning: stray `\'
../../crypto/bn256/cloudflare/mul_amd64.h:164: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/mul_amd64.h:164: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/mul_amd64.h:167: Warning: stray `\'
../../crypto/bn256/cloudflare/mul_amd64.h:167: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:65: Warning: stray `\'
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:65: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:65: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:98: Warning: stray `\'
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:98: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:98: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:101: Warning: stray `\'
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:101: Error: junk `ADDQ 0(SP)' after expression
../../crypto/bn256/cloudflare/mul_bmi2_amd64.h:101: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:39: Error: no such instruction: `text ·gfpNeg(SB),0,$0-16'
../../crypto/bn256/cloudflare/gfp_amd64.s:40: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:40: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:41: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:41: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:42: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:42: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:43: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:43: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:45: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:45: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:46: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:46: Error: too many memory references for `sub'
../../crypto/bn256/cloudflare/gfp_amd64.s:47: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:47: Error: too many memory references for `sbb'
../../crypto/bn256/cloudflare/gfp_amd64.s:48: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:48: Error: too many memory references for `sbb'
../../crypto/bn256/cloudflare/gfp_amd64.s:49: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:49: Error: too many memory references for `sbb'
../../crypto/bn256/cloudflare/gfp_amd64.s:52: Error: junk at end of line, first unrecognized character is `\'
../../crypto/bn256/cloudflare/gfp_amd64.s:54: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:54: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:55: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:58: Error: no such instruction: `text ·gfpAdd(SB),0,$0-24'
../../crypto/bn256/cloudflare/gfp_amd64.s:59: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:59: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:60: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:60: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:62: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:62: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:65: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:65: Error: too many memory references for `add'
../../crypto/bn256/cloudflare/gfp_amd64.s:66: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:66: Error: too many memory references for `adc'
../../crypto/bn256/cloudflare/gfp_amd64.s:67: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:67: Error: too many memory references for `adc'
../../crypto/bn256/cloudflare/gfp_amd64.s:68: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:68: Error: too many memory references for `adc'
../../crypto/bn256/cloudflare/gfp_amd64.s:71: Error: junk at end of line, first unrecognized character is `\'
../../crypto/bn256/cloudflare/gfp_amd64.s:73: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:73: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:74: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:77: Error: no such instruction: `text ·gfpSub(SB),0,$0-24'
../../crypto/bn256/cloudflare/gfp_amd64.s:78: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:78: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:79: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:79: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:81: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:81: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:83: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:83: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:84: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:84: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:85: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:85: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:86: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:86: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:89: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:89: Error: too many memory references for `sub'
../../crypto/bn256/cloudflare/gfp_amd64.s:90: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:90: Error: too many memory references for `sbb'
../../crypto/bn256/cloudflare/gfp_amd64.s:91: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:91: Error: too many memory references for `sbb'
../../crypto/bn256/cloudflare/gfp_amd64.s:92: Error: junk `(SI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:92: Error: too many memory references for `sbb'
../../crypto/bn256/cloudflare/gfp_amd64.s:94: Error: no such instruction: `cmovqcc AX,R12'
../../crypto/bn256/cloudflare/gfp_amd64.s:95: Error: no such instruction: `cmovqcc AX,R13'
../../crypto/bn256/cloudflare/gfp_amd64.s:96: Error: no such instruction: `cmovqcc AX,R14'
../../crypto/bn256/cloudflare/gfp_amd64.s:97: Error: no such instruction: `cmovqcc AX,R15'
../../crypto/bn256/cloudflare/gfp_amd64.s:99: Error: too many memory references for `add'
../../crypto/bn256/cloudflare/gfp_amd64.s:100: Error: too many memory references for `adc'
../../crypto/bn256/cloudflare/gfp_amd64.s:101: Error: too many memory references for `adc'
../../crypto/bn256/cloudflare/gfp_amd64.s:102: Error: too many memory references for `adc'
../../crypto/bn256/cloudflare/gfp_amd64.s:104: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:104: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:105: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:108: Error: no such instruction: `text ·gfpMul(SB),0,$160-24'
../../crypto/bn256/cloudflare/gfp_amd64.s:109: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:109: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:110: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:110: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:113: Error: junk `(SB)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:113: Error: operand size mismatch for `cmp'
../../crypto/bn256/cloudflare/gfp_amd64.s:116: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:116: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:117: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:118: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:119: Error: junk at end of line, first unrecognized character is `\'
../../crypto/bn256/cloudflare/gfp_amd64.s:123: Error: junk `(DI)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:123: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:124: Error: junk at end of line, first unrecognized character is `\'
../../crypto/bn256/cloudflare/gfp_amd64.s:127: Error: junk `(FP)' after expression
../../crypto/bn256/cloudflare/gfp_amd64.s:127: Error: too many memory references for `movq'
../../crypto/bn256/cloudflare/gfp_amd64.s:128: Error: too many memory references for `movq'
# github.com/torquem-ch/mdbx-go/mdbx
cgo-gcc-prolog: In function '_cgo_d410994677a0_Cmacro_MDBX_LOGGER_DONTCHANGE':
cgo-gcc-prolog:47:11: error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic]
cgo-gcc-prolog:47:9: error: ISO C forbids assignment between function pointer and 'void *' [-Werror=pedantic]
cgo-gcc-prolog:49:9: error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic]
cgo-gcc-prolog:49:9: error: ISO C forbids return between function pointer and 'void *' [-Werror=pedantic]
cc1: all warnings being treated as errors
make: *** [Makefile:91: erigon.cmd] Error 2
[liveuser@localhost-live erigon]$
AskAlexSharov commented 2 years ago

« when using gccgo toolchain» - never used gccgo. And it doesn’t support go1.18

So, please don’t use gccgo

ytrezq commented 2 years ago

@AskAlexSharov that’s the point of the message above : I’m using the official go. Anyway, as you can the errors above are C++ compiler errors. Not golang ones.

AskAlexSharov commented 2 years ago

@ytrezq then bug-report must contain some related context: go env cc --version uname -a

from https://github.com/ledgerwatch/erigon#system-requirements - Golang version >= 1.18 , GCC 10+

mandrigin commented 2 years ago

@AskAlexSharov that’s the point of the message above : I’m using the official go. Anyway, as you can the errors above are C++ compiler errors. Not golang ones.

If you are using Ubuntu, they don’t ship proper Go version, it is something like 1.15 there, when the official Go release is 1.19. And I see most of the errors you shared are from pre-generics Go version.

But yeah, as Alex says, provide your build config.

ytrezq commented 2 years ago

@AskAlexSharov

from https://github.com/ledgerwatch/erigon#system-requirements - Golang version >= 1.18 , GCC 10+

[liveuser@localhost-live erigon]$ go env
cc --version
uname -a
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/liveuser/.cache/go-build"
GOENV="/home/liveuser/.config/go/env"
GOEXE=""
GOEXPERIMENT="fieldtrack,regabiwrappers"
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/liveuser/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/liveuser/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/libexec/gcc/x86_64-redhat-linux/12"
GOVCS=""
GOVERSION="unknown"
GCCGO="/usr/bin/gccgo"
GOAMD64="v1"
AR="gcc-ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/erigon/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1474644251=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
cc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-1)
Copyright © 2022 Free Software Foundation, Inc.
Ce logiciel est un logiciel libre; voir les sources pour les conditions de copie.  Il n'y a
AUCUNE GARANTIE, pas même pour la COMMERCIALISATION ni L'ADÉQUATION À UNE TÂCHE PARTICULIÈRE.

Linux localhost-live 5.10.7-201.fc34.x86_64 #1 SMP Mon Jan 18 14:44:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[liveuser@localhost-live erigon]$
ytrezq commented 2 years ago

If you are using Ubuntu, they don’t ship proper Go version, it is something like 1.15 there, when the official Go release is 1.19. And I see most of the errors you shared are from pre-generics Go version.

But yeah, as Alex says, provide your build config.

@mandrigin : not an issue with a full up to date Fedora 37.

mandrigin commented 2 years ago

If you are using Ubuntu, they don’t ship proper Go version, it is something like 1.15 there, when the official Go release is 1.19. And I see most of the errors you shared are from pre-generics Go version. But yeah, as Alex says, provide your build config.

@mandrigin : not an issue with a full up to date Fedora 37.

what do go version show?

this part is weird

GOVERSION="unknown"
mandrigin commented 2 years ago
error: use of undefined type 'T'
   89 | type FreeListG[T any] struct {

This error shows that your Golang doesn't support generics. Generics were introduced in go 1.18.

ytrezq commented 2 years ago

@mandrigin :

[liveuser@localhost-live erigon]$ go version
go version unknown linux/amd64

the package manager is listing version 1.19.

You don’t provide binaries in the name of multiple environment, but please realize the problem is even worst for compiling.

mandrigin commented 2 years ago

@mandrigin :

[liveuser@localhost-live erigon]$ go version
go version unknown linux/amd64

the package manager is listing version 1.19.

You don’t provide binaries in the name of multiple environment, but please realize the problem is even worst for compiling.

I’ve don’t provide official binaries for now because we are a small team and we had other things to focus on. We are not against that in principal, it just needs some attention and work that we don’t have.

“Version unknown” is suspicious, maybe the package manager is broken or something. I can easily compile on both go 1.18 and 1.19 on Mac and Linux alike.

revitteth commented 1 year ago

Please check latest release, which has binaries attached :) https://github.com/ledgerwatch/erigon/releases/tag/v2.39.0