Skip to content

Can't compile gitea #32036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
somera opened this issue Sep 13, 2024 · 11 comments
Closed

Can't compile gitea #32036

somera opened this issue Sep 13, 2024 · 11 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@somera
Copy link

somera commented Sep 13, 2024

Description

I try to compile gitea 1.22.2 (5e36e9f - (HEAD, tag: v1.22.2) Add changelog for 1.22.2 (#31935) (vor 8 Tagen) ) from source. https://docs.gitea.com/installation/install-from-source

I get this

make build

...

go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading github.com/skeema/knownhosts v1.2.2
go: downloading github.com/xanzy/ssh-agent v0.3.3
go: downloading github.com/cloudflare/circl v1.3.7
package command-line-arguments
        imports flag
        imports fmt
        imports internal/fmtsort
        imports reflect
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/charset/escape.go:4: running "go": exit status 1
make: *** [Makefile:781: generate-go] Error 1

error.

My tools:

  • go version go1.22.7 linux/amd64
  • node v21.1.0
  • npm 10.2.0
  • GNU Make 4.3

Gitea Version

1.22.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.46.0

Operating System

Ubuntu 22.04.5 LTS (GNU/Linux 6.8.0-40-generic x86_64)

How are you running Gitea?

Just try to compile

Database

None

@somera somera changed the title Can't compite gitea Can't compile gitea Sep 13, 2024
@nephatrine
Copy link
Contributor

nephatrine commented Sep 14, 2024

You're on 22.04 LTS and not 24.04 LTS? It looks like Jammy by default has much older tools than what you specify so I am going to assume that was just a typo.

I got a fresh ubuntu:24.04 container open and the following was all it took to build gitea from that baseline.

apt install npm nodejs golang
git -C /tmp clone -b v1.22.2 --single-branch --depth=1 https://github.com/go-gitea/gitea.git
cd /tmp/gitea
export TAGS="bindata sqlite sqlite_unlock_notify"
make frontend
make backend

What TAGS are you setting?

@somera
Copy link
Author

somera commented Sep 14, 2024

I install all the tools manually (https://github.com/nvm-sh/nvm and go website). And not with apt.

Everytime I execute make build.

It works for me with latest go 1,21 version go version go1.21.13 linux/amd64.

But I get problems with go 1.22.x

[Sa Sep 14][11:13:07][xxx]@[xxx]:[~]$ go version
go version go1.22.1 linux/amd64
[Sa Sep 14][11:13:13][xxx]@[xxx]:[/tmp/gitea]$ make backend
Running go generate...
package command-line-arguments
        imports flag
        imports fmt
        imports internal/fmtsort
        imports reflect
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/charset/escape.go:4: running "go": exit status 1
make: *** [Makefile:781: generate-go] Error 1

make frontend is working.

Which go version are you using?

The question is:

  • Is this go problem?
  • Is this gitea problem?
  • is this Ubuntu 22..04.x problem?

I try this on an Ubuntu 24.04.x VM.

@somera
Copy link
Author

somera commented Sep 14, 2024

With an Ubuntu 24.04 VM and installed tools with apt (go 1.22.2) it works.

For compiling go 1.22 or higher should be used

image

But in Ubuntu 22.04.x it works for me only with 1.21.x and not with 1.22.x.

And with Ubuntu 22.04.x and go 1.22.x I get this

$ TAGS="bindata" make build (or TAGS="bindata" make backend)
Running go generate...
package command-line-arguments
        imports flag
        imports fmt
        imports internal/fmtsort
        imports reflect
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/charset/escape.go:4: running "go": exit status 1
go: downloading github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
go: downloading github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c
package command-line-arguments
        imports fmt
        imports internal/fmtsort
        imports sort
        imports slices
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/migration/schemas_bindata.go:8: running "go": exit status 1
package command-line-arguments
        imports fmt
        imports internal/fmtsort
        imports sort
        imports slices
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/options/options_bindata.go:8: running "go": exit status 1
package command-line-arguments
        imports fmt
        imports internal/fmtsort
        imports sort
        imports slices
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/public/public_bindata.go:8: running "go": exit status 1
package command-line-arguments
        imports fmt
        imports internal/fmtsort
        imports sort
        imports slices
        imports iter: build constraints exclude all Go files in /usr/local/go/src/iter
modules/templates/templates_bindata.go:8: running "go": exit status 1
make: *** [Makefile:781: generate-go] Error 1

errors.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 14, 2024

imports iter: build constraints exclude all Go files in /usr/local/go/src/iter

iter is a Go 1.23 package https://pkg.go.dev/iter?tab=versions

Maybe some packages which import iter went into the code base (maybe it is a dependency problem)

So I guess you could try to compile with Go 1.23?


Another guess: not sure whether your local Golang is correctly installed.

@somera
Copy link
Author

somera commented Sep 14, 2024

iter is a Go 1.23 package https://pkg.go.dev/iter?tab=versions

On Ubuntu 22.04. it works with go 1.21.x
On Ubuntu 24.04. it works with go 1.22.x

Maybe some packages which import iter went into the code base (maybe it is a dependency problem)

So I guess you could try to compile with Go 1.23?

Another guess: not sure whether your local Golang is correctly installed.

$ lsb_release -a
LSB Version:    core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
$ tar -C /usr/local -xzf /data-files/tools/go/go1.23.1.linux-amd64.tar.gz
$ go version
go version go1.23.1 linux/amd64
$ go clean -modcache
$ git -C /tmp clone -b v1.22.2 --single-branch --depth=1 https://github.com/go-gitea/gitea.git
$ cd /tmp/gitea
$ TAGS="bindata" make backend
Running go generate...
go: downloading github.com/urfave/cli/v2 v2.27.2
go: downloading github.com/google/go-github/v57 v57.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading xorm.io/builder v0.3.13
go: downloading code.gitea.io/actions-proto-go v0.4.0
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading gitea.com/gitea/act v0.259.1
go: downloading github.com/robfig/cron/v3 v3.0.1
go: downloading google.golang.org/protobuf v1.33.0
go: downloading xorm.io/xorm v1.3.8
go: downloading github.com/42wim/sshsig v0.0.0-20211121163825-841cf5bbc121
go: downloading github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
go: downloading golang.org/x/crypto v0.23.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/go-webauthn/webauthn v0.10.2
go: downloading github.com/pquerna/otp v1.4.0
go: downloading strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
go: downloading github.com/go-sql-driver/mysql v1.8.0
go: downloading github.com/lib/pq v1.10.9
go: downloading github.com/microsoft/go-mssqldb v1.7.0
go: downloading github.com/gobwas/glob v0.2.3
go: downloading gitea.com/go-chi/session v0.0.0-20240316035857-16768d98ec96
go: downloading github.com/caddyserver/certmagic v0.21.3
go: downloading github.com/felixge/fgprof v0.9.4
go: downloading github.com/golang-jwt/jwt/v5 v5.2.1
go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: downloading github.com/klauspost/cpuid/v2 v2.2.7
go: downloading github.com/mattn/go-isatty v0.0.20
go: downloading github.com/anchore/archiver/v3 v3.5.2
go: downloading github.com/stretchr/testify v1.9.0
go: downloading github.com/tstranex/u2f v1.0.0
go: downloading github.com/6543/go-version v1.3.1
go: downloading github.com/go-enry/go-enry/v2 v2.8.7
go: downloading github.com/go-testfixtures/testfixtures/v3 v3.10.0
go: downloading golang.org/x/text v0.16.0
go: downloading github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
go: downloading github.com/yohcop/openid-go v1.0.1
go: downloading golang.org/x/image v0.18.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading gitea.com/go-chi/cache v0.2.0
go: downloading github.com/redis/go-redis/v9 v9.6.0
go: downloading github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
go: downloading golang.org/x/net v0.25.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/djherbis/buffer v1.2.0
go: downloading github.com/djherbis/nio/v3 v3.0.1
go: downloading github.com/yuin/goldmark v1.7.0
go: downloading golang.org/x/sys v0.20.0
go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/google/go-querystring v1.1.0
go: downloading github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
go: downloading github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7
go: downloading github.com/minio/minio-go/v7 v7.0.69
go: downloading github.com/editorconfig/editorconfig-core-go/v2 v2.6.1
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.4
go: downloading github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913
go: downloading github.com/alecthomas/chroma/v2 v2.13.0
go: downloading github.com/klauspost/compress v1.17.8
go: downloading github.com/blevesearch/bleve/v2 v2.4.2
go: downloading github.com/olivere/elastic/v7 v7.0.32
go: downloading github.com/ethantkoenig/rupture v1.0.1
go: downloading github.com/meilisearch/meilisearch-go v0.26.2
go: downloading github.com/go-ldap/ldap/v3 v3.4.6
go: downloading github.com/gorilla/sessions v1.2.2
go: downloading github.com/markbates/goth v1.79.0
go: downloading code.gitea.io/sdk/gitea v0.17.1
go: downloading github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
go: downloading github.com/xanzy/go-gitlab v0.100.0
go: downloading golang.org/x/oauth2 v0.18.0
go: downloading gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed
go: downloading github.com/microcosm-cc/bluemonday v1.0.26
go: downloading mvdan.cc/xurls/v2 v2.5.0
go: downloading github.com/buildkite/terminal-to-html/v3 v3.12.1
go: downloading github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
go: downloading github.com/yuin/goldmark-meta v1.1.0
go: downloading github.com/huandu/xstrings v1.4.0
go: downloading filippo.io/edwards25519 v1.1.0
go: downloading github.com/unknwon/com v1.0.1
go: downloading github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9
go: downloading github.com/golang-sql/sqlexp v0.1.0
go: downloading github.com/caddyserver/zerossl v0.1.3
go: downloading github.com/libdns/libdns v0.2.2
go: downloading github.com/mholt/acmez/v2 v2.0.1
go: downloading github.com/miekg/dns v1.1.59
go: downloading github.com/zeebo/blake3 v0.2.3
go: downloading go.uber.org/zap v1.27.0
go: downloading github.com/niklasfasching/go-org v1.7.0
go: downloading codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570
go: downloading github.com/prometheus/client_golang v1.19.0
go: downloading github.com/syndtr/goleveldb v1.0.0
go: downloading github.com/opencontainers/image-spec v1.1.0
go: downloading github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
go: downloading github.com/ulikunitz/xz v0.5.11
go: downloading github.com/sassoftware/go-rpmutils v0.3.0
go: downloading gitea.com/lunny/levelqueue v0.4.2-0.20230414023320-3c0159fe0fe4
go: downloading github.com/gliderlabs/ssh v0.3.6
go: downloading github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
go: downloading github.com/go-chi/chi/v5 v5.0.12
go: downloading connectrpc.com/connect v1.15.0
go: downloading google.golang.org/grpc v1.62.1
go: downloading github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5
go: downloading github.com/opencontainers/go-digest v1.0.0
go: downloading github.com/go-chi/cors v1.2.1
go: downloading github.com/go-ap/activitypub v0.0.0-20240316125321-b61fd6a83225
go: downloading github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73
go: downloading github.com/chi-middleware/proxy v1.1.1
go: downloading gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098
go: downloading github.com/gorilla/feeds v1.2.0
go: downloading github.com/sergi/go-diff v1.3.1
go: downloading github.com/go-co-op/gocron v1.37.0
go: downloading github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358
go: downloading github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056
go: downloading gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
go: downloading github.com/dimiro1/reply v0.0.0-20200315094148-d0136a4c9e21
go: downloading github.com/emersion/go-imap v1.2.1
go: downloading github.com/jhillyerd/enmime v1.2.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading gitea.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
go: downloading github.com/PuerkitoBio/goquery v1.9.1
go: downloading github.com/andybalholm/brotli v1.1.0
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/nwaples/rardecode v1.1.3
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8
go: downloading github.com/ClickHouse/clickhouse-go/v2 v2.22.0
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading github.com/google/go-tpm v0.9.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
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/minio/md5-simd v1.1.2
go: downloading github.com/minio/sha256-simd v1.0.1
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading golang.org/x/mod v0.17.0
go: downloading github.com/dlclark/regexp2 v1.11.0
go: downloading github.com/blevesearch/bleve_index_api v1.1.10
go: downloading github.com/blevesearch/geo v0.1.20
go: downloading github.com/blevesearch/segment v0.9.1
go: downloading github.com/blevesearch/upsidedown_store_api v1.0.2
go: downloading github.com/golang/protobuf v1.5.4
go: downloading github.com/boombuler/barcode v1.0.1
go: downloading github.com/golang-jwt/jwt/v4 v4.5.0
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/valyala/fasthttp v1.52.0
go: downloading github.com/go-asn1-ber/asn1-ber v1.5.5
go: downloading github.com/gorilla/securecookie v1.1.2
go: downloading github.com/gorilla/mux v1.8.1
go: downloading github.com/markbates/going v1.0.3
go: downloading github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/hashicorp/go-retryablehttp v0.7.7
go: downloading golang.org/x/time v0.5.0
go: downloading github.com/goccy/go-json v0.10.2
go: downloading github.com/aymerick/douceur v0.2.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/client_model v0.6.0
go: downloading github.com/prometheus/common v0.50.0
go: downloading github.com/prometheus/procfs v0.13.0
go: downloading github.com/couchbase/go-couchbase v0.1.1
go: downloading github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c
go: downloading git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078
go: downloading github.com/go-ap/errors v0.0.0-20240304112515-6077fa9c17b0
go: downloading github.com/valyala/fastjson v1.6.4
go: downloading github.com/go-git/go-git/v5 v5.11.0
go: downloading github.com/rhysd/actionlint v1.6.27
go: downloading go.uber.org/atomic v1.11.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf
go: downloading github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43
go: downloading github.com/andybalholm/cascadia v1.3.2
go: downloading github.com/go-webauthn/x v0.1.9
go: downloading github.com/fxamacker/cbor/v2 v2.6.0
go: downloading github.com/ClickHouse/ch-go v0.61.5
go: downloading go.opentelemetry.io/otel/trace v1.24.0
go: downloading go.opentelemetry.io/otel v1.24.0
go: downloading github.com/rs/xid v1.5.0
go: downloading github.com/RoaringBitmap/roaring v1.9.3
go: downloading github.com/blevesearch/scorch_segment_api/v2 v2.2.15
go: downloading github.com/blevesearch/vellum v1.0.10
go: downloading github.com/blevesearch/zapx/v11 v11.3.10
go: downloading github.com/blevesearch/zapx/v12 v12.3.10
go: downloading github.com/blevesearch/zapx/v13 v13.3.10
go: downloading github.com/blevesearch/zapx/v14 v14.3.10
go: downloading github.com/blevesearch/zapx/v15 v15.3.13
go: downloading github.com/blevesearch/zapx/v16 v16.1.5
go: downloading go.etcd.io/bbolt v1.3.9
go: downloading github.com/blevesearch/gtreap v0.1.1
go: downloading github.com/golang/geo v0.0.0-20230421003525-6adc56603217
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/valyala/bytebufferpool v1.0.0
go: downloading cloud.google.com/go/compute/metadata v0.2.3
go: downloading github.com/gorilla/css v1.0.1
go: downloading cloud.google.com/go/compute v1.25.1
go: downloading github.com/couchbase/gomemcached v0.3.1
go: downloading github.com/couchbase/goutils v0.1.2
go: downloading github.com/go-git/go-billy/v5 v5.5.0
go: downloading github.com/mattn/go-runewidth v0.0.15
go: downloading github.com/fatih/color v1.16.0
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading golang.org/x/sync v0.7.0
go: downloading github.com/cention-sany/utf7 v0.0.0-20170124080048-26cad61bd60a
go: downloading dario.cat/mergo v1.0.0
go: downloading github.com/ProtonMail/go-crypto v1.0.0
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/x448/float16 v0.8.4
go: downloading github.com/paulmach/orb v0.11.1
go: downloading github.com/shopspring/decimal v1.3.1
go: downloading github.com/go-faster/city v1.0.1
go: downloading github.com/go-faster/errors v0.7.1
go: downloading github.com/segmentio/asm v1.2.0
go: downloading github.com/bits-and-blooms/bitset v1.13.0
go: downloading github.com/blevesearch/mmap-go v1.0.4
go: downloading github.com/blevesearch/snowballstem v0.9.0
go: downloading github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
go: downloading github.com/rivo/uniseg v0.4.7
go: downloading github.com/cyphar/filepath-securejoin v0.2.4
go: downloading github.com/pjbgf/sha1cd v0.3.0
go: downloading github.com/emirpasic/gods v1.18.1
go: downloading github.com/blevesearch/go-porterstemmer v1.0.3
go: downloading gopkg.in/warnings.v0 v0.1.2
go: downloading github.com/kevinburke/ssh_config v1.2.0
go: downloading github.com/skeema/knownhosts v1.2.2
go: downloading github.com/xanzy/ssh-agent v0.3.3
go: downloading github.com/cloudflare/circl v1.3.7
# runtime
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:101:2: other declaration of minSizeForMallocHeader
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:60:6: heapBitsInSpan redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:112:6: other declaration of heapBitsInSpan
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:243:6: bulkBarrierPreWrite redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:418:6: other declaration of bulkBarrierPreWrite
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:316:6: bulkBarrierPreWriteSrcOnly redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:504:6: other declaration of bulkBarrierPreWriteSrcOnly
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:695:6: heapSetType redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:705:6: other declaration of heapSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:704:6: getgcmask redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:1750:6: other declaration of getgcmask
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:798:6: userArenaHeapBitsSetType redeclared in this block
        /usr/local/go/src/runtime/arena.go:553:6: other declaration of userArenaHeapBitsSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:891:6: typePointers redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:122:6: other declaration of typePointers
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: heapBitsSlice redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:587:6: other declaration of heapBitsSlice
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: too many errors
modules/charset/escape.go:4: running "go": exit status 1
go: downloading github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
go: downloading github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c
# runtime
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:101:2: other declaration of minSizeForMallocHeader
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:60:6: heapBitsInSpan redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:112:6: other declaration of heapBitsInSpan
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:243:6: bulkBarrierPreWrite redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:418:6: other declaration of bulkBarrierPreWrite
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:316:6: bulkBarrierPreWriteSrcOnly redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:504:6: other declaration of bulkBarrierPreWriteSrcOnly
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:695:6: heapSetType redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:705:6: other declaration of heapSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:704:6: getgcmask redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:1750:6: other declaration of getgcmask
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:798:6: userArenaHeapBitsSetType redeclared in this block
        /usr/local/go/src/runtime/arena.go:553:6: other declaration of userArenaHeapBitsSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:891:6: typePointers redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:122:6: other declaration of typePointers
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: heapBitsSlice redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:587:6: other declaration of heapBitsSlice
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: too many errors
modules/migration/schemas_bindata.go:8: running "go": exit status 1
# runtime
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:101:2: other declaration of minSizeForMallocHeader
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:60:6: heapBitsInSpan redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:112:6: other declaration of heapBitsInSpan
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:243:6: bulkBarrierPreWrite redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:418:6: other declaration of bulkBarrierPreWrite
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:316:6: bulkBarrierPreWriteSrcOnly redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:504:6: other declaration of bulkBarrierPreWriteSrcOnly
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:695:6: heapSetType redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:705:6: other declaration of heapSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:704:6: getgcmask redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:1750:6: other declaration of getgcmask
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:798:6: userArenaHeapBitsSetType redeclared in this block
        /usr/local/go/src/runtime/arena.go:553:6: other declaration of userArenaHeapBitsSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:891:6: typePointers redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:122:6: other declaration of typePointers
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: heapBitsSlice redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:587:6: other declaration of heapBitsSlice
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: too many errors
modules/options/options_bindata.go:8: running "go": exit status 1
# runtime
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:101:2: other declaration of minSizeForMallocHeader
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:60:6: heapBitsInSpan redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:112:6: other declaration of heapBitsInSpan
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:243:6: bulkBarrierPreWrite redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:418:6: other declaration of bulkBarrierPreWrite
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:316:6: bulkBarrierPreWriteSrcOnly redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:504:6: other declaration of bulkBarrierPreWriteSrcOnly
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:695:6: heapSetType redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:705:6: other declaration of heapSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:704:6: getgcmask redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:1750:6: other declaration of getgcmask
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:798:6: userArenaHeapBitsSetType redeclared in this block
        /usr/local/go/src/runtime/arena.go:553:6: other declaration of userArenaHeapBitsSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:891:6: typePointers redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:122:6: other declaration of typePointers
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: heapBitsSlice redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:587:6: other declaration of heapBitsSlice
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: too many errors
modules/public/public_bindata.go:8: running "go": exit status 1
# runtime
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:101:2: other declaration of minSizeForMallocHeader
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:60:6: heapBitsInSpan redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:112:6: other declaration of heapBitsInSpan
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:243:6: bulkBarrierPreWrite redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:418:6: other declaration of bulkBarrierPreWrite
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:316:6: bulkBarrierPreWriteSrcOnly redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:504:6: other declaration of bulkBarrierPreWriteSrcOnly
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:695:6: heapSetType redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:705:6: other declaration of heapSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:704:6: getgcmask redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:1750:6: other declaration of getgcmask
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:798:6: userArenaHeapBitsSetType redeclared in this block
        /usr/local/go/src/runtime/arena.go:553:6: other declaration of userArenaHeapBitsSetType
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:891:6: typePointers redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:122:6: other declaration of typePointers
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: heapBitsSlice redeclared in this block
        /usr/local/go/src/runtime/mbitmap.go:587:6: other declaration of heapBitsSlice
/usr/local/go/src/runtime/mbitmap_noallocheaders.go:936:6: too many errors
modules/templates/templates_bindata.go:8: running "go": exit status 1
make: *** [Makefile:781: generate-go] Error 1

@somera
Copy link
Author

somera commented Sep 14, 2024

I compile gitea every time cause I need the frontend for my nginx setup. make frontend works.

@eeyrjmr
Copy link
Contributor

eeyrjmr commented Sep 14, 2024

are you sure you are trying to compile the 1.22 branch?
Typically Gitea bumps the minimum golang version when a new version is being released

co-incidently this means that gitea version and golang versions align

https://github.com/go-gitea/gitea/blame/main/go.mod

gitea-1.24 will need golang-1.23 #31855
gitea-1.23 will need golang-1.22
gitea-1.22 uses golang-1.22 #29869
gitea-1.21 uses golang-1.21 #26878

@wxiaoguang
Copy link
Contributor

runtime

/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
/usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize

Your local Golang toolchain seems to be corrupted.

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Sep 14, 2024
@somera
Copy link
Author

somera commented Sep 14, 2024

are you sure you are trying to compile the 1.22 branch? Typically Gitea bumps the minimum golang version when a new version is being released

yep. As I write in my initial post.

I'm on this

5e36e9f

commit.

@somera
Copy link
Author

somera commented Sep 14, 2024

runtime

/usr/local/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
/usr/local/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize

Your local Golang toolchain seems to be corrupted.

uf ... looks like layer-8 problem.

I checked my go update script to newer version. I made some changes days ago and ... rm -rf /usr/local/go was comment out. Now I reinstalled go and it works.

This is really embarrassing. ;)

@somera somera closed this as completed Sep 14, 2024
@techknowlogick
Copy link
Member

@somera no worries:) happens to everyone. glad it was able to be solved.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

5 participants