Snapcraft suddenly fails installing build-snaps

For my already quite complex Flutter app (Snapcraft config: fluffychat/snap/snapcraft.yaml at main · krille-chan/fluffychat · GitHub) I have a new problem that snapcraft suddenly can’t build it anymore. It fails at the “Installing build-snaps” phase with an error like this:

2024-11-02 15:32:52.237 :: 2024-11-02 15:26:06.672 Installing build-snaps
2024-11-02 15:32:52.237 :: 2024-11-02 15:26:07.223 Installing snap: mesa-2404
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.746 Error installing snap 'mesa-2404' from channel 'latest/stable'.
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749 Traceback (most recent call last):
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_parts/packages/snaps.py", line 236, in install
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     subprocess.run(
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/usr/lib/python3.10/subprocess.py", line 526, in run
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     raise CalledProcessError(retcode, process.args,
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749 subprocess.CalledProcessError: Command '['snap', 'install', 'mesa-2404']' returned non-zero exit status 1.
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749 The above exception was the direct cause of the following exception:
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749 Traceback (most recent call last):
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_application/services/lifecycle.py", line 264, in run
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     with self._lcm.action_executor() as aex:
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_parts/executor/executor.py", line 304, in __enter__
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     self._executor.prologue()
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_parts/executor/executor.py", line 89, in prologue
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     self._install_build_snaps()
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_parts/executor/executor.py", line 270, in _install_build_snaps
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     packages.snaps.install_snaps(build_snaps)
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_parts/packages/snaps.py", line 304, in install_snaps
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     snap_pkg.install()
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_parts/packages/snaps.py", line 243, in install
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749     raise errors.SnapInstallError(
2024-11-02 15:32:52.237 :: 2024-11-02 15:32:51.749 craft_parts.packages.errors.SnapInstallError: Error installing snap 'mesa-2404' from channel 'latest/stable'.
2024-11-02 15:32:52.237 Executing on host: lxc --project snapcraft config device show local:snapcraft-fluffychat-on-amd64-for-amd64-10358964
2024-11-02 15:32:52.305 Executing on host: lxc --project snapcraft config device remove local:snapcraft-fluffychat-on-amd64-for-amd64-10358964 disk-/root/project
2024-11-02 15:32:52.394 Executing on host: lxc --project snapcraft stop local:snapcraft-fluffychat-on-amd64-for-amd64-10358964
2024-11-02 15:32:56.259 Failed to execute snapcraft in instance.
2024-11-02 15:32:56.268 Traceback (most recent call last):
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_application/application.py", line 380, in run_managed
2024-11-02 15:32:56.268     instance.execute_run(  # pyright: ignore[reportUnknownMemberType,reportUnknownVariableType]
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_providers/lxd/lxd_instance.py", line 293, in execute_run
2024-11-02 15:32:56.268     return self.lxc.exec(
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_providers/lxd/lxc.py", line 387, in exec
2024-11-02 15:32:56.268     return runner(final_cmd, timeout=timeout, check=check, **kwargs)
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/usr/lib/python3.10/subprocess.py", line 526, in run
2024-11-02 15:32:56.268     raise CalledProcessError(retcode, process.args,
2024-11-02 15:32:56.268 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-fluffychat-on-amd64-for-amd64-10358964', '--cwd', '/root/project', '--', 'env', 'CRAFT_MANAGED_MODE=1', 'DEBIAN_FRONTEND=noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN=true', 'DEBIAN_PRIORITY=critical', 'CRAFT_PLATFORM=amd64', 'CRAFT_VERBOSITY_LEVEL=BRIEF', 'snapcraft']' returned non-zero exit status 1.
2024-11-02 15:32:56.268 
2024-11-02 15:32:56.268 The above exception was the direct cause of the following exception:
2024-11-02 15:32:56.268 Traceback (most recent call last):
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_application/application.py", line 568, in run
2024-11-02 15:32:56.268     return_code = self._run_inner()
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/snapcraft/application.py", line 212, in _run_inner
2024-11-02 15:32:56.268     return_code = super()._run_inner()
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_application/application.py", line 552, in _run_inner
2024-11-02 15:32:56.268     self.run_managed(platform, build_for)
2024-11-02 15:32:56.268   File "/snap/snapcraft/12971/lib/python3.10/site-packages/craft_application/application.py", line 387, in run_managed
2024-11-02 15:32:56.268     raise craft_providers.ProviderError(
2024-11-02 15:32:56.268 craft_providers.errors.ProviderError: Failed to execute snapcraft in instance.

This does happen on my Ubuntu 24.10 machine but also on the snapcraft build servers which I use via the Github integration. It first started to happen 11 days ago.

While the snap which fails to install is sometimes something different. After a snapcraft clean it is core24, sometimes it is the gnome-46-... platform snap and so on. I have now idea what suddenly causes this. I tried to reset to the last version which was successfully built and the same error occured. So I could maybe assume that a change in snapcraft itself is the actual root cause. I also tried to:

  • Switch back to core22
  • Build without some of the parts, like the zenity-integration
  • Build without the gnome extension
  • snapcraft clean
  • purge and reinstall lxd
  • Try the snapcraft --edge version

I literally have no idea what to do now. The error does not tell me what the next steps could be. Especially when I saw that core24 failed to install. As the error blocks me completely since 11 days (October 23, there doesn’t seem to be a snapcraft update on this date) I fear that the problem doesn’t disappear by itself.

1 Like

I just checked out v1.22.1 and built it successfully:

snapcraft remote-build
remote-build is experimental and is subject to change. Use with caution.
All data sent to remote builders will be publicly available. Are you sure you want to continue? [y/N]: y
Build completed.rtifacts... :: Downloading 2 files (<---)
Log files: snapcraft-fluffychat-0d5ed1af949c33b43491e999c5dd188b_amd64_2024-11-06T13:10:25.txt, snapcraft-fluffychat-0d5ed1af949c33b43491e999c5dd188b_arm64_2024-11-06T13:10:25.txt
Artifacts: fluffychat_rc1.21.2+git240.9d8a17ef_amd64.snap, fluffychat_rc1.21.2+git240.9d8a17ef_arm64.snap

What version fails? The tip of git master, or some other branch?

Yes it is the current main branch. However suddenly now there is a different error message on remote build for me:

::
:: [        ] ensureAnalyticsSent: 0ms
:: [        ] Running 1 shutdown hook
:: [        ] Shutdown hooks complete
:: [        ] exiting with code 1
:: error:
:: Traceback (most recent call last):
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 110, in main
::     ret = CraftCtl.run(cmd, args)
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 44, in run
::     _client(cmd, args)
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 97, in _client
::     raise RuntimeError(message)
:: RuntimeError: Failed to run the build script for part 'fluffychat'.
'override-build' in part 'fluffychat' failed with code 1.
Recommended resolution: Review the scriptlet and make sure it's correct.
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20241106-131547.193408.log'
Build failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 302, in run
    self.build()
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 286, in build
    self.run_build_command(["snapcraft"], cwd=output_path, env=env)
  File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 62, in run_build_command
    return self.backend.run(args, cwd=cwd, env=full_env, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 718, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-noble-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--env', 'LAUNCHPAD_INSTANCE=production', '--env', 'LAUNCHPAD_SERVER_URL=launchpad.net', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-93519389", "build-request-timestamp": "2024-11-06T13:10:44Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/a77ba112c01baebca5b0a5349ef53d9c/+build/2649239"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'SNAPCRAFT_BUILD_FOR=amd64', '--', '/bin/sh', '-c', 'cd /build/fluffychat && linux64 snapcraft']' returned non-zero exit status 1.
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=noble --arch=amd64 SNAPBUILD-2649239
Scanning for processes to kill in build SNAPBUILD-2649239

I don’t know what’s causing the RuntimeError - but I suspect you’re also hitting the issue where snapcraft doesn’t expose errors out to the running machine, but just prints the name of the log file, which is pretty useless in a VM on a remote machine in a datacentre.

I think it’s this bug: Failures when running `snap pack` don't get sent to the user. · Issue #4499 · canonical/snapcraft · GitHub

I’ve tried a lot of different things now:

  • Build with latest version that worked
  • Revert to multiple old versions that worked
  • Make the snapcraft process not build the app at all but build before in github actions and just import the build (also fails with an error message I do not understand: chore: Follow up build snap · krille-chan/fluffychat@56f6f7c · GitHub)
  • Build with core22
  • Locally remove every single package and code and revert to a simple helloworld flutter app (does not build)
  • Locally remove every dependency in the snapcraft.yaml file (also does not build Locally I have a completely different error message than remote which I also do not understand as it seems that random snap dependencies cannot be installed?

Error message in snapcraft remote build:

:: [        ] FAILED: intermediates_do_not_run/fluffychat
:: [  +23 ms] : && /usr/bin/clang++ -isystem /build/fluffychat/parts/fluffychat/install/usr/include -isystem /build/fluffychat/parts/fluffychat/install/usr/include/x86_64-linux-gnu -O3 -DNDEBUG -L/build/fluffychat/parts/fluffychat/install/usr/lib -L/build/fluffychat/parts/fluffychat/install/usr/lib/x86_64-linux-gnu CMakeFiles/fluffychat.dir/main.cc.o CMakeFiles/fluffychat.dir/my_application.cc.o CMakeFiles/fluffychat.dir/flutter/generated_plugin_registrant.cc.o -o intermediates_do_not_run/fluffychat -L/build/fluffychat/parts/fluffychat/build/linux/flutter/ephemeral -Wl,-rpath,/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/desktop_drop:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/desktop_webview_window:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/dynamic_color:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/emoji_picker_flutter:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/file_selector_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/flutter_secure_storage_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/flutter_webrtc:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/handy_window:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/pasteboard:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/record_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/sqlcipher_flutter_libs:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/url_launcher_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/window_to_front:/build/fluffychat/parts/fluffychat/build/linux/flutter/ephemeral:/snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/handy_window/libhandy:  plugins/desktop_drop/libdesktop_drop_plugin.so  plugins/desktop_webview_window/libdesktop_webview_window_plugin.so  plugins/dynamic_color/libdynamic_color_plugin.so  plugins/emoji_picker_flutter/libemoji_picker_flutter_plugin.so  plugins/file_selector_linux/libfile_selector_linux_plugin.so  plugins/flutter_secure_storage_linux/libflutter_secure_storage_linux_plugin.so  plugins/flutter_webrtc/libflutter_webrtc_plugin.so  plugins/handy_window/libhandy_window_plugin.so  plugins/pasteboard/libpasteboard_plugin.so  plugins/record_linux/librecord_linux_plugin.so  plugins/sqlcipher_flutter_libs/libsqlcipher_flutter_libs_plugin.so  plugins/url_launcher_linux/liburl_launcher_linux_plugin.so  plugins/window_to_front/libwindow_to_front_plugin.so  -lflutter_linux_gtk  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgtk-3.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgdk-3.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libz.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libharfbuzz.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libatk-1.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libcairo-gobject.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libcairo.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so  plugins/handy_window/libhandy/libhandy_flutter.so && :
:: [        ] /usr/bin/ld: warning: libelf.so.1, needed by /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1, not found (try using -rpath or -rpath-link)
:: [   +1 ms] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_clone@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getsymshndx@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getdata@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getscn@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getshdr@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getrela@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_end@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getphdr@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_update_shdr@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_xlatetof@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf32_getehdr@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_compress_gnu@ELFUTILS_1.7'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_cntl@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getehdr@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf64_xlatetom@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getident@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_update_rel@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_errmsg@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_next@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getrel@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_rawfile@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getdyn@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_compress@ELFUTILS_1.7'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getnote@ELFUTILS_1.3'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_begin@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_ndxscn@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_offscn@ELFUTILS_1.1.1'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf32_xlatetof@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf64_xlatetof@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getdata_rawchunk@ELFUTILS_1.3'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_nextscn@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_update_rela@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getarhdr@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_errno@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_fsize@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_version@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_kind@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getphdrnum@ELFUTILS_1.6'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_getclass@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getshdrnum@ELFUTILS_1.5'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf32_xlatetom@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_memory@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_rawdata@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `gelf_xlatetom@ELFUTILS_1.0'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_getshdrstrndx@ELFUTILS_1.5'
:: [        ] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_strptr@ELFUTILS_1.0'
:: [        ] clang++: error: linker command failed with exit code 1 (use -v to see invocation)
:: [        ] ninja: build stopped: subcommand failed.
:: [  +13 ms] Building Linux application... (completed in 157.9s)
:: [   +1 ms] "flutter linux" took 159,131ms.
:: [   +3 ms] Build process failed
:: [        ]
::            #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
::            #1      _runBuild (package:flutter_tools/src/linux/build_linux.dart:210:5)
::            <asynchronous suspension>
::            #2      buildLinux (package:flutter_tools/src/linux/build_linux.dart:83:5)
::            <asynchronous suspension>
::            #3      BuildLinuxCommand.runCommand (package:flutter_tools/src/commands/build_linux.dart:87:5)
::            <asynchronous suspension>
::            #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1408:27)
::            <asynchronous suspension>
::            #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
::            <asynchronous suspension>
::            #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
::            <asynchronous suspension>
::            #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:420:9)
::            <asynchronous suspension>
::            #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
::            <asynchronous suspension>
::            #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)
::            <asynchronous suspension>
::            #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)
::            <asynchronous suspension>
::            #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
::            <asynchronous suspension>
::            #12     main (package:flutter_tools/executable.dart:93:3)
::            <asynchronous suspension>
::
::
:: [        ] ensureAnalyticsSent: 0ms
:: [        ] Running 1 shutdown hook
:: [        ] Shutdown hooks complete
:: [        ] exiting with code 1
:: error:
:: Traceback (most recent call last):
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 110, in main
::     ret = CraftCtl.run(cmd, args)
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 44, in run
::     _client(cmd, args)
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 97, in _client
::     raise RuntimeError(message)
:: RuntimeError: Failed to run the build script for part 'fluffychat'.
'override-build' in part 'fluffychat' failed with code 1.
Recommended resolution: Review the scriptlet and make sure it's correct.
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20241120-053137.152522.log'
Build failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 302, in run
    self.build()
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 286, in build
    self.run_build_command(["snapcraft"], cwd=output_path, env=env)
  File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 62, in run_build_command
    return self.backend.run(args, cwd=cwd, env=full_env, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 733, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-noble-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--env', 'LAUNCHPAD_INSTANCE=production', '--env', 'LAUNCHPAD_SERVER_URL=launchpad.net', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-93824758", "build-request-timestamp": "2024-11-20T05:27:35Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/a77ba112c01baebca5b0a5349ef53d9c/+build/2661175"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'SNAPCRAFT_BUILD_FOR=amd64', '--', '/bin/sh', '-c', 'cd /build/fluffychat && linux64 snapcraft']' returned non-zero exit status 1.
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/bin/in-target scan-for-processes --backend=lxd --series=noble --arch=amd64 SNAPBUILD-2661175
Scanning for processes to kill in build SNAPBUILD-2661175

So regardless what I try I’m bombarded with absolutely useless error messages which I do not understand. Nothing helps. I cannot build FluffyChat anymore neither remotely, on github actions or on my machine and I don’t know what has ever changed. I’m running out of ideas now. Is there really no one who can point me what to do now?

This part of the log seems relevant:

:: [  +23 ms] : && /usr/bin/clang++ -isystem /build/fluffychat/parts/fluffychat/install/usr/include -isystem /build/fluffychat/parts/fluffychat/install/usr/include/x86_64-linux-gnu -O3 -DNDEBUG -L/build/fluffychat/parts/fluffychat/install/usr/lib -L/build/fluffychat/parts/fluffychat/install/usr/lib/x86_64-linux-gnu CMakeFiles/fluffychat.dir/main.cc.o CMakeFiles/fluffychat.dir/my_application.cc.o CMakeFiles/fluffychat.dir/flutter/generated_plugin_registrant.cc.o -o intermediates_do_not_run/fluffychat -L/build/fluffychat/parts/fluffychat/build/linux/flutter/ephemeral -Wl,-rpath,/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/desktop_drop:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/desktop_webview_window:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/dynamic_color:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/emoji_picker_flutter:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/file_selector_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/flutter_secure_storage_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/flutter_webrtc:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/handy_window:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/pasteboard:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/record_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/sqlcipher_flutter_libs:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/url_launcher_linux:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/window_to_front:/build/fluffychat/parts/fluffychat/build/linux/flutter/ephemeral:/snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu:/build/fluffychat/parts/fluffychat/build/build/linux/x64/release/plugins/handy_window/libhandy:  plugins/desktop_drop/libdesktop_drop_plugin.so  plugins/desktop_webview_window/libdesktop_webview_window_plugin.so  plugins/dynamic_color/libdynamic_color_plugin.so  plugins/emoji_picker_flutter/libemoji_picker_flutter_plugin.so  plugins/file_selector_linux/libfile_selector_linux_plugin.so  plugins/flutter_secure_storage_linux/libflutter_secure_storage_linux_plugin.so  plugins/flutter_webrtc/libflutter_webrtc_plugin.so  plugins/handy_window/libhandy_window_plugin.so  plugins/pasteboard/libpasteboard_plugin.so  plugins/record_linux/librecord_linux_plugin.so  plugins/sqlcipher_flutter_libs/libsqlcipher_flutter_libs_plugin.so  plugins/url_launcher_linux/liburl_launcher_linux_plugin.so  plugins/window_to_front/libwindow_to_front_plugin.so  -lflutter_linux_gtk  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgtk-3.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgdk-3.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libz.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libharfbuzz.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libatk-1.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libcairo-gobject.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libcairo.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so  /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so  plugins/handy_window/libhandy/libhandy_flutter.so && :
:: [        ] /usr/bin/ld: warning: libelf.so.1, needed by /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1, not found (try using -rpath or -rpath-link)
:: [   +1 ms] /usr/bin/ld: /snap/gnome-46-2404-sdk/current/usr/lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `elf_clone@ELFUTILS_1.0'
...

Presumably there is a copy of libelf.so.1 from somewhere that is older than the version in core24 and is missing symbols required by libraries in the gnome-46-2404 platform snap. It’s hard to say more without knowing more about the snap in question.

omg I found it. Thank you so much @jamesh I took a look into the logs and found the plugin desktop_webview_window which is a new transitive dependency, means I have not added it by myself but it came with the upgrade of the flutter_web_auth_2 package to the new version. Looks like this package produces the error you have mentioned it.

Additionally I have a problem that locally I get totally different errors. So when I tried to build the app without any of these dependencies, this masked the actual solution to it. Makes me feel super dump now… I will open an issue at the desktop_webview_window repository and ask for advice there and downgrade the package until a solution has been found. @jamesh thank you so much :partying_face: you saved my day

1 Like