Building Gitea will build go-sqlite3 with or without the sqlite build tag #894

Closed
opened 2025-11-02 03:40:38 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @dubeg on GitHub (Jul 17, 2017).

  • Gitea version (or commit ref): master
  • Git version: 2.8.1
  • Operating system: Windows 10
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
    • Not relevant
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    • Not relevant

Description

Even without specifying "sqlite" as a build tag, the command go build main.go will also build the vendor go-sqlite3, which requires gcc.

Screenshots

sqlitebuild

Note

Currently, two of Gitea's files import this vendor: models/models_sqlite.go and models/unit_tests.go. The former has the sqlite build constraint, while the latter does not. This is probably the root of this issue.

Originally created by @dubeg on GitHub (Jul 17, 2017). - Gitea version (or commit ref): master - Git version: 2.8.1 - Operating system: Windows 10 - Database: - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - [x] Not relevant - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: - [x] Not relevant ## Description Even without specifying "sqlite" as a build tag, the command `go build main.go` will also build the vendor `go-sqlite3`, which requires gcc. ## Screenshots ![sqlitebuild](https://user-images.githubusercontent.com/6020602/28276961-660b52f2-6ae6-11e7-9bf4-b8cdef18ee9f.PNG) ## Note Currently, two of Gitea's files import this vendor: `models/models_sqlite.go` and `models/unit_tests.go`. The former has the `sqlite` build constraint, while the latter does not. This is probably the root of this issue.
GiteaMirror added the type/bugtopic/build labels 2025-11-02 03:40:38 -06:00
Author
Owner

@go2sh commented on GitHub (Jul 17, 2017):

The sqlite tag only touches the final product not the tests. One could argue to add a different command for building the tests. But this an enhancement not a bug.

@go2sh commented on GitHub (Jul 17, 2017): The `sqlite` tag only touches the final product not the tests. One could argue to add a different command for building the tests. But this an enhancement not a bug.
Author
Owner

@lafriks commented on GitHub (Jul 17, 2017):

@go2sh if it is not possible to build gitea without gcc than it is a bug

@lafriks commented on GitHub (Jul 17, 2017): @go2sh if it is not possible to build gitea without gcc than it is a bug
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#894