-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsql: fix musl builds failing due to fcntl64
This fixes a build issue with musl based systems that do not have fcntl64 in their libc. This is done by setting `FILE_OFFSET_BITS=32` only for musl targets. This forces the compiler to not convert `fcntl` to `fcntl64`.
- Loading branch information
1 parent
c204f8e
commit e83b13b
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# A dockerfile that can be used to build musl targets | ||
# currently this is setup to run the most basic libsql example | ||
# to force the linker to resolve. This was able to reproduce the | ||
# fcntl64 issues + other issues that require custom flags for musl. | ||
|
||
FROM messense/rust-musl-cross:x86_64-musl | ||
RUN rustup target add x86_64-unknown-linux-musl | ||
|
||
COPY . . | ||
|
||
RUN rm rust-toolchain.toml | ||
|
||
ENV LIBSQL_DEV=1 | ||
|
||
RUN apt-get install -y cmake | ||
|
||
RUN cargo run -p libsql --example example --features encryption |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters