Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"flutter run -d linux" GLIBC errors with flame + audioplayers_linux (Ubuntu/Pop!_OS) #96

Open
DestyNova opened this issue Feb 19, 2023 · 4 comments

Comments

@DestyNova
Copy link

DestyNova commented Feb 19, 2023

I can't build a Flutter game for Linux, using the Flame and audioplayers_linux library, due to link errors.

Steps to Reproduce

  1. Git clone this sample game
  2. Execute flutter pub get
  3. Execute flutter run -v -d linux

Expected results:

Game window appears.

Actual results:

Build fails with linker errors, possibly due to some clash between the Snap installation and system-wide GLIBC (see more output in the Logs section):

/snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlopen@GLIBC_2.34'
/snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_init@GLIBC_2.34'

To get past earlier build errors relating to the audioplayers_linux library, I had to install a couple of packages with:

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

I suspect those libraries might clash with the version of libc used by the Flutter snap:

❯ file /snap/flutter/130/lib/x86_64-linux-gnu/libc.so.6
/snap/flutter/130/lib/x86_64-linux-gnu/libc.so.6: symbolic link to libc-2.31.so
Logs
[        ] FAILED: intermediates_do_not_run/flame_2022_visual_novel_tutorial 
[   +5 ms] : && /snap/flutter/current/usr/bin/clang++  -g  -B/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -B/snap/flutter/current/usr/lib/x86_64-linux-gnu -B/snap/flutter/current/lib/x86_64-linux-gnu
-B/snap/flutter/current/usr/lib/ -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -L/snap/flutter/current/lib/x86_64-linux-gnu -L/snap/flutter/current/usr/lib/ -lblkid -lgcrypt
-llzma -llz4 -lgpg-error -luuid -lpthread -ldl -lepoxy -B/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -B/snap/flutter/current/usr/lib/x86_64-linux-gnu -B/snap/flutter/current/lib/x86_64-linux-gnu -B/snap/flutter/current/usr/lib/
-L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -L/snap/flutter/current/lib/x86_64-linux-gnu -L/snap/flutter/current/usr/lib/ -lblkid -lgcrypt -llzma -llz4 -lgpg-error -luuid
-lpthread -ldl -lepoxy CMakeFiles/flame_2022_visual_novel_tutorial.dir/main.cc.o CMakeFiles/flame_2022_visual_novel_tutorial.dir/my_application.cc.o
CMakeFiles/flame_2022_visual_novel_tutorial.dir/flutter/generated_plugin_registrant.cc.o  -o intermediates_do_not_run/flame_2022_visual_novel_tutorial
-Wl,-rpath,/home/omf/code/flutter/flame_2022_visual_novel_tutorial/build/linux/x64/debug/plugins/audioplayers_linux:/home/omf/code/flutter/flame_2022_visual_novel_tutorial/linux/flutter/ephemeral:
plugins/audioplayers_linux/libaudioplayers_linux_plugin.so  /home/omf/code/flutter/flame_2022_visual_novel_tutorial/linux/flutter/ephemeral/libflutter_linux_gtk.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgtk-3.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk-3.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libharfbuzz.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libatk-1.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo-gobject.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so && :
[   +2 ms] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlopen@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_init@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_wrlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `stat64@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `g_pattern_spec_match_string'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `g_time_zone_new_identifier'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_tryrdlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlclose@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_rdlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libunwind.so.8: undefined reference to `fstat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `stat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `dladdr@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_destroy@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_unlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlsym@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstbase-1.0.so.0: undefined reference to `g_memdup2'
Analyzing flame_2022_visual_novel_tutorial...                           

   info • Don't invoke 'print' in production code • lib/main.dart:84:7 • avoid_print
   info • The parameter name 'event' doesn't match the name 'info' in the overridden method • lib/main.dart:163:30 • avoid_renaming_method_parameters
   info • Don't invoke 'print' in production code • lib/main.dart:165:7 • avoid_print
   info • Don't invoke 'print' in production code • lib/main.dart:169:7 • avoid_print
   info • The imported package 'flame_2022_visual_novel_tutorial' isn't a dependency of the importing package • test/widget_test.dart:11:8 • depend_on_referenced_packages
  error • Target of URI doesn't exist: 'package:flame_2022_visual_novel_tutorial/main.dart' • test/widget_test.dart:11:8 • uri_does_not_exist
  error • The name 'MyApp' isn't a class • test/widget_test.dart:16:35 • creation_with_non_type

7 issues found. (ran in 1.1s)

(There are some issues but I don't think they're relevant here)

