diff --git a/extensions/desktop/kde-neon-6/launcher-specific b/extensions/desktop/kde-neon-6/launcher-specific index 84a51eccd7..705ae0db78 100644 --- a/extensions/desktop/kde-neon-6/launcher-specific +++ b/extensions/desktop/kde-neon-6/launcher-specific @@ -10,6 +10,11 @@ append_dir PATH "$SNAP_DESKTOP_RUNTIME/usr/games" # Qt Libs prepend_dir LD_LIBRARY_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH" +# blas +append_dir LD_LIBRARY_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/blas" +# lapack +append_dir LD_LIBRARY_PATH "$SNAP_DESKTOP_RUNTIME/usr/lib/$ARCH/lapack" + # Add QT_PLUGIN_PATH (Qt Modules). append_dir QT_PLUGIN_PATH "$SNAP/usr/lib/$ARCH/qt6/plugins" append_dir QT_PLUGIN_PATH "$SNAP/usr/lib/$ARCH" diff --git a/snapcraft/extensions/kde_neon_6.py b/snapcraft/extensions/kde_neon_6.py index 7ada7d8258..2c39530c5c 100644 --- a/snapcraft/extensions/kde_neon_6.py +++ b/snapcraft/extensions/kde_neon_6.py @@ -16,6 +16,7 @@ # along with this program. If not, see . """Generic KDE NEON extension to support core22 and onwards.""" + import dataclasses import functools import re @@ -222,12 +223,23 @@ def get_part_snippet(self, *, plugin_name: str) -> Dict[str, Any]: "LD_LIBRARY_PATH": prepend_to_env( "LD_LIBRARY_PATH", [ + # Qt6 arch specific libs f"/snap/{qt6_sdk_snap}/current/usr/lib/" - f"${{CRAFT_ARCH_TRIPLET_BUILD_FOR}}", - f"/snap/{kf6_sdk_snap}/current/usr/lib/" - f"${{CRAFT_ARCH_TRIPLET_BUILD_FOR}}", + "${CRAFT_ARCH_TRIPLET_BUILD_FOR}", + # Qt6 libs f"/snap/{qt6_sdk_snap}/current/usr/lib", + # kf6 arch specific libs + f"/snap/{kf6_sdk_snap}/current/usr/lib/" + "${CRAFT_ARCH_TRIPLET_BUILD_FOR}", + # blas + f"/snap/{kf6_sdk_snap}/current/usr/lib/" + "${CRAFT_ARCH_TRIPLET_BUILD_FOR}/blas", + # lapack + f"/snap/{kf6_sdk_snap}/current/usr/lib/" + "${CRAFT_ARCH_TRIPLET_BUILD_FOR}/lapack", + # kf6 libs f"/snap/{kf6_sdk_snap}/current/usr/lib", + # Staged libs "$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}", "$CRAFT_STAGE/usr/lib", "$CRAFT_STAGE/lib/", diff --git a/tests/unit/extensions/test_kde_neon_6.py b/tests/unit/extensions/test_kde_neon_6.py index e72f148372..47340f290f 100644 --- a/tests/unit/extensions/test_kde_neon_6.py +++ b/tests/unit/extensions/test_kde_neon_6.py @@ -221,8 +221,12 @@ def assert_get_part_snippet(kde_neon_6_instance): { "LD_LIBRARY_PATH": ( "/snap/kde-qt6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" - "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" "/snap/kde-qt6-core22-sdk/current/usr/lib:" + "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" + "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}" + "/blas:" + "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}" + "/lapack:" "/snap/kf6-core22-sdk/current/usr/lib:" "$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" "$CRAFT_STAGE/usr/lib:" @@ -283,8 +287,10 @@ def test_get_part_snippet_with_external_sdk(kde_neon_6_extension_with_build_snap { "LD_LIBRARY_PATH": ( "/snap/kde-qt6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" - "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" "/snap/kde-qt6-core22-sdk/current/usr/lib:" + "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" + "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/blas:" + "/snap/kf6-core22-sdk/current/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/lapack:" "/snap/kf6-core22-sdk/current/usr/lib:" "$CRAFT_STAGE/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}:" "$CRAFT_STAGE/usr/lib:"