Skip to content

Prepend $CERBERO_PREFIX/lib path in LD_LIBRARY_PATH

When not cross-compiling, $CERBERO_PREFIX/lib path was added at the end of LD_LIBRARY_PATH whereas build-tools/lib path was prepended. As a consequence, libraries and tools installed during bootstrap were taking precedence over the one built later within the prefix (for libraries and tools available at both places).

This happens for example with glib when it is installed during bootstrap (glib-tools.recipe) and built later as a dependency (glib.recipe).

This commit prepends $CERBERO_PREFIX/lib in LD_LIBRARY_PATH in order to use the build-tools/lib when no dependency is custom built, and then to use the $CERBERO_PREFIX/lib once the dependency has been correctly built. It also brings coherency with PATH variable order as $CERBERO_PREFIX/bin preceeds build-tools/bin.

Before this commit, if you try to use for example gio command in a Cerbero shell, you will get gio executable from the $CERBERO_PREFIX/bin folder but ldd will show dependencies from build-tools/lib folder. After this commit, dependencies are correctly fetched from $CERBERO_PREFIX/lib folder.

Merge request reports