[✓] Flutter (Channel stable, 3.7.3, on Pop!_OS 22.04 LTS 6.0.12-76060006-generic, locale en_IE.UTF-8)
    • Flutter version 3.7.3 on channel stable at /home/omf/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9944297138 (9 days ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/omf/Android/Sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: /home/omf/code/android/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2021.3)
    • Android Studio at /home/omf/code/android/android-studio
    • Flutter plugin version 70.0.3
    • Dart plugin version 213.7371
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.74.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.58.0

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Pop!_OS 22.04 LTS 6.0.12-76060006-generic

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

(I opened an issue upstream but it was closed since it seems to be a Snap-specific issue)

@andreclinio
Copy link

Same problem here!

@sukso96100
Copy link

I'm also facing similar problem. In my case, I got errors while using flutter_gstreamer_player. I also installed gstreamer packages following guidelines that can be found here

I've been facing this issue on Ubuntu 23.04 (Desktop) and Ubuntu 22.04 (LXD Container)

Logs
[   +2 ms] executing: [/home/youngbin/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +8 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 796c8ef79279f9c774545b3771238c3098dbefab
[        ] executing: [/home/youngbin/snap/flutter/common/flutter/] git tag --points-at 796c8ef79279f9c774545b3771238c3098dbefab
[  +10 ms] Exit code 0 from: git tag --points-at 796c8ef79279f9c774545b3771238c3098dbefab
[        ] 3.10.5
[   +1 ms] executing: [/home/youngbin/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +9 ms] Unable to locate an Android SDK.
[   +2 ms] executing: [/home/youngbin/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/stable
[        ] executing: [/home/youngbin/snap/flutter/common/flutter/] git ls-remote --get-url origin
[   +4 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[        ] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] x86_64
[  +60 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +42 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +95 ms] Skipping pub get: version match.
[  +24 ms] Found plugin flutter_gstreamer_player at /home/youngbin/.pub-cache/hosted/pub.dev/flutter_gstreamer_player-0.0.3/
[  +11 ms] Found plugin lightstreamer_flutter_client at /home/youngbin/.pub-cache/hosted/pub.dev/lightstreamer_flutter_client-1.0.4/
[  +12 ms] Found plugin quick_usb at /home/youngbin/.pub-cache/hosted/pub.dev/quick_usb-0.3.1/
[  +11 ms] Found plugin yaru at /home/youngbin/.pub-cache/hosted/pub.dev/yaru-0.4.8/
[  +43 ms] Found plugin flutter_gstreamer_player at /home/youngbin/.pub-cache/hosted/pub.dev/flutter_gstreamer_player-0.0.3/
[   +8 ms] Found plugin lightstreamer_flutter_client at /home/youngbin/.pub-cache/hosted/pub.dev/lightstreamer_flutter_client-1.0.4/
[   +8 ms] Found plugin quick_usb at /home/youngbin/.pub-cache/hosted/pub.dev/quick_usb-0.3.1/
[   +7 ms] Found plugin yaru at /home/youngbin/.pub-cache/hosted/pub.dev/yaru-0.4.8/
[  +32 ms] Found plugin flutter_gstreamer_player at /home/youngbin/.pub-cache/hosted/pub.dev/flutter_gstreamer_player-0.0.3/
[   +5 ms] Found plugin lightstreamer_flutter_client at /home/youngbin/.pub-cache/hosted/pub.dev/lightstreamer_flutter_client-1.0.4/
[   +8 ms] Found plugin quick_usb at /home/youngbin/.pub-cache/hosted/pub.dev/quick_usb-0.3.1/
[   +9 ms] Found plugin yaru at /home/youngbin/.pub-cache/hosted/pub.dev/yaru-0.4.8/
[  +81 ms] Generating /home/youngbin/lxd-fileshare/nametag_console/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +84 ms] Initializing file store
[   +5 ms] Skipping target: gen_localizations
[   +2 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/youngbin/lxd-fileshare/nametag_console/.dart_tool/package_config_subset}
[   +9 ms] Found plugin flutter_gstreamer_player at /home/youngbin/.pub-cache/hosted/pub.dev/flutter_gstreamer_player-0.0.3/
[   +2 ms] Found plugin lightstreamer_flutter_client at /home/youngbin/.pub-cache/hosted/pub.dev/lightstreamer_flutter_client-1.0.4/
[   +6 ms] Found plugin quick_usb at /home/youngbin/.pub-cache/hosted/pub.dev/quick_usb-0.3.1/
[   +5 ms] Found plugin yaru at /home/youngbin/.pub-cache/hosted/pub.dev/yaru-0.4.8/
[   +9 ms] gen_dart_plugin_registrant: Complete
[   +1 ms] Skipping target: _composite
[   +2 ms] complete
[   +5 ms] Launching lib/main.dart on Linux in debug mode...
[   +4 ms] /home/youngbin/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/youngbin/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot
--sdk-root /home/youngbin/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true
-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/45f6e009110df4f34ec2cf99f63cf73b71b7a420/ --output-dill /tmp/flutter_tools.TNNQBD/flutter_tool.BLHQMY/app.dill --packages
/home/youngbin/lxd-fileshare/nametag_console/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
--initialize-from-dill build/4d25a1cda3833f76c80232d3b1a3704b.cache.dill.track.dill --verbosity=error --enable-experiment=alternative-invalidation-strategy
[  +27 ms] Building Linux application...
[  +15 ms] <- compile package:nametag_console/main.dart
[   +3 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64 /home/youngbin/lxd-fileshare/nametag_console/linux
[  +59 ms] -- Configuring done
[  +18 ms] -- Generating done
[        ] -- Build files have been written to: /home/youngbin/lxd-fileshare/nametag_console/build/linux/x64/debug
[   +7 ms] executing: ninja -C build/linux/x64/debug install
[   +7 ms] ninja: Entering directory `build/linux/x64/debug'
[+4109 ms] [1/11] Generating /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/libflutter_linux_gtk.so,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_method_response.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_value.h, /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/fl_view.h,
/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[   +2 ms] [   +2 ms] executing: [/home/youngbin/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [  +10 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] 796c8ef79279f9c774545b3771238c3098dbefab
[        ] [        ] executing: [/home/youngbin/snap/flutter/common/flutter/] git tag --points-at 796c8ef79279f9c774545b3771238c3098dbefab
[        ] [  +11 ms] Exit code 0 from: git tag --points-at 796c8ef79279f9c774545b3771238c3098dbefab
[        ] [        ] 3.10.5
[        ] [   +1 ms] executing: [/home/youngbin/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] stable
[        ] [   +8 ms] Unable to locate an Android SDK.
[        ] [   +1 ms] executing: [/home/youngbin/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] [        ] origin/stable
[        ] [        ] executing: [/home/youngbin/snap/flutter/common/flutter/] git ls-remote --get-url origin
[        ] [   +4 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [        ] executing: uname -m
[        ] [   +3 ms] Exit code 0 from: uname -m
[        ] [        ] x86_64
[        ] [  +28 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [  +66 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[        ] [  +29 ms] Initializing file store
[        ] [   +9 ms] Done initializing file store
[        ] [  +41 ms] Skipping target: gen_localizations
[        ] [  +11 ms] Skipping target: gen_dart_plugin_registrant
[        ] [ +297 ms] Skipping target: unpack_linux
[        ] [ +309 ms] kernel_snapshot: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/youngbin/lxd-fileshare/nametag_console/lib/main.dart}
[   +1 ms] [   +7 ms] /home/youngbin/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/home/youngbin/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot --sdk-root /home/youngbin/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/
--target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/45f6e009110df4f34ec2cf99f63cf73b71b7a420/
-Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --packages /home/youngbin/lxd-fileshare/nametag_console/.dart_tool/package_config.json --output-dill
/home/youngbin/lxd-fileshare/nametag_console/.dart_tool/flutter_build/a2ae28fd41a2cac71640d23961d96138/app.dill --depfile
/home/youngbin/lxd-fileshare/nametag_console/.dart_tool/flutter_build/a2ae28fd41a2cac71640d23961d96138/kernel_snapshot.d --incremental --initialize-from-dill
/home/youngbin/lxd-fileshare/nametag_console/.dart_tool/flutter_build/a2ae28fd41a2cac71640d23961d96138/app.dill --verbosity=error package:nametag_console/main.dart
[   +1 ms] [+1506 ms] kernel_snapshot: Complete
[        ] [ +495 ms] debug_bundle_linux-x64_assets: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
/home/youngbin/lxd-fileshare/nametag_console/.dart_tool/flutter_build/a2ae28fd41a2cac71640d23961d96138/app.dill}
[        ] [ +191 ms] shaderc command: [/home/youngbin/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/impellerc, --sksl, --iplr,
--sl=/home/youngbin/lxd-fileshare/nametag_console/build/flutter_assets/shaders/ink_sparkle.frag, --spirv=/home/youngbin/lxd-fileshare/nametag_console/build/flutter_assets/shaders/ink_sparkle.frag.spirv,
--input=/home/youngbin/snap/flutter/common/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag, --input-type=frag,
--include=/home/youngbin/snap/flutter/common/flutter/packages/flutter/lib/src/material/shaders, --include=/home/youngbin/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/shader_lib]
[        ] [ +201 ms] debug_bundle_linux-x64_assets: Complete
[        ] [ +210 ms] Persisting file store
[        ] [  +11 ms] Done persisting file store
[        ] [   +7 ms] build succeeded.
[        ] [   +9 ms] "flutter assemble" took 3,418ms.
[        ] [ +210 ms] ensureAnalyticsSent: 193ms
[        ] [        ] Running 0 shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +489 ms] [2/5] Building CXX object CMakeFiles/nametag_console.dir/flutter/generated_plugin_registrant.cc.o
[  +13 ms] [3/5] Building CXX object CMakeFiles/nametag_console.dir/my_application.cc.o
[ +184 ms] [4/5] Linking CXX executable intermediates_do_not_run/nametag_console
[        ] FAILED: intermediates_do_not_run/nametag_console 
[   +4 ms] : && /snap/flutter/current/usr/bin/clang++  -g  -B/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -B/snap/flutter/current/usr/lib/x86_64-linux-gnu -B/snap/flutter/current/lib/x86_64-linux-gnu
-B/snap/flutter/current/usr/lib/ -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/9 -L/snap/flutter/current/usr/lib/x86_64-linux-gnu -L/snap/flutter/current/lib/x86_64-linux-gnu -L/snap/flutter/current/usr/lib/
-lblkid -lgcrypt -llzma -llz4 -lgpg-error -luuid -lpthread -ldl -lepoxy -lfontconfig CMakeFiles/nametag_console.dir/main.cc.o CMakeFiles/nametag_console.dir/my_application.cc.o
CMakeFiles/nametag_console.dir/flutter/generated_plugin_registrant.cc.o  -o intermediates_do_not_run/nametag_console
-Wl,-rpath,/home/youngbin/lxd-fileshare/nametag_console/build/linux/x64/debug/plugins/flutter_gstreamer_player:/home/youngbin/lxd-fileshare/nametag_console/build/linux/x64/debug/plugins/quick_usb:/home/youngbin/lxd-
fileshare/nametag_console/build/linux/x64/debug/plugins/yaru:/home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral:  plugins/flutter_gstreamer_player/libflutter_gstreamer_player_plugin.so
plugins/quick_usb/libquick_usb_plugin.so  plugins/yaru/libyaru_plugin.so  /home/youngbin/lxd-fileshare/nametag_console/linux/flutter/ephemeral/libflutter_linux_gtk.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libgtk-3.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk-3.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libharfbuzz.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libatk-1.0.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo-gobject.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so  /snap/flutter/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so && :
[   +1 ms] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlopen@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_init@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_wrlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `stat64@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `g_pattern_spec_match_string'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `g_time_zone_new_identifier'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_tryrdlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlclose@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_rdlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libunwind.so.8: undefined reference to `fstat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libunwind.so.8: undefined reference to `stat@GLIBC_2.33'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_once@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `g_string_free_and_steal'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0: undefined reference to `dladdr@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_destroy@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `pthread_rwlock_unlock@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libdw.so.1: undefined reference to `dlsym@GLIBC_2.34'
[        ] /snap/flutter/current/usr/bin/ld: /lib/x86_64-linux-gnu/libgstbase-1.0.so.0: undefined reference to `g_memdup2'
[        ] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[   +2 ms] ninja: build stopped: subcommand failed.
[  +15 ms] Building Linux application... (completed in 4.9s)
[+7089 ms] Exception: Build process failed
[   +3 ms] "flutter run" took 12,638ms.
[   +3 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:757:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1336:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:91:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>
           
           
[  +84 ms] ensureAnalyticsSent: 79ms
[        ] Running 1 shutdown hook
[   +6 ms] Shutdown hooks complete
[   +1 ms] exiting with code 1
"flutter doctor" output
[✓] Flutter (Channel stable, 3.10.5, on Ubuntu 23.04 6.2.0-23-generic, locale ko_KR.UTF-8)
    • Flutter version 3.10.5 on channel stable at /home/youngbin/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (2주 전), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] VS Code (version 1.79.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.66.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 23.04 6.2.0-23-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.133

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

@Gustl22
Copy link

Gustl22 commented Sep 30, 2023

I think in order to fix this, we would have the need to include the gstreamer dependencies in the snapcraft.yml. The snap is also build in classic mode. I wonder, if it's possible to install the required dependencies by flutter, but also use the shared glibc library of the system instead of including it in the snap, as I suspect the glibc lib is backwards compatible and more up to date than the one in the package. But I'm not familiar at all with snap / its abstractions.

@armstrong-pv
Copy link

Fixed it for me by removing the snap version of Flutter

sudo snap remove flutter

Then following the Method 2: Manual Installation here: https://docs.flutter.dev/get-started/install/linux#method-2-manual-installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants