Bladeren bron

Update dependancies for snap and disable patchelf for drivers (#16372)

Mike Chang 2 jaren geleden
bovenliggende
commit
c0ff3e98d6
2 gewijzigde bestanden met toevoegingen van 38 en 38 verwijderingen
  1. 8 20
      cmake/Platform/Linux/CompilerSettings_linux.cmake
  2. 30 18
      cmake/Platform/Linux/Packaging/snapcraft.yaml.in

+ 8 - 20
cmake/Platform/Linux/CompilerSettings_linux.cmake

@@ -7,26 +7,14 @@
 #
 
 if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}")
-    if ($ENV{O3DE_SNAP})
-        set(path_search
-            $ENV{SNAP}/bin
-            $ENV{SNAP}/usr/bin
-            $ENV{SNAP}/usr/local/bin
-            $ENV{SNAP}/sbin
-            $ENV{SNAP}/usr/sbin
-            $ENV{SNAP}/usr/local/sbin
-        )
-    else()
-        set(path_search
-            /bin
-            /usr/bin
-            /usr/local/bin
-            /sbin
-            /usr/sbin
-            /usr/local/sbin
-        )
-
-    endif()
+    set(path_search
+        /bin
+        /usr/bin
+        /usr/local/bin
+        /sbin
+        /usr/sbin
+        /usr/local/sbin
+    )
     list(TRANSFORM path_search APPEND "/clang-[0-9]*" OUTPUT_VARIABLE path_with_version_search)
     file(GLOB clang_versions ${path_with_version_search})
     unset(compiler_found)

+ 30 - 18
cmake/Platform/Linux/Packaging/snapcraft.yaml.in

@@ -16,15 +16,16 @@ parts:
       - enable-patchelf
     stage-packages:
       - clang-12
-      - cmake
-      - libc-dev
-      - libclang-cpp12-dev
+      - libatomic1
+      - libcurl4
       - libdbus-1-3
-      - libfontconfig1-dev
-      - libglu1-mesa-dev
+      - libfontconfig1
+      - libglu1-mesa
+      - libopengl0
+      - libpcre2-16-0
       - libpng16-16
       - libsm6
-      - libstdc++-9-dev
+      - libssl1.1
       - libtcl8.6
       - libtk8.6
       - libunwind-dev
@@ -33,20 +34,32 @@ parts:
       - libxcb-keysyms1
       - libxcb-randr0
       - libxcb-render-util0
-      - libxcb-xfixes0-dev
+      - libxcb-shape0
+      - libxcb-xfixes0
       - libxcb-xinerama0
-      - libxcb-xinput-dev
       - libxcb-xinput0
-      - libxcb-xkb-dev
-      - libxkbcommon-dev
-      - libxkbcommon-x11-dev
-      - libzstd-dev
-      - llvm-12-dev
-      - mesa-common-dev
-      - ninja-build
+      - libxcb-xkb1
+      - libxkbcommon0
+      - libxkbcommon-x11-0
+      - libzstd1
       - pkg-config
-      - zlib1g-dev
-
+      - zlib1g
+    stage:
+      # The libraries in .../dri need no-patchelf, so they must come from the mesa-unpatched part
+      - -usr/lib/x86_64-linux-gnu/dri
+  
+  mesa-no-patchelf:
+    plugin: nil
+    after: [o3de]
+    build-attributes:
+      - no-patchelf # Otherwise snapcraft may strip the build ID and cause the driver to crash
+    stage-packages:
+      - libgl1-mesa-dri
+      - mesa-vulkan-drivers
+    stage:
+      # Only the libraries in .../dri need to not be patched, the rest come from the mesa part
+      - usr/lib/x86_64-linux-gnu/dri
+    
 apps:
   o3de:
     command: ${CPACK_PACKAGE_VERSION}/bin/Linux/profile/Default/o3de
@@ -67,4 +80,3 @@ apps:
       O3DE_SNAP: 1
       SNAP_BUILD: ${CPACK_PACKAGE_VERSION}
       DISABLE_WAYLAND: 1
-