💾 Archived View for gemini.ctrl-c.club › ~jara25 › gemlog › 2024-02-21.gmi captured on 2024-08-31 at 12:10:26. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-10)
-=-=-=-=-=-=-
libjpeg-turbo, among other things, provides an implementation of the libjpeg API, which is used to interact with JPEG files. By default, it is ABI-compatible with libjpeg v6b, which is still widely used today. To make a long story short, libjpeg v7 and v8 introduced breaking changes, so programs built against libjpeg v6b did not work with v7 and v8. Many programs continued to use libjpeg v6b instead of migrating to v7 or v8.
While the official binaries of libjpeg-turbo are ABI-compatible with libjpeg v6b, it is possible to build a libjpeg-turbo shared library that is ABI-compatible with libjpeg v7 or v8 instead by specifying options to CMake. The libjpeg-turbo package in Void Linux is ABI-compatible with libjpeg v8, and other packages that depend on libjpeg-turbo are built using Void's build of libjpeg-turbo. Unfortunately, this means that binaries that were linked against libjpeg v62 will not work in Void Linux without some effort. Software packaged within Void's repositories will work smoothly, but software obtained from external sources, especially proprietary software, that depend on libjpeg v62 will likely fail to start.
Thankfully, compiling libjpeg-turbo is straightforward. The default compile options create a shared library that is ABI-compatible with libjpeg v62, and placing the shared library in the same folder as the binary and setting the LD_LIBRARY_PATH environment variable works fine, although this solution is probably not the most elegant.
The build process for libjpeg-turbo is basically the usual "cmake && make" process that many open-source projects have adopted. Installing nasm or yasm is recommended for better performance. Otherwise, there is nothing tricky about building libjpeg-turbo from source if the need arises, and detailed instructions are located within BUILDING.md, which is at the root of the git repository.
...oh yeah I'm back home by the way :)