Skip to content

Commit

Permalink
Fix build docker with sqlite3 musl error (#234)
Browse files Browse the repository at this point in the history
Fix build docker error in github actions job#923. [^1]

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

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.

---

[^1]: https://github.com/Pengxn/go-xn/actions/runs/7150953695/job/19622614044#step:9:328
[^2]: https://www.alpinelinux.org/posts/Alpine-3.19.0-released.html
[^3]: https://pkgs.alpinelinux.org/packages?name=musl-dev&branch=v3.19
[^4]: https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc
  • Loading branch information
huiyifyj committed Dec 14, 2023
1 parent 7e6ef22 commit 031e41a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -10,7 +10,7 @@ COPY . .
RUN apk add --no-cache build-base make git; \
go mod download; \
go mod tidy; \
make
CGO_CFLAGS="-D_LARGEFILE64_SOURCE" make

# Server image
FROM alpine:latest
Expand Down

0 comments on commit 031e41a

Please sign in to comment.