snapcraft icon indicating copy to clipboard operation
snapcraft copied to clipboard

bug: snapcraft uses '1' for CRAFT_PARALLEL_BUILD_COUNT on multi-core machine

Open popey opened this issue 9 months ago • 0 comments

Bug Description

cmake --build . -j$CRAFT_PARALLEL_BUILD_COUNT results in

cmake --build . -j1

On an 8-core arm64 machine. This feels wrong.

To Reproduce

This demo is a fork of Telegram Desktop, because there are errors in their snapcraft.yaml (unrelated to this issue) which I fixed, but have not been merged upstream yet.

git  clone https://github.com/popey/tdesktop.git
cd tdesktop
git checkout patch-1
snapcraft --use-lxd

Environment

I happen to be on Ubuntu Asahi, 24.04 (arm64), but I am unconvinced this is architecture or platform dependent?

alan  ~  snap version
snap    2.62+24.04build1
snapd   2.62+24.04build1
series  16
ubuntu  24.04
kernel  6.8.0-1001-apple-arm
 alan  ~  1  snapcraft version
snapcraft 8.2.3                                                                
 alan  ~  1  lxd version
5.21.1 LTS

snapcraft.yaml

name: telegram-desktop
adopt-info: telegram
icon: Telegram/Resources/art/[email protected]

base: core24
grade: stable
confinement: strict
compression: lzo

apps:
  telegram-desktop:
    command: usr/bin/telegram-desktop
    command-chain:
      - bin/desktop-launch
    common-id: org.telegram.desktop
    desktop: usr/share/applications/org.telegram.desktop.desktop
    autostart: telegram-desktop_telegram-desktop.desktop
    plugs:
      - alsa
      - audio-playback
      - audio-record
      - camera
      - desktop
      - desktop-legacy
      - gsettings
      - hardware-observe
      - home
      - network
      - network-bind
      - network-status
      - opengl
      - removable-media
      - unity7
      - wayland
      - x11
    slots:
      - mpris

hooks:
  configure:
    command-chain:
      - bin/hooks-configure-desktop
    plugs:
      - desktop

plugs:
  desktop:
    mount-host-font-cache: false
  # Support for common GTK themes
  # https://forum.snapcraft.io/t/how-to-use-the-system-gtk-theme-via-the-gtk-common-themes-snap/6235
  gtk-3-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes
  sound-themes:
    interface: content
    target: $SNAP/data-dir/sounds
    default-provider: gtk-common-themes

layout:
  /usr/share/alsa:
    bind: $SNAP/usr/share/alsa
  /usr/share/pipewire:
    bind: $SNAP/usr/share/pipewire
  /usr/share/X11:
    bind: $SNAP/usr/share/X11
  /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gtk-3.0:
    bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gtk-3.0
  /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gtk-4.0:
    bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gtk-4.0
  /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pipewire-0.3:
    bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pipewire-0.3
  /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/spa-0.2:
    bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/spa-0.2
  /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkitgtk-6.0:
    bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkitgtk-6.0

package-repositories:
  - type: apt
    ppa: kisak/kisak-mesa

parts:
  telegram:
    plugin: cmake
    source: .
    source-type: git
    parse-info: [usr/share/metainfo/org.telegram.desktop.metainfo.xml]
    build-environment:
      - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
      - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
    build-packages:
      - clang
      - libtool-bin
      - python3
      - protobuf-compiler
      - libasound2-dev
      - libavif-dev
      - libboost-regex-dev
      - libfmt-dev
      - libgirepository1.0-dev
      - libglib2.0-dev
      - libheif-dev
      - libopenal-dev
      - libopus-dev
      - libprotobuf-dev
      - libpulse-dev
      - libssl-dev
      - libwayland-dev
      - libxcb1-dev
      - libxcb-keysyms1-dev
      - libxcb-record0-dev
      - libxcb-screensaver0-dev
      - zlib1g-dev
    stage-packages:
      - libasound2
      - libavif16
      - libboost-regex1.83.0
      - libglib2.0-0
      - libheif1
      - libopenal1
      - libopus0
      - libprotobuf-lite32
      - libpulse0
      - libssl3
      - libwayland-client0
      - libwebkitgtk-6.0-4
      - libxcb1
      - libxcb-keysyms1
      - libxcb-record0
      - libxcb-screensaver0
      - zlib1g
      - glib-networking
    cmake-generator: Ninja
    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr
      - -DTDESKTOP_API_ID=611335
      - -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
      - -DDESKTOP_APP_USE_PACKAGED_LAZY=ON
    override-pull: |
      craftctl default

      version_file=Telegram/build/version
      version=$(sed -n "s/AppVersionStr[ ]\+\(.*\)\+/\1/p" $version_file)
      beta=$(sed -n "s/BetaChannel[ ]\+\(.*\)\+/\1/p" $version_file)

      if [ "$beta" != "0" ]; then
        version="$version-beta"
      fi

      version="${version}$(git describe --tags | sed 's,^v[^-]\+,,')"

      craftctl set version="$version"

      sed -i 's|^Icon=telegram$|Icon=${SNAP}/meta/gui/icon.png|g' lib/xdg/org.telegram.desktop.desktop
    override-build: |
      craftctl default
      rm -rf "$CRAFT_PART_INSTALL/usr/share/icons"
    after:
      - ffmpeg
      - libjxl
      - qt
      - rnnoise
      - webrtc

  patches:
    source: https://github.com/desktop-app/patches.git
    source-depth: 1
    source-commit: ce5098d9bd638ec264fd8cf69ef3ef31d8139d18
    plugin: dump
    override-pull: |
      craftctl default
      cp -r . "$CRAFT_STAGE/patches"
    override-prime: |
      rm -rf patches
    stage: [-./*]

  desktop-qt:
    source: https://github.com/desktop-app/snapcraft-desktop-helpers.git
    source-depth: 1
    source-subdir: qt
    plugin: make
    make-parameters: ["FLAVOR=qt5"]
    build-environment:
      - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
    build-packages:
      - build-essential
      - dpkg-dev
      - gtk-update-icon-cache
      - libglib2.0-bin
      - libgtk-3-0t64
    stage-packages:
      - libc-bin
      - libgdk-pixbuf-2.0-0
      - libnvidia-egl-wayland1
      - libxkbcommon0
      - locales-all
      - shared-mime-info
      - xdg-user-dirs
    override-prime: |
      craftctl default
      update-mime-database usr/share/mime
      glib-compile-schemas usr/share/glib-2.0/schemas
      for theme in usr/share/icons/*; do
        if [ -f "$theme/index.theme" ] && [ ! -f "$theme/icon-theme.cache" ]; then
          update-icon-caches "$theme"
        fi
      done
      GTK_PATH=$PWD/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gtk-3.0 /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libgtk-3-0t64/gtk-query-immodules-3.0 > usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gtk-3.0/3.0.0/immodules/immodules.cache
    after:
      - telegram

  ffmpeg:
    plugin: nil
    build-packages:
      - libavcodec-dev
      - libavfilter-dev
      - libavformat-dev
      - libavutil-dev
      - libswresample-dev
      - libswscale-dev
    stage-packages:
      - libavcodec60
      - libavfilter9
      - libavformat60
      - libavutil58
      - libswresample4
      - libswscale7
      - va-driver-all
      - vdpau-driver-all
    override-build: |
      craftctl default
      mv "$CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas/"* "$CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
      rmdir "$CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas"
      mv "$CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack/"* "$CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
      rmdir "$CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack"

  libjxl:
    source: https://github.com/libjxl/libjxl.git
    source-depth: 1
    source-tag: v0.10.2
    plugin: cmake
    build-environment:
      - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
    cmake-generator: Ninja
    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DBUILD_TESTING=OFF
      - -DJPEGXL_ENABLE_DEVTOOLS=OFF
      - -DJPEGXL_ENABLE_TOOLS=OFF
      - -DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON
      - -DJPEGXL_ENABLE_DOXYGEN=OFF
      - -DJPEGXL_ENABLE_MANPAGES=OFF
      - -DJPEGXL_ENABLE_BENCHMARK=OFF
      - -DJPEGXL_ENABLE_EXAMPLES=OFF
      - -DJPEGXL_ENABLE_JNI=OFF
      - -DJPEGXL_ENABLE_SJPEG=OFF
      - -DJPEGXL_ENABLE_OPENEXR=OFF
      - -DJPEGXL_ENABLE_SKCMS=OFF
    override-pull: |
      craftctl default
      git apply $CRAFT_STAGE/patches/libjxl.patch
    stage:
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libbrotli*
    prime:
      - -./usr/bin
      - -./usr/include
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.a
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
      - -./usr/share
    after:
      - patches

  qt:
    plugin: nil
    build-environment:
      - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
    build-packages:
      - libdbus-1-dev
      - libegl-dev
      - libfontconfig1-dev
      - libfreetype-dev
      - libglib2.0-dev
      - libglx-dev
      - libgtk-3-dev
      - libharfbuzz-dev
      - libice-dev
      - libicu-dev
      - liblcms2-dev
      - libopengl-dev
      - libpcre2-dev
      - libpng-dev
      - libsm-dev
      - libssl-dev
      - libvulkan-dev
      - libwayland-dev
      - libx11-dev
      - libx11-xcb-dev
      - libxcb1-dev
      - libxcb-cursor-dev
      - libxcb-glx0-dev
      - libxcb-icccm4-dev
      - libxcb-image0-dev
      - libxcb-keysyms1-dev
      - libxcb-randr0-dev
      - libxcb-render0-dev
      - libxcb-render-util0-dev
      - libxcb-shape0-dev
      - libxcb-shm0-dev
      - libxcb-sync-dev
      - libxcb-util-dev
      - libxcb-xfixes0-dev
      - libxcb-xkb-dev
      - libxkbcommon-dev
      - libxkbcommon-x11-dev
      - zlib1g-dev
    stage-packages:
      - libdbus-1-3
      - libegl1
      - libfontconfig1
      - libfreetype6
      - libglib2.0-0
      - libglx0
      - libgtk-3-0t64
      - libharfbuzz0b
      - libice6
      - libicu74
      - liblcms2-2
      - libopengl0
      - libpcre2-16-0
      - libpng16-16
      - libsm6
      - libssl3
      - libvulkan1
      - libwayland-client0
      - libwayland-cursor0
      - libwayland-egl1
      - libwayland-server0
      - libx11-6
      - libx11-xcb1
      - libxcb1
      - libxcb-cursor0
      - libxcb-glx0
      - libxcb-icccm4
      - libxcb-image0
      - libxcb-keysyms1
      - libxcb-randr0
      - libxcb-render0
      - libxcb-render-util0
      - libxcb-shape0
      - libxcb-shm0
      - libxcb-sync1
      - libxcb-util1
      - libxcb-xfixes0
      - libxcb-xkb1
      - libxkbcommon0
      - libxkbcommon-x11-0
      - zlib1g
      - mesa-vulkan-drivers
      - xkb-data
    override-pull: |
      QT=6.7.0

      git clone -b v${QT} --depth=1 https://github.com/qt/qt5.git .
      git submodule update --init --recursive --depth=1 qtbase qtdeclarative qtwayland qtimageformats qtsvg qtshadertools

      cd qtbase
      find $CRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
      cd ../qtwayland
      find $CRAFT_STAGE/patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
      sed -i 's/qMin(version, 8)/qMin(version, 7)/' src/client/qwaylandinputdevice.cpp
      cd ..
    override-build: |
      ./configure \
        -prefix /usr \
        -libdir /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR \
        -release \
        -opensource \
        -confirm-license \
        -openssl-linked \
        -nomake examples \
        -nomake tests \
        -- \
        -DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr

      cmake --build . -j$CRAFT_PARALLEL_BUILD_COUNT
      DESTDIR="$CRAFT_PART_INSTALL" cmake --install .
    prime:
      - -./usr/bin
      - -./usr/doc
      - -./usr/include
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/cmake
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/metatypes
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.a
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.la
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.prl
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
      - -./usr/libexec
      - -./usr/mkspecs
      - -./usr/modules
    after:
      - libjxl
      - patches

  rnnoise:
    source: https://gitlab.xiph.org/xiph/rnnoise.git
    source-depth: 1
    source-commit: 7f449bf8bd3b933891d12c30112268c4090e4d59
    plugin: autotools
    build-environment:
      - CFLAGS: -O2 -s
    autotools-configure-parameters:
      - --prefix=/usr
      - --libdir=\${exec_prefix}/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
      - --disable-static
      - --disable-examples
      - --disable-doc
    prime:
      - -./usr/include
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.la
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
      - -./usr/share

  systemd:
    plugin: nil
    stage-packages:
      - systemd
    stage:
      - ./usr/bin/systemd-detect-virt

  webrtc:
    source: https://github.com/desktop-app/tg_owt.git
    source-depth: 1
    source-commit: 3bb3d757681e6cc5135aec6529a753dc3dcdcfb9
    plugin: cmake
    build-environment:
      - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
    build-packages:
      - yasm
      - libdrm-dev
      - libegl-dev
      - libgbm-dev
      - libgl-dev
      - libglib2.0-dev
      - libopenh264-dev
      - libopus-dev
      - libpipewire-0.3-dev
      - libssl-dev
      - libvpx-dev
      - libx11-dev
      - libxcomposite-dev
      - libxdamage-dev
      - libxext-dev
      - libxfixes-dev
      - libxrender-dev
      - libxrandr-dev
      - libxtst-dev
    stage-packages:
      - libdrm2
      - libegl1
      - libgbm1
      - libgl1
      - libglib2.0-0
      - libopenh264-7
      - libopus0
      - libssl3
      - libvpx9
      - libx11-6
      - libxcomposite1
      - libxdamage1
      - libxext6
      - libxfixes3
      - libxrender1
      - libxrandr2
      - libxtst6
      - pipewire
    cmake-generator: Ninja
    cmake-parameters:
      - -DCMAKE_BUILD_TYPE=Release
      - -DCMAKE_INSTALL_PREFIX=/usr
      - -DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr
    prime:
      - -./usr/include
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/cmake
      - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.a
    after:
      - ffmpeg
      - libjxl

Relevant log output

2024-05-03 00:53:06.269 Starting snapcraft, version 8.2.3
2024-05-03 00:53:06.269 Log verbosity level set to BRIEF
2024-05-03 00:53:06.301 Configuring application...
2024-05-03 00:53:06.301 Preparing application...
2024-05-03 00:53:06.301 Build plan: platform=None, build_for=None
2024-05-03 00:53:06.301 Loading project file '/home/alan/Source/telegramdesktop/tdesktop/snap/snapcraft.yaml'
2024-05-03 00:53:06.331 Processing grammar (on arm64 for arm64)
2024-05-03 00:53:06.331 Processing grammar for plugin: cmake
2024-05-03 00:53:06.331 Processing grammar for source: .
2024-05-03 00:53:06.332 Processing grammar for source-type: git
2024-05-03 00:53:06.332 Processing grammar for build-environment: [{'LD_LIBRARY_PATH': '/home/alan/Source/telegramdesktop/tdesktop/stage/usr/lib/aarch64-linux-gnu${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}'}, {'LDFLAGS': '${LDFLAGS:+$LDFLAGS} -s'}]
2024-05-03 00:53:06.332 Processing grammar for build-packages: ['clang', 'libtool-bin', 'python3', 'protobuf-compiler', 'libasound2-dev', 'libavif-dev', 'libboost-regex-dev', 'libfmt-dev', 'libgirepository1.0-dev', 'libglib2.0-dev', 'libheif-dev', 'libopenal-dev', 'libopus-dev', 'libprotobuf-dev', 'libpulse-dev', 'libssl-dev', 'libwayland-dev', 'libxcb1-dev', 'libxcb-keysyms1-dev', 'libxcb-record0-dev', 'libxcb-screensaver0-dev', 'zlib1g-dev']
2024-05-03 00:53:06.332 Processing grammar for stage-packages: ['libasound2', 'libavif16', 'libboost-regex1.83.0', 'libglib2.0-0', 'libheif1', 'libopenal1', 'libopus0', 'libprotobuf-lite32', 'libpulse0', 'libssl3', 'libwayland-client0', 'libwebkitgtk-6.0-4', 'libxcb1', 'libxcb-keysyms1', 'libxcb-record0', 'libxcb-screensaver0', 'zlib1g', 'glib-networking']
2024-05-03 00:53:06.332 Not processing grammar for non-grammar enabled keyword cmake-generator
2024-05-03 00:53:06.332 Not processing grammar for non-grammar enabled keyword cmake-parameters
2024-05-03 00:53:06.332 Processing grammar for override-pull: craftctl default

version_file=Telegram/build/version
version=$(sed -n "s/AppVersionStr[ ]\+\(.*\)\+/\1/p" $version_file)
beta=$(sed -n "s/BetaChannel[ ]\+\(.*\)\+/\1/p" $version_file)

if [ "$beta" != "0" ]; then
  version="$version-beta"
fi

version="${version}$(git describe --tags | sed 's,^v[^-]\+,,')"

craftctl set version="$version"

sed -i 's|^Icon=telegram$|Icon=${SNAP}/meta/gui/icon.png|g' lib/xdg/org.telegram.desktop.desktop
2024-05-03 00:53:06.332 Processing grammar for override-build: craftctl default
rm -rf "$CRAFT_PART_INSTALL/usr/share/icons"
2024-05-03 00:53:06.332 Processing grammar for after: ['ffmpeg', 'libjxl', 'qt', 'rnnoise', 'webrtc']
2024-05-03 00:53:06.332 Processing grammar for source: https://github.com/desktop-app/patches.git
2024-05-03 00:53:06.332 Processing grammar for source-depth: 1
2024-05-03 00:53:06.332 Processing grammar for source-commit: ce5098d9bd638ec264fd8cf69ef3ef31d8139d18
2024-05-03 00:53:06.332 Processing grammar for plugin: dump
2024-05-03 00:53:06.332 Processing grammar for override-pull: craftctl default
cp -r . "/home/alan/Source/telegramdesktop/tdesktop/stage/patches"
2024-05-03 00:53:06.332 Processing grammar for override-prime: rm -rf patches
2024-05-03 00:53:06.332 Processing grammar for stage: ['-./*']
2024-05-03 00:53:06.332 Processing grammar for source: https://github.com/desktop-app/snapcraft-desktop-helpers.git
2024-05-03 00:53:06.332 Processing grammar for source-depth: 1
2024-05-03 00:53:06.332 Processing grammar for source-subdir: qt
2024-05-03 00:53:06.332 Processing grammar for plugin: make
2024-05-03 00:53:06.332 Not processing grammar for non-grammar enabled keyword make-parameters
2024-05-03 00:53:06.332 Processing grammar for build-environment: [{'LD_LIBRARY_PATH': '/home/alan/Source/telegramdesktop/tdesktop/stage/usr/lib/aarch64-linux-gnu${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}'}]
2024-05-03 00:53:06.332 Processing grammar for build-packages: ['build-essential', 'dpkg-dev', 'gtk-update-icon-cache', 'libglib2.0-bin', 'libgtk-3-0t64']
2024-05-03 00:53:06.332 Processing grammar for stage-packages: ['libc-bin', 'libgdk-pixbuf-2.0-0', 'libnvidia-egl-wayland1', 'libxkbcommon0', 'locales-all', 'shared-mime-info', 'xdg-user-dirs']
2024-05-03 00:53:06.332 Processing grammar for override-prime: craftctl default
update-mime-database usr/share/mime
glib-compile-schemas usr/share/glib-2.0/schemas
for theme in usr/share/icons/*; do
  if [ -f "$theme/index.theme" ] && [ ! -f "$theme/icon-theme.cache" ]; then
    update-icon-caches "$theme"
  fi
done
GTK_PATH=$PWD/usr/lib/aarch64-linux-gnu/gtk-3.0 /usr/lib/aarch64-linux-gnu/libgtk-3-0t64/gtk-query-immodules-3.0 > usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules/immodules.cache
2024-05-03 00:53:06.332 Processing grammar for after: ['telegram']
2024-05-03 00:53:06.332 Processing grammar for plugin: nil
2024-05-03 00:53:06.332 Processing grammar for build-packages: ['libavcodec-dev', 'libavfilter-dev', 'libavformat-dev', 'libavutil-dev', 'libswresample-dev', 'libswscale-dev']
2024-05-03 00:53:06.332 Processing grammar for stage-packages: ['libavcodec60', 'libavfilter9', 'libavformat60', 'libavutil58', 'libswresample4', 'libswscale7', 'va-driver-all', 'vdpau-driver-all']
2024-05-03 00:53:06.332 Processing grammar for override-build: craftctl default
mv "$CRAFT_PART_INSTALL/usr/lib/aarch64-linux-gnu/blas/"* "$CRAFT_PART_INSTALL/usr/lib/aarch64-linux-gnu"
rmdir "$CRAFT_PART_INSTALL/usr/lib/aarch64-linux-gnu/blas"
mv "$CRAFT_PART_INSTALL/usr/lib/aarch64-linux-gnu/lapack/"* "$CRAFT_PART_INSTALL/usr/lib/aarch64-linux-gnu"
rmdir "$CRAFT_PART_INSTALL/usr/lib/aarch64-linux-gnu/lapack"
2024-05-03 00:53:06.332 Processing grammar for source: https://github.com/libjxl/libjxl.git
2024-05-03 00:53:06.332 Processing grammar for source-depth: 1
2024-05-03 00:53:06.332 Processing grammar for source-tag: v0.10.2
2024-05-03 00:53:06.332 Processing grammar for plugin: cmake
2024-05-03 00:53:06.332 Processing grammar for build-environment: [{'LDFLAGS': '${LDFLAGS:+$LDFLAGS} -s'}]
2024-05-03 00:53:06.332 Not processing grammar for non-grammar enabled keyword cmake-generator
2024-05-03 00:53:06.332 Not processing grammar for non-grammar enabled keyword cmake-parameters
2024-05-03 00:53:06.332 Processing grammar for override-pull: craftctl default
git apply /home/alan/Source/telegramdesktop/tdesktop/stage/patches/libjxl.patch
2024-05-03 00:53:06.332 Processing grammar for stage: ['-./usr/lib/aarch64-linux-gnu/libbrotli*']
2024-05-03 00:53:06.333 Processing grammar for prime: ['-./usr/bin', '-./usr/include', '-./usr/lib/aarch64-linux-gnu/pkgconfig', '-./usr/lib/aarch64-linux-gnu/*.a', '-./usr/lib/aarch64-linux-gnu/*.so', '-./usr/share']
2024-05-03 00:53:06.333 Processing grammar for after: ['patches']
2024-05-03 00:53:06.333 Processing grammar for plugin: nil
2024-05-03 00:53:06.333 Processing grammar for build-environment: [{'LDFLAGS': '${LDFLAGS:+$LDFLAGS} -s'}]
2024-05-03 00:53:06.333 Processing grammar for build-packages: ['libdbus-1-dev', 'libegl-dev', 'libfontconfig1-dev', 'libfreetype-dev', 'libglib2.0-dev', 'libglx-dev', 'libgtk-3-dev', 'libharfbuzz-dev', 'libice-dev', 'libicu-dev', 'liblcms2-dev', 'libopengl-dev', 'libpcre2-dev', 'libpng-dev', 'libsm-dev', 'libssl-dev', 'libvulkan-dev', 'libwayland-dev', 'libx11-dev', 'libx11-xcb-dev', 'libxcb1-dev', 'libxcb-cursor-dev', 'libxcb-glx0-dev', 'libxcb-icccm4-dev', 'libxcb-image0-dev', 'libxcb-keysyms1-dev', 'libxcb-randr0-dev', 'libxcb-render0-dev', 'libxcb-render-util0-dev', 'libxcb-shape0-dev', 'libxcb-shm0-dev', 'libxcb-sync-dev', 'libxcb-util-dev', 'libxcb-xfixes0-dev', 'libxcb-xkb-dev', 'libxkbcommon-dev', 'libxkbcommon-x11-dev', 'zlib1g-dev']
2024-05-03 00:53:06.333 Processing grammar for stage-packages: ['libdbus-1-3', 'libegl1', 'libfontconfig1', 'libfreetype6', 'libglib2.0-0', 'libglx0', 'libgtk-3-0', 'libharfbuzz0b', 'libice6', 'libicu74', 'liblcms2-2', 'libopengl0', 'libpcre2-16-0', 'libpng16-16', 'libsm6', 'libssl3', 'libvulkan1', 'libwayland-client0', 'libwayland-cursor0', 'libwayland-egl1', 'libwayland-server0', 'libx11-6', 'libx11-xcb1', 'libxcb1', 'libxcb-cursor0', 'libxcb-glx0', 'libxcb-icccm4', 'libxcb-image0', 'libxcb-keysyms1', 'libxcb-randr0', 'libxcb-render0', 'libxcb-render-util0', 'libxcb-shape0', 'libxcb-shm0', 'libxcb-sync1', 'libxcb-util1', 'libxcb-xfixes0', 'libxcb-xkb1', 'libxkbcommon0', 'libxkbcommon-x11-0', 'zlib1g', 'mesa-vulkan-drivers', 'xkb-data']
2024-05-03 00:53:06.333 Processing grammar for override-pull: QT=6.7.0

git clone -b v${QT} --depth=1 https://github.com/qt/qt5.git .
git submodule update --init --recursive --depth=1 qtbase qtdeclarative qtwayland qtimageformats qtsvg qtshadertools

cd qtbase
find /home/alan/Source/telegramdesktop/tdesktop/stage/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
cd ../qtwayland
find /home/alan/Source/telegramdesktop/tdesktop/stage/patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
sed -i 's/qMin(version, 8)/qMin(version, 7)/' src/client/qwaylandinputdevice.cpp
cd ..
2024-05-03 00:53:06.333 Processing grammar for override-build: ./configure \
  -prefix /usr \
  -libdir /usr/lib/aarch64-linux-gnu \
  -release \
  -opensource \
  -confirm-license \
  -openssl-linked \
  -nomake examples \
  -nomake tests \
  -- \
  -DCMAKE_PREFIX_PATH=/home/alan/Source/telegramdesktop/tdesktop/stage/usr
echo "*** nproc is $(nproc)"
echo "*** CRAFT_PARALLEL_BUILD_COUNT is 1"
cmake --build . -j1
DESTDIR="$CRAFT_PART_INSTALL" cmake --install .
2024-05-03 00:53:06.333 Processing grammar for prime: ['-./usr/bin', '-./usr/doc', '-./usr/include', '-./usr/lib/aarch64-linux-gnu/cmake', '-./usr/lib/aarch64-linux-gnu/metatypes', '-./usr/lib/aarch64-linux-gnu/pkgconfig', '-./usr/lib/aarch64-linux-gnu/*.a', '-./usr/lib/aarch64-linux-gnu/*.la', '-./usr/lib/aarch64-linux-gnu/*.prl', '-./usr/lib/aarch64-linux-gnu/*.so', '-./usr/libexec', '-./usr/mkspecs', '-./usr/modules']
2024-05-03 00:53:06.333 Processing grammar for after: ['libjxl', 'patches']
2024-05-03 00:53:06.333 Processing grammar for source: https://gitlab.xiph.org/xiph/rnnoise.git
2024-05-03 00:53:06.333 Processing grammar for source-depth: 1
2024-05-03 00:53:06.333 Processing grammar for source-commit: 7f449bf8bd3b933891d12c30112268c4090e4d59
2024-05-03 00:53:06.333 Processing grammar for plugin: autotools
2024-05-03 00:53:06.333 Processing grammar for build-environment: [{'CFLAGS': '-O2 -s'}]
2024-05-03 00:53:06.333 Not processing grammar for non-grammar enabled keyword autotools-configure-parameters
2024-05-03 00:53:06.333 Processing grammar for prime: ['-./usr/include', '-./usr/lib/aarch64-linux-gnu/pkgconfig', '-./usr/lib/aarch64-linux-gnu/*.la', '-./usr/lib/aarch64-linux-gnu/*.so', '-./usr/share']
2024-05-03 00:53:06.333 Processing grammar for plugin: nil
2024-05-03 00:53:06.333 Processing grammar for stage-packages: ['systemd']
2024-05-03 00:53:06.333 Processing grammar for stage: ['./usr/bin/systemd-detect-virt']
2024-05-03 00:53:06.333 Processing grammar for source: https://github.com/desktop-app/tg_owt.git
2024-05-03 00:53:06.333 Processing grammar for source-depth: 1
2024-05-03 00:53:06.333 Processing grammar for source-commit: 3bb3d757681e6cc5135aec6529a753dc3dcdcfb9
2024-05-03 00:53:06.333 Processing grammar for plugin: cmake
2024-05-03 00:53:06.333 Processing grammar for build-environment: [{'LDFLAGS': '${LDFLAGS:+$LDFLAGS} -s'}]
2024-05-03 00:53:06.333 Processing grammar for build-packages: ['yasm', 'libdrm-dev', 'libegl-dev', 'libgbm-dev', 'libgl-dev', 'libglib2.0-dev', 'libopenh264-dev', 'libopus-dev', 'libpipewire-0.3-dev', 'libssl-dev', 'libvpx-dev', 'libx11-dev', 'libxcomposite-dev', 'libxdamage-dev', 'libxext-dev', 'libxfixes-dev', 'libxrender-dev', 'libxrandr-dev', 'libxtst-dev']
2024-05-03 00:53:06.333 Processing grammar for stage-packages: ['libdrm2', 'libegl1', 'libgbm1', 'libgl1', 'libglib2.0-0', 'libopenh264-7', 'libopus0', 'libssl3', 'libvpx9', 'libx11-6', 'libxcomposite1', 'libxdamage1', 'libxext6', 'libxfixes3', 'libxrender1', 'libxrandr2', 'libxtst6', 'pipewire']
2024-05-03 00:53:06.333 Not processing grammar for non-grammar enabled keyword cmake-generator
2024-05-03 00:53:06.333 Not processing grammar for non-grammar enabled keyword cmake-parameters
2024-05-03 00:53:06.333 Processing grammar for prime: ['-./usr/include', '-./usr/lib/aarch64-linux-gnu/cmake', '-./usr/lib/aarch64-linux-gnu/*.a']
2024-05-03 00:53:06.333 Processing grammar for after: ['ffmpeg', 'libjxl']
2024-05-03 00:53:06.336 Running snapcraft:arm64 in arm64 instance...
2024-05-03 00:53:06.336 Preparing managed instance 'snapcraft-telegram-asahi-on-arm64-for-arm64-1048871'
2024-05-03 00:53:06.336 Using hostname 'snapcraft-telegram-asahi-on-arm64-for-arm64-1048871'
2024-05-03 00:53:06.336 Using provider 'lxd' passed as an argument.
2024-05-03 00:53:06.336 Launching managed ubuntu 24.04 instance...
2024-05-03 00:53:06.336 Executing on host: lxc remote list --format=yaml
2024-05-03 00:53:06.372 Remote 'craft-com.ubuntu.cloud-buildd-daily' already exists.
2024-05-03 00:53:06.372 Executing on host: lxc project list local: --format=yaml
2024-05-03 00:53:06.452 Set LXD instance name to 'snapcraft-telegram-asahi-on-arm64-for-arm64-1048871'
2024-05-03 00:53:06.452 Checking for instance 'snapcraft-telegram-asahi-on-arm64-for-arm64-1048871' in project 'snapcraft' in remote 'local'
2024-05-03 00:53:06.452 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-05-03 00:53:06.598 Instance 'snapcraft-telegram-asahi-on-arm64-for-arm64-1048871' does not exist.
2024-05-03 00:53:06.598 Set LXD instance name to 'base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb'
2024-05-03 00:53:06.598 Checking for base instance 'base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb' in project 'snapcraft' in remote 'local'
2024-05-03 00:53:06.598 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-05-03 00:53:06.729 Checking validity of instance 'base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb'.
2024-05-03 00:53:06.729 Executing on host: lxc --project snapcraft info local:base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb
2024-05-03 00:53:06.819 Executing on host: lxc --project snapcraft info local:base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb
2024-05-03 00:53:06.857 Executing on host: lxc --project snapcraft config get local:base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb user.craft_providers.status
2024-05-03 00:53:06.913 Instance 'base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb' is ready.
2024-05-03 00:53:06.913 Instance is valid.
2024-05-03 00:53:06.913 Creating instance from base instance
2024-05-03 00:53:06.913 Creating instance from base instance 'base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb'.
2024-05-03 00:53:06.913 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-05-03 00:53:07.040 Executing on host: lxc --project snapcraft copy local:base-instance-snapcraft-buildd-base-v7-c-f91ee4af44ccdf02cefb local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871
2024-05-03 00:53:07.349 Executing on host: lxc --project snapcraft list local: --format=yaml
2024-05-03 00:53:07.492 Executing on host: lxc --project snapcraft config set local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 raw.idmap 'both 1000 0'
2024-05-03 00:53:07.620 Executing on host: lxc --project snapcraft config get local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 raw.idmap
2024-05-03 00:53:07.678 Got LXD idmap for instance 'snapcraft-telegram-asahi-on-arm64-for-arm64-1048871': 'both 1000 0'
2024-05-03 00:53:07.679 Starting instance
2024-05-03 00:53:07.679 Executing on host: lxc --project snapcraft start local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871
2024-05-03 00:53:08.045 Executing on host: lxc --project snapcraft file push /tmp/tmpnqlmlm48 local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871/etc/hostname --mode=0644
2024-05-03 00:53:08.133 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical chown root:root /etc/hostname
2024-05-03 00:53:08.194 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical hostname -F /etc/hostname
2024-05-03 00:53:08.248 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-05-03 00:53:08.312 Executing on host: lxc --project snapcraft file pull local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871/etc/craft-instance.conf /home/alan/tmp_xoirq84.tmp-craft/tmp972fuhkf
2024-05-03 00:53:08.355 Instance has already been setup.
2024-05-03 00:53:08.356 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical cat /etc/os-release
2024-05-03 00:53:08.411 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-05-03 00:53:08.476 Executing on host: lxc --project snapcraft file pull local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871/etc/craft-instance.conf /home/alan/tmp54jy5rlu.tmp-craft/tmpbot7uac1
2024-05-03 00:53:08.511 Instance is compatible with compatibility tag 'snapcraft-buildd-base-v7'
2024-05-03 00:53:08.511 No cache path set, not mounting cache directories.
2024-05-03 00:53:08.511 Waiting for environment to be ready...
2024-05-03 00:53:08.511 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl is-system-running
2024-05-03 00:53:08.577 systemctl is-system-running status: starting
2024-05-03 00:53:08.828 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical systemctl is-system-running
2024-05-03 00:53:08.885 Waiting for networking to be ready...
2024-05-03 00:53:08.885 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical getent hosts snapcraft.io
2024-05-03 00:53:08.992 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap unset system proxy.http
2024-05-03 00:53:09.167 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical snap unset system proxy.https
2024-05-03 00:53:09.340 Installing snap 'snapcraft' with channel=None and classic=True
2024-05-03 00:53:09.340 Installing snap 'snapcraft' from host (classic=True)
2024-05-03 00:53:09.349 Installing base snap 'core22' for 'snapcraft' from host
2024-05-03 00:53:09.349 Installing snap 'core22' from host (classic=False)
2024-05-03 00:53:09.354 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-05-03 00:53:09.469 Executing on host: lxc --project snapcraft file pull local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871/etc/craft-instance.conf /home/alan/tmpfj55qp71.tmp-craft/tmp9m8amrah
2024-05-03 00:53:09.534 Revisions found: host='1383', target='1383'
2024-05-03 00:53:09.534 Skipping snap injection: target is already up-to-date with revision on host
2024-05-03 00:53:09.535 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical test -f /etc/craft-instance.conf
2024-05-03 00:53:09.650 Executing on host: lxc --project snapcraft file pull local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871/etc/craft-instance.conf /home/alan/tmp0q87sdjc.tmp-craft/tmpy3hwnqkl
2024-05-03 00:53:09.716 Revisions found: host='11591', target='11591'
2024-05-03 00:53:09.716 Skipping snap injection: target is already up-to-date with revision on host
2024-05-03 00:53:09.817 Setting instance timezone to match host timezone 'Europe/London'.
2024-05-03 00:53:09.817 Executing on host: lxc --project snapcraft config set local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 environment.TZ Europe/London
2024-05-03 00:53:09.893 Executing on host: lxc --project snapcraft config device show local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871
2024-05-03 00:53:09.952 Executing on host: lxc --project snapcraft config device add local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 disk-/root/project disk source=/home/alan/Source/telegramdesktop/tdesktop path=/root/project
2024-05-03 00:53:10.025 Instance launched and working directory mounted
2024-05-03 00:53:10.028 Pushing bashrc to instance
2024-05-03 00:53:10.029 Executing on host: lxc --project snapcraft file push /tmp/tmpwdc2_8f4 local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871/root/.bashrc --mode=644
2024-05-03 00:53:10.098 Executing in container: lxc --project snapcraft exec local:snapcraft-telegram-asahi-on-arm64-for-arm64-1048871 -- env CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical chown root:root /root/.bashrc
2024-05-03 00:53:10.190 Executing ['snapcraft', '--use-lxd'] in instance location /root/project with {'env': {'CRAFT_PLATFORM': 'arm64', 'CRAFT_VERBOSITY_LEVEL': 'BRIEF'}}.
2024-05-03 00:53:10.190 Emitter: Pausing control of the terminal

Additional context

No response

popey avatar May 03 '24 09:05 popey