toltec
toltec copied to clipboard
Separate toltec and entware libraries
Describe the issue Toltec links against the libraries on the system itself, including glibc. Entware links against its own distribution of glibc and libraries. These libraries and the system ones are not compatible due to the different glibc dependencies. This means that if we need a library that isn't in the base OS, but entware provides, we either have to target the entware toolchain, or find some way to provide our own copy of the library. We are not setup to use the entware toolchain in toltec, and I don't think it's really worth the effort.
Right now, the current solution appears to be to embed any dependencies you need in your package outside of /opt/lib
(See KOReader as an example). While this works, it does increase the amount of space required to run the applications. It also increases the memory footprint if two applications are run at once, as the OS has to load multiple copies of the libraries into memory.
Possible solutions
- Continue having packages provide their own copies of the required libraries, and formalize the expected folder structure. https://github.com/intoli/exodus may be an option for helping automate this for existing armhf debian packages.
- Extend the toolchain with an entware image.
- Split the entware and toltec
/opt/lib
folders and add some extra automation to toltecmk to support it. Perhaps detect/opt/lib
in the package and rename it, as well as automatically update the binaries to use it with patchelf. Unless aentwarelib
flag is set.
Additional context https://github.com/toltec-dev/toltec/pull/786#issuecomment-1869257406