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

Gitea can't run due to GLIBC version incompatibility #14576

Closed
1 of 4 tasks
typeless opened this issue Feb 5, 2021 · 5 comments · Fixed by #14594
Closed
1 of 4 tasks

Gitea can't run due to GLIBC version incompatibility #14576

typeless opened this issue Feb 5, 2021 · 5 comments · Fixed by #14594

Comments

@typeless
Copy link
Contributor

typeless commented Feb 5, 2021

  • Gitea version (or commit ref):
go version go1.15.5 linux/amd64
  • Git version:
    2.26

  • Operating system:
    Ubuntu 20.04.2 LTS

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite

Description

I built Gitea for my Synology NAS and it can't run.

/volume1/homes/git/gitea/gitea: /lib/libc.so.6: version `GLIBC_2.28' not found (required by /volume1/homes/git/gitea/gitea)

I suspect this would affect all users who run Gitea on older embedded devices (and unable to upgrade the system).

@typeless
Copy link
Contributor Author

typeless commented Feb 5, 2021

A quick fix is to use musl libc with the following build command:

CC=musl-gcc LDFLAGS='--linkmode external --extldflags "-static"' TAGS='bindata sqlite sqlite_unlock_notify' make build

I can send a patch for that. But I am not sure if I should integrate it into the default build target, or add a new make target.
Maybe leaving the issue open for others to consult is just good enough.

@lunny
Copy link
Member

lunny commented Feb 5, 2021

Is this a Golang related problem?

@typeless
Copy link
Contributor Author

typeless commented Feb 5, 2021

@lunny I don't think so. It's not strictly a Gitea problem either. But it does upset users when it happened to them (read: me) and the root cause is not obvious in the first place. All it shows is Gitea broken after an upgrade.

@zeripath
Copy link
Contributor

zeripath commented Feb 7, 2021

You're actually missing a few other tags that should be added for completely static builds. netgo and osusergo jump to mind.

zeripath added a commit to zeripath/gitea that referenced this issue Feb 7, 2021
Fix go-gitea#14576

Signed-off-by: Andrew Thornton <art27@cantab.net>
@typeless
Copy link
Contributor Author

typeless commented Feb 8, 2021

@zeripath Thanks for the information. I was not aware of those build tags.

lunny added a commit that referenced this issue Feb 8, 2021
Fix #14576

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants