libopenshot-audio icon indicating copy to clipboard operation
libopenshot-audio copied to clipboard

Fix musl compilation error related to LFS64

Open meator opened this issue 4 months ago • 1 comments

I am a Void Linux packager trying to update our openshot. This PR aims to improve musl libc support, which is currently suboptimal in the codebase.

LFS64 interfaces are deprecated in musl, since they are not needed there. See notes for musl-1.2.4.tar.gz in https://musl.libc.org/releases.html and also https://wiki.gentoo.org/wiki/Musl_porting_notes#error:LFS64_interfaces.28.2A64_undeclared_here.2C_ex._pread64.29.

The juce_statStruct type definition and several other things depending on it appear to be a part of libopenshot-audio's public API, so I set _FILE_OFFSET_BITS=64 as PUBLIC. These changes should be fully API/ABI compatible with the previous version.

I did rudimentary ABI breakage testing with abi-compliance-checker on x86_64 glibc (which worked as expected, since 64bit architectures were never affected by LFS64 if I understand it correctly) and on i686 glibc. I didn't test on musl, because it also was never affected by LFS64, since it never provided 32bit filesystem types. Everything reported 100% binary and source compatibility.

Void Linux applies additional patches to improve musl support, but I am not as familiar with them (I authored the changes in this PR, the other patches are older and I've only ported them to a newer version of libopenshot-audio). I might make a pull request for these too after I study them more.

meator avatar Aug 15 '25 10:08 meator

Setting _FILE_OFFSET_BITS=64 to PUBLIC could technically be a breaking change for dependants of libopenshot-audio, but I assume that the only "real" dependant is oenshot itself. I have not tested this open shot with changed libopenshot-audio. I could do that.

I'd propose a major version bump just to be safe, but this project is v0. Does this project follow SemVer (and therefore signals with a v0 version that its API is unstable)?

meator avatar Aug 17 '25 11:08 meator