Skip to content
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

Can't compile gitea #32036

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