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

Fix build docker with sqlite3 musl error #234

Merged
merged 3 commits into from Dec 14, 2023
Merged

Fix build docker with sqlite3 musl error #234

merged 3 commits into from Dec 14, 2023

Conversation

huiyifyj
Copy link
Collaborator

@huiyifyj huiyifyj commented Dec 12, 2023

Fix build docker error in github actions job#923.

This is now broken in latest golang:alpine image (from alpine3.18 to alpine3.19).
Alpine 3.19 was released on 2023-12-07.1 It is shipped with gcc 13.2 and musl-dev 2.14.2
The LFS64 interfaces were marked as deprecated for musl 1.2.4.3

As a temporary workaround, builds broken by this change can be fixed short-term by adding -D_LARGEFILE64_SOURCE to CFLAGS, but should be fixed to use the standard interfaces, refer to go-sqlite3 issue#1164.

Footnotes

  1. Alpine 3.19.0 release note

  2. Package musl-dev

  3. musl git commit: remove LFS64 programming interfaces (macro-only) from _GNU_SOURCE

This is now broken in latest `golang:alpine` image (from alpine3.18 to alpine3.19).
Alpine 3.19 was released on 2023-12-07. [^1] It is shipped with gcc 13.2 and musl-dev 2.14. [^2]
The LFS64 interfaces were marked as deprecated for musl 1.2.4. [^3]

As a temporary workaround, builds broken by this change can be fixed short-term by adding `-D_LARGEFILE64_SOURCE` to `CFLAGS`, but should be fixed to use the standard interfaces, refer to go-sqlite3 issue 1164. [^4]

---

[^1]: https://www.alpinelinux.org/posts/Alpine-3.19.0-released.html
[^2]: https://pkgs.alpinelinux.org/packages?name=musl-dev&branch=v3.19
[^3]: https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc
[^4]: mattn/go-sqlite3#1164
@huiyifyj huiyifyj self-assigned this Dec 12, 2023
@huiyifyj huiyifyj added docker 🐳 Some question about docker CI/CD ⚙️ Continuous integration and continuous delivery/continuous deployment. labels Dec 12, 2023
Comment the `if` condition for 'deploy-docker' job temporarily, to run build docker image CI/CD job in non-main branch.
@huiyifyj huiyifyj added the priority 📌 Have higher priority than others label Dec 14, 2023
Revert original `if` condition for 'deploy-docker' job, to wait for the PR #234 to be squashed and merged.

refer to commit hash a45edfc
@huiyifyj huiyifyj merged commit 031e41a into main Dec 14, 2023
6 checks passed
@huiyifyj huiyifyj deleted the fix-ci-docker-musl branch December 14, 2023 02:30
huiyifyj added a commit that referenced this pull request Dec 22, 2023
The commit 031e41a is a temporary workaround to fix musl build error, and now to remove `CGO_CFLAGS="-D_LARGEFILE64_SOURCE"` for building docker image, because go-sqlite3 library was upgraded to `1.14.19` [^1] and the musl build was fixed in go-sqlite3 version `1.14.19` [^2].

This reverts commit 031e41a (refer PR #234).

---

[^1]: commit hash ad6673b
[^2]: mattn/go-sqlite3#1177
huiyifyj added a commit that referenced this pull request Dec 23, 2023
Revert "Fix build docker with sqlite3 musl error (#234)" commit.

The commit 031e41a is a temporary workaround to fix musl build error, and now to remove `CGO_CFLAGS="-D_LARGEFILE64_SOURCE"` for building docker image, because go-sqlite3 library was upgraded to `1.14.19` [^1] and the musl build was fixed in go-sqlite3 version `1.14.19` [^2].

This reverts commit 031e41a (refer PR #234).

---

[^1]: commit hash ad6673b
[^2]: mattn/go-sqlite3#1177
@huiyifyj huiyifyj added this to the 0.0.1 milestone Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD ⚙️ Continuous integration and continuous delivery/continuous deployment. docker 🐳 Some question about docker priority 📌 Have higher priority than others
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant