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

Build fails with <command line>:1:9: error macro name must be an identifier #148592

Closed
TheShadowOfHassen opened this issue May 18, 2024 · 8 comments

Comments

@TheShadowOfHassen
Copy link

Steps to reproduce

  1. I follow the instructions to install flutter on a new Debian 13 install. The installation works, I can run the flutter demo
  2. I try to run Musicpod (https://github.com/ubuntu-flutter-community/musicpod)

Actual results

) it gives this error: :1:9: error macro name must be an identifier. I have all the dependencies for the project and the project builds perfectly on my Ubuntu system

Logs

Logs
[  +11 ms] Unable to locate an Android SDK.
[   +7 ms] executing: uname -m
[   +2 ms] Exit code 0 from: uname -m
[        ] x86_64
[  +80 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required,
skipping update.
[   +4 ms] 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 'LegacyCanvasKitRemover' is not required,
skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping
update.
[   +1 ms] 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.
[  +22 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.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' 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.
[  +58 ms] Initializing file store
[   +1 ms] Done initializing file store
[  +27 ms] Skipping target: gen_localizations
[   +1 ms] Persisting file store
[   +2 ms] Done persisting file store
[   +7 ms] Skipping pub get: version match.
[  +51 ms] Found plugin audio_service at
/home/ddd/.pub-cache/hosted/pub.dev/audio_service-0.18.13/
[   +5 ms] Found plugin audio_service_web at
/home/ddd/.pub-cache/hosted/pub.dev/audio_service_web-0.1.2/
[   +2 ms] Found plugin audio_session at
/home/ddd/.pub-cache/hosted/pub.dev/audio_session-0.1.19/
[  +30 ms] Found plugin connectivity_plus at
/home/ddd/.pub-cache/hosted/pub.dev/connectivity_plus-6.0.3/
[  +11 ms] Found plugin device_info_plus at
/home/ddd/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/
[   +5 ms] Found plugin file_selector at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector-1.0.3/
[   +1 ms] Found plugin file_selector_android at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_android-0.5.0+7/
[   +1 ms] Found plugin file_selector_ios at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_ios-0.5.1+9/
[   +1 ms] Found plugin file_selector_linux at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2+1/
[   +1 ms] Found plugin file_selector_macos at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.3+3/
[   +2 ms] Found plugin file_selector_web at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_web-0.9.4+1/
[   +1 ms] Found plugin file_selector_windows at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+1/
[  +15 ms] Found plugin gtk at /home/ddd/.pub-cache/hosted/pub.dev/gtk-2.1.0/
[   +1 ms] Found plugin handy_window at
/home/ddd/.pub-cache/hosted/pub.dev/handy_window-0.4.0/
[   +3 ms] Found plugin irondash_engine_context at
/home/ddd/.pub-cache/hosted/pub.dev/irondash_engine_context-0.4.1/
[  +11 ms] Found plugin media_kit_libs_android_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_android_video-1.3.6/
[   +2 ms] Found plugin media_kit_libs_ios_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_ios_video-1.1.4/
[   +1 ms] Found plugin media_kit_libs_linux at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_linux-1.1.3/
[   +1 ms] Found plugin media_kit_libs_macos_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_macos_video-1.1.4/
[   +1 ms] Found plugin media_kit_libs_windows_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_windows_video-1.0.9/
[   +1 ms] Found plugin media_kit_native_event_loop at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_native_event_loop-1.0.8/
[        ] Found plugin media_kit_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_video-1.2.4/
[   +3 ms] Found plugin package_info_plus at
/home/ddd/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/
[   +2 ms] Found plugin path_provider at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider-2.1.3/
[   +1 ms] Found plugin path_provider_android at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/
[        ] Found plugin path_provider_foundation at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/
[   +1 ms] Found plugin path_provider_linux at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
[   +2 ms] Found plugin path_provider_windows at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/
[  +15 ms] Found plugin screen_brightness at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness-0.2.2+1/
[   +1 ms] Found plugin screen_brightness_android at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_android-0.1.0+2/
[   +1 ms] Found plugin screen_brightness_ios at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_ios-0.1.0/
[   +1 ms] Found plugin screen_brightness_macos at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_macos-0.1.0+1/
[   +2 ms] Found plugin screen_brightness_windows at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_windows-0.1.3/
[   +1 ms] Found plugin screen_retriever at
/home/ddd/.pub-cache/hosted/pub.dev/screen_retriever-0.1.9/
[   +4 ms] Found plugin smtc_windows at
/home/ddd/.pub-cache/hosted/pub.dev/smtc_windows-0.1.2/
[   +3 ms] Found plugin sqflite at
/home/ddd/.pub-cache/hosted/pub.dev/sqflite-2.3.3/
[  +12 ms] Found plugin super_native_extensions at
/home/ddd/.pub-cache/hosted/pub.dev/super_native_extensions-0.7.0/
[   +2 ms] Found plugin system_theme at
/home/ddd/.pub-cache/hosted/pub.dev/system_theme-2.3.1/
[        ] Found plugin system_theme_web at
/home/ddd/.pub-cache/hosted/pub.dev/system_theme_web-0.0.2/
[   +4 ms] Found plugin url_launcher at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher-6.2.6/
[   +1 ms] Found plugin url_launcher_android at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.1/
[   +1 ms] Found plugin url_launcher_ios at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/
[   +1 ms] Found plugin url_launcher_linux at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/
[        ] Found plugin url_launcher_macos at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/
[   +1 ms] Found plugin url_launcher_web at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/
[        ] Found plugin url_launcher_windows at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/
[   +2 ms] Found plugin volume_controller at
/home/ddd/.pub-cache/hosted/pub.dev/volume_controller-2.0.7/
[   +1 ms] Found plugin wakelock_plus at
/home/ddd/.pub-cache/hosted/pub.dev/wakelock_plus-1.2.4/
[   +7 ms] Found plugin window_manager at
/home/ddd/.pub-cache/hosted/pub.dev/window_manager-0.3.8/
[   +3 ms] Found plugin yaru_window at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window-0.2.1/
[   +1 ms] Found plugin yaru_window_linux at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_linux-0.2.0/
[        ] Found plugin yaru_window_manager at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_manager-0.1.2/
[   +6 ms] Found plugin yaru_window_web at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_web-0.0.3/
[  +53 ms] Found plugin audio_service at
/home/ddd/.pub-cache/hosted/pub.dev/audio_service-0.18.13/
[   +2 ms] Found plugin audio_service_web at
/home/ddd/.pub-cache/hosted/pub.dev/audio_service_web-0.1.2/
[   +2 ms] Found plugin audio_session at
/home/ddd/.pub-cache/hosted/pub.dev/audio_session-0.1.19/
[  +24 ms] Found plugin connectivity_plus at
/home/ddd/.pub-cache/hosted/pub.dev/connectivity_plus-6.0.3/
[   +7 ms] Found plugin device_info_plus at
/home/ddd/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/
[   +3 ms] Found plugin file_selector at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector-1.0.3/
[        ] Found plugin file_selector_android at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_android-0.5.0+7/
[        ] Found plugin file_selector_ios at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_ios-0.5.1+9/
[        ] Found plugin file_selector_linux at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2+1/
[        ] Found plugin file_selector_macos at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.3+3/
[        ] Found plugin file_selector_web at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_web-0.9.4+1/
[        ] Found plugin file_selector_windows at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+1/
[   +3 ms] Found plugin gtk at /home/ddd/.pub-cache/hosted/pub.dev/gtk-2.1.0/
[        ] Found plugin handy_window at
/home/ddd/.pub-cache/hosted/pub.dev/handy_window-0.4.0/
[   +3 ms] Found plugin irondash_engine_context at
/home/ddd/.pub-cache/hosted/pub.dev/irondash_engine_context-0.4.1/
[   +7 ms] Found plugin media_kit_libs_android_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_android_video-1.3.6/
[        ] Found plugin media_kit_libs_ios_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_ios_video-1.1.4/
[        ] Found plugin media_kit_libs_linux at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_linux-1.1.3/
[        ] Found plugin media_kit_libs_macos_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_macos_video-1.1.4/
[        ] Found plugin media_kit_libs_windows_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_windows_video-1.0.9/
[        ] Found plugin media_kit_native_event_loop at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_native_event_loop-1.0.8/
[        ] Found plugin media_kit_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_video-1.2.4/
[   +2 ms] Found plugin package_info_plus at
/home/ddd/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/
[   +1 ms] Found plugin path_provider at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider-2.1.3/
[        ] Found plugin path_provider_android at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/
[        ] Found plugin path_provider_foundation at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/
[        ] Found plugin path_provider_linux at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
[        ] Found plugin path_provider_windows at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/
[   +4 ms] Found plugin screen_brightness at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness-0.2.2+1/
[        ] Found plugin screen_brightness_android at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_android-0.1.0+2/
[        ] Found plugin screen_brightness_ios at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_ios-0.1.0/
[        ] Found plugin screen_brightness_macos at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_macos-0.1.0+1/
[   +1 ms] Found plugin screen_brightness_windows at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_windows-0.1.3/
[        ] Found plugin screen_retriever at
/home/ddd/.pub-cache/hosted/pub.dev/screen_retriever-0.1.9/
[   +3 ms] Found plugin smtc_windows at
/home/ddd/.pub-cache/hosted/pub.dev/smtc_windows-0.1.2/
[   +1 ms] Found plugin sqflite at
/home/ddd/.pub-cache/hosted/pub.dev/sqflite-2.3.3/
[   +4 ms] Found plugin super_native_extensions at
/home/ddd/.pub-cache/hosted/pub.dev/super_native_extensions-0.7.0/
[   +1 ms] Found plugin system_theme at
/home/ddd/.pub-cache/hosted/pub.dev/system_theme-2.3.1/
[        ] Found plugin system_theme_web at
/home/ddd/.pub-cache/hosted/pub.dev/system_theme_web-0.0.2/
[   +1 ms] Found plugin url_launcher at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher-6.2.6/
[        ] Found plugin url_launcher_android at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.1/
[        ] Found plugin url_launcher_ios at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/
[        ] Found plugin url_launcher_linux at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/
[        ] Found plugin url_launcher_macos at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/
[        ] Found plugin url_launcher_web at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/
[        ] Found plugin url_launcher_windows at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/
[        ] Found plugin volume_controller at
/home/ddd/.pub-cache/hosted/pub.dev/volume_controller-2.0.7/
[        ] Found plugin wakelock_plus at
/home/ddd/.pub-cache/hosted/pub.dev/wakelock_plus-1.2.4/
[   +1 ms] Found plugin window_manager at
/home/ddd/.pub-cache/hosted/pub.dev/window_manager-0.3.8/
[        ] Found plugin yaru_window at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window-0.2.1/
[        ] Found plugin yaru_window_linux at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_linux-0.2.0/
[        ] Found plugin yaru_window_manager at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_manager-0.1.2/
[        ] Found plugin yaru_window_web at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_web-0.0.3/
[   +5 ms] Generating
/home/ddd/Downloads/musicpod-main/android/app/src/main/java/io/flutter/plugins/G
eneratedPluginRegistrant.java
[  +70 ms] No packages with native assets. Skipping native assets compilation.
[        ] Initializing file store
[   +1 ms] gen_localizations: Starting due to
{InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
/home/ddd/flutter/packages/flutter_tools/lib/src/build_system/targets/localizati
ons.dart,/home/ddd/Downloads/musicpod-main/l10n.yaml,/home/ddd/Downloads/musicpo
d-main/lib/src/l10n/app_cs.arb,/home/ddd/Downloads/musicpod-main/lib/src/l10n/ap
p_da.arb,/home/ddd/Downloads/musicpod-main/lib/src/l10n/app_de.arb,/home/ddd/Dow
nloads/musicpod-main/lib/src/l10n/app_en.arb,/home/ddd/Downloads/musicpod-main/l
ib/src/l10n/app_es.arb,/home/ddd/Downloads/musicpod-main/lib/src/l10n/app_fr.arb
,/home/ddd/Downloads/musicpod-main/lib/src/l10n/app_it.arb,/home/ddd/Downloads/m
usicpod-main/lib/src/l10n/app_nl.arb,/home/ddd/Downloads/musicpod-main/lib/src/l
10n/app_pl.arb,/home/ddd/Downloads/musicpod-main/lib/src/l10n/app_pt_BR.arb,/hom
e/ddd/Downloads/musicpod-main/lib/src/l10n/app_ru.arb,/home/ddd/Downloads/musicp
od-main/lib/src/l10n/app_sk.arb,/home/ddd/Downloads/musicpod-main/lib/src/l10n/a
pp_sv.arb,/home/ddd/Downloads/musicpod-main/lib/src/l10n/app_tr.arb,/home/ddd/Do
wnloads/musicpod-main/lib/src/l10n/app_zh.arb,/home/ddd/Downloads/musicpod-main/
lib/src/l10n/apt_pt.arb,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen
/gen_l10n/app_localizations_cs.dart,/home/ddd/Downloads/musicpod-main/.dart_tool
/flutter_gen/gen_l10n/app_localizations_da.dart,/home/ddd/Downloads/musicpod-mai
n/.dart_tool/flutter_gen/gen_l10n/app_localizations_de.dart,/home/ddd/Downloads/
musicpod-main/.dart_tool/flutter_gen/gen_l10n/app_localizations_en.dart,/home/dd
d/Downloads/musicpod-main/.dart_tool/flutter_gen/gen_l10n/app_localizations_es.d
art,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen/gen_l10n/app_locali
zations_fr.dart,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen/gen_l10
n/app_localizations_it.dart,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter
_gen/gen_l10n/app_localizations_nl.dart,/home/ddd/Downloads/musicpod-main/.dart_
tool/flutter_gen/gen_l10n/app_localizations_pl.dart,/home/ddd/Downloads/musicpod
-main/.dart_tool/flutter_gen/gen_l10n/app_localizations_pt.dart,/home/ddd/Downlo
ads/musicpod-main/.dart_tool/flutter_gen/gen_l10n/app_localizations_ru.dart,/hom
e/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen/gen_l10n/app_localizations_
sk.dart,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen/gen_l10n/app_lo
calizations_sv.dart,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen/gen
_l10n/app_localizations_tr.dart,/home/ddd/Downloads/musicpod-main/.dart_tool/flu
tter_gen/gen_l10n/app_localizations_zh.dart,/home/ddd/Downloads/musicpod-main/ne
eds_translation.json,/home/ddd/Downloads/musicpod-main/.dart_tool/flutter_gen/ge
n_l10n/app_localizations.dart}
[ +123 ms] gen_dart_plugin_registrant: Starting due to
{InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
/home/ddd/Downloads/musicpod-main/.dart_tool/package_config_subset,/home/ddd/Dow
nloads/musicpod-main/.dart_tool/flutter_build/dart_plugin_registrant.dart}
[   +2 ms] gen_localizations: Complete
[  +23 ms] Found plugin audio_service at
/home/ddd/.pub-cache/hosted/pub.dev/audio_service-0.18.13/
[   +2 ms] Found plugin audio_service_web at
/home/ddd/.pub-cache/hosted/pub.dev/audio_service_web-0.1.2/
[   +3 ms] Found plugin audio_session at
/home/ddd/.pub-cache/hosted/pub.dev/audio_session-0.1.19/
[  +15 ms] Found plugin connectivity_plus at
/home/ddd/.pub-cache/hosted/pub.dev/connectivity_plus-6.0.3/
[   +6 ms] Found plugin device_info_plus at
/home/ddd/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/
[   +6 ms] Found plugin file_selector at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector-1.0.3/
[   +1 ms] Found plugin file_selector_android at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_android-0.5.0+7/
[   +1 ms] Found plugin file_selector_ios at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_ios-0.5.1+9/
[        ] Found plugin file_selector_linux at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2+1/
[   +1 ms] Found plugin file_selector_macos at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.3+3/
[   +2 ms] Found plugin file_selector_web at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_web-0.9.4+1/
[        ] Found plugin file_selector_windows at
/home/ddd/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+1/
[  +17 ms] Found plugin gtk at /home/ddd/.pub-cache/hosted/pub.dev/gtk-2.1.0/
[   +1 ms] Found plugin handy_window at
/home/ddd/.pub-cache/hosted/pub.dev/handy_window-0.4.0/
[   +5 ms] Found plugin irondash_engine_context at
/home/ddd/.pub-cache/hosted/pub.dev/irondash_engine_context-0.4.1/
[  +14 ms] Found plugin media_kit_libs_android_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_android_video-1.3.6/
[        ] Found plugin media_kit_libs_ios_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_ios_video-1.1.4/
[   +1 ms] Found plugin media_kit_libs_linux at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_linux-1.1.3/
[        ] Found plugin media_kit_libs_macos_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_macos_video-1.1.4/
[   +2 ms] Found plugin media_kit_libs_windows_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_libs_windows_video-1.0.9/
[   +4 ms] Found plugin media_kit_native_event_loop at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_native_event_loop-1.0.8/
[        ] Found plugin media_kit_video at
/home/ddd/.pub-cache/hosted/pub.dev/media_kit_video-1.2.4/
[  +11 ms] Found plugin package_info_plus at
/home/ddd/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/
[   +3 ms] Found plugin path_provider at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider-2.1.3/
[        ] Found plugin path_provider_android at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_android-2.2.4/
[   +1 ms] Found plugin path_provider_foundation at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_foundation-2.3.2/
[        ] Found plugin path_provider_linux at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
[   +2 ms] Found plugin path_provider_windows at
/home/ddd/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/
[  +13 ms] Found plugin screen_brightness at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness-0.2.2+1/
[        ] Found plugin screen_brightness_android at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_android-0.1.0+2/
[        ] Found plugin screen_brightness_ios at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_ios-0.1.0/
[        ] Found plugin screen_brightness_macos at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_macos-0.1.0+1/
[   +1 ms] Found plugin screen_brightness_windows at
/home/ddd/.pub-cache/hosted/pub.dev/screen_brightness_windows-0.1.3/
[        ] Found plugin screen_retriever at
/home/ddd/.pub-cache/hosted/pub.dev/screen_retriever-0.1.9/
[   +4 ms] Found plugin smtc_windows at
/home/ddd/.pub-cache/hosted/pub.dev/smtc_windows-0.1.2/
[   +7 ms] Found plugin sqflite at
/home/ddd/.pub-cache/hosted/pub.dev/sqflite-2.3.3/
[  +24 ms] Found plugin super_native_extensions at
/home/ddd/.pub-cache/hosted/pub.dev/super_native_extensions-0.7.0/
[   +1 ms] Found plugin system_theme at
/home/ddd/.pub-cache/hosted/pub.dev/system_theme-2.3.1/
[        ] Found plugin system_theme_web at
/home/ddd/.pub-cache/hosted/pub.dev/system_theme_web-0.0.2/
[   +9 ms] Found plugin url_launcher at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher-6.2.6/
[   +1 ms] Found plugin url_launcher_android at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.1/
[        ] Found plugin url_launcher_ios at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/
[        ] Found plugin url_launcher_linux at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/
[   +1 ms] Found plugin url_launcher_macos at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/
[   +2 ms] Found plugin url_launcher_web at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.1/
[        ] Found plugin url_launcher_windows at
/home/ddd/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/
[   +6 ms] Found plugin volume_controller at
/home/ddd/.pub-cache/hosted/pub.dev/volume_controller-2.0.7/
[        ] Found plugin wakelock_plus at
/home/ddd/.pub-cache/hosted/pub.dev/wakelock_plus-1.2.4/
[   +7 ms] Found plugin window_manager at
/home/ddd/.pub-cache/hosted/pub.dev/window_manager-0.3.8/
[   +2 ms] Found plugin yaru_window at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window-0.2.1/
[        ] Found plugin yaru_window_linux at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_linux-0.2.0/
[   +1 ms] Found plugin yaru_window_manager at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_manager-0.1.2/
[   +1 ms] Found plugin yaru_window_web at
/home/ddd/.pub-cache/hosted/pub.dev/yaru_window_web-0.0.3/
[  +12 ms] gen_dart_plugin_registrant: Complete
[        ] Skipping target: _composite
[   +1 ms] complete
[   +2 ms] Launching lib/main.dart on Linux in debug mode...
[   +2 ms] /home/ddd/flutter/bin/cache/dart-sdk/bin/dartaotruntime
--disable-dart-dev
/home/ddd/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snap
shot --sdk-root
/home/ddd/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/
--incremental --target=flutter --experimental-emit-debug-metadata
-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/f6344b75dc
f861d8bf1f1322780b8811f982e31a/ --output-dill
/tmp/flutter_tools.VMJLOQ/flutter_tool.FPXAKW/app.dill --packages
/home/ddd/Downloads/musicpod-main/.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/1bcac9131f185b5e8bd0f600f6ffecf8.cache.dill.track.dill --source
file:///home/ddd/Downloads/musicpod-main/.dart_tool/flutter_build/dart_plugin_re
gistrant.dart --source package:flutter/src/dart_plugin_registrant.dart
-Dflutter.dart_plugin_registrant=file:///home/ddd/Downloads/musicpod-main/.dart_
tool/flutter_build/dart_plugin_registrant.dart --verbosity=error
--enable-experiment=alternative-invalidation-strategy
[  +10 ms] Building Linux application...
[   +4 ms] <- compile package:musicpod/main.dart
[        ] executing: [build/linux/x64/debug/] cmake -G Ninja
-DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64
/home/ddd/Downloads/musicpod-main/linux
[  +22 ms] -- Checking for module 'glib-2.0'
[   +7 ms] --   Found glib-2.0, version 2.80.2
[  +22 ms] -- Checking for module 'glib-2.0>=2.58'
[   +8 ms] --   Found glib-2.0, version 2.80.2
[  +34 ms] -- Configuring done (0.1s)
[  +30 ms] -- Generating done (0.0s)
[   +6 ms] -- Build files have been written to:
/home/ddd/Downloads/musicpod-main/build/linux/x64/debug
[   +6 ms] executing: ninja -C build/linux/x64/debug install
[   +5 ms] ninja: Entering directory `build/linux/x64/debug'
[ +193 ms] [1/42] Generating libsuper_native_extensions.so, _phony_
[ +198 ms] [2/42] Building CXX object
plugins/media_kit_native_event_loop/shared/CMakeFiles/media_kit_native_event_loo
p.dir/media_kit_native_event_loop.cc.o
[        ] FAILED:
plugins/media_kit_native_event_loop/shared/CMakeFiles/media_kit_native_event_loo
p.dir/media_kit_native_event_loop.cc.o
[        ] /usr/bin/clang++ -D-pthread
-DAPPLICATION_ID=\"org.feichtmeier.Musicpod\" -DDART_SHARED_LIB -D_REENTRANT
-Dmedia_kit_native_event_loop_EXPORTS -isystem /usr/include/freetype2 -isystem
/usr/include/libpng16 -isystem /usr/include/harfbuzz -isystem
/usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include
-isystem /usr/include/sysprof-6 -isystem /usr/include/fribidi -isystem
/usr/include/libxml2 -isystem /usr/include/lua5.2 -isystem /usr/include/SDL2
-isystem /usr/include/uchardet -isystem /usr/include/pipewire-0.3 -isystem
/usr/include/spa-0.2 -isystem /usr/include/libdrm -isystem /usr/include/sixel -g
-std=gnu++17 -fPIC -pthread -D_REENTRANT -MD -MT
plugins/media_kit_native_event_loop/shared/CMakeFiles/media_kit_native_event_loo
p.dir/media_kit_native_event_loop.cc.o -MF
plugins/media_kit_native_event_loop/shared/CMakeFiles/media_kit_native_event_loo
p.dir/media_kit_native_event_loop.cc.o.d -o
plugins/media_kit_native_event_loop/shared/CMakeFiles/media_kit_native_event_loo
p.dir/media_kit_native_event_loop.cc.o -c
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/.plugin_symlinks/media
_kit_native_event_loop/src/media_kit_native_event_loop.cc
[        ] In file included from <built-in>:436:
[        ] <command line>:1:9: error: macro name must be an identifier
[        ] #define -pthread 1
[        ]         ^
[        ] 1 error generated.
[+1565 ms] [3/42] Generating
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/libflutter_linux_gtk.s
o,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_basic
_message_channel.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_binar
y_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_binar
y_messenger.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_dart_
project.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_engin
e.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_json_
message_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_json_
method_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_messa
ge_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_metho
d_call.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_metho
d_channel.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_metho
d_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_metho
d_response.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_plugi
n_registrar.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_plugi
n_registry.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_stand
ard_message_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_stand
ard_method_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_strin
g_codec.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_value
.h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/fl_view.
h,
/home/ddd/Downloads/musicpod-main/linux/flutter/ephemeral/flutter_linux/flutter_
linux.h, _phony_
[   +1 ms] [  +12 ms] Unable to locate an Android SDK.
[        ] [   +4 ms] executing: uname -m
[        ] [   +1 ms] Exit code 0 from: uname -m
[        ] [        ] x86_64
[        ] [  +27 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.
[        ] [        ] Artifact Instance of 'LegacyCanvasKitRemover' 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 '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 '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 'LegacyCanvasKitRemover' 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.
[        ] [  +21 ms] Initializing file store
[        ] [  +10 ms] Done initializing file store
[        ] [  +54 ms] Skipping target: native_assets
[        ] [   +6 ms] Skipping target: gen_localizations
[        ] [        ] Skipping target: gen_dart_plugin_registrant
[        ] [ +361 ms] Skipping target: unpack_linux
[        ] [ +562 ms] Skipping target: kernel_snapshot
[        ] [ +382 ms] Skipping target: debug_bundle_linux-x64_assets
[        ] [        ] Persisting file store
[        ] [  +11 ms] Done persisting file store
[        ] [  +11 ms] build succeeded.
[        ] [   +5 ms] "flutter assemble" took 1,474ms.
[        ] [ +215 ms] ensureAnalyticsSent: 204ms
[        ] [        ] Running 0 shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [   +4 ms] exiting with code 0
[        ] ninja: build stopped: subcommand failed.
[   +7 ms] Building Linux application... (completed in 2,117ms)
[+12398 ms] Error: Build process failed
[   +2 ms] "flutter run" took 15,556ms.
[   +4 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:840:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1394:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153: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:372:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:308:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:93:3)
           <asynchronous suspension>
           
           
[  +48 ms] ensureAnalyticsSent: 46ms
[        ] Running 1 shutdown hook
[   +5 ms] Shutdown hooks complete
[ +107 ms] exiting with code 1

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.0, on Debian GNU/Linux trixie/sid
    6.7.12-amd64, locale C.UTF-8)
[✗] 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 (Cannot find Chrome executable at
    google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 3 categories.

@bc-lee
Copy link

bc-lee commented May 18, 2024

I built Musicpod using the following configurations:

  • Debian bookworm, trixie
  • Flutter 3.19.6, 3.22.0

The build results are available here.

In summary, the build succeeds with debian:bookworm but fails with debian:trixie. It also fails on my local Fedora 40 machine.

The error message is identical to what repoter has reported.

During my local run, I discovered several files in build.ninja that have -D-pthread in the DEFINES field.

build plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir/video_output_manager.cc.o: CXX_COMPILER__media_kit_video_plugin_unscanned_Debug /path/to/musicpod/linux/flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/video_output_manager.cc || cmake_object_order_depends_target_media_kit_video_plugin
  DEFINES = -D-pthread -DAPPLICATION_ID=\"org.feichtmeier.Musicpod\" -DFLUTTER_PLUGIN_IMPL -DWITH_GZFILEOP -D_REENTRANT -Dmedia_kit_video_plugin_EXPORTS
  DEP_FILE = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir/video_output_manager.cc.o.d
  FLAGS = -g -std=gnu++17 -fPIC -fvisibility=hidden -Wall -Werror -DWITH_GZFILEOP -pthread -D_REENTRANT
INCLUDES = ... (remaining include paths)
  OBJECT_DIR = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir
  OBJECT_FILE_DIR = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir

This is incorrect. -pthread is not a valid preprocessor definition for the DEFINES field. It should be included in the FLAGS field (often CXXFLAGS).

Furthermore, these incorrect flags only appear in files related to media_kit_video.

On my local machine, I found a CMake code in the linux/flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/CMakeLists.txt file:

  target_compile_definitions(
    ${PLUGIN_NAME} PRIVATE
    FLUTTER_PLUGIN_IMPL
    "${mpv_CFLAGS_OTHER}"
    "${epoxy_CFLAGS_OTHER}"
  )

This is also incorrect. target_compile_definitions is for preprocessor definitions, not compiler flags. It should be target_compile_options instead.

For more information, refer to Brad King's comment (The core developer of CMake) here.

I checked the latest code of the media-kit plugin and found that this issue has been fixed here.

Therefore, this is not a Flutter issue. To resolve this problem, you should request the musicpod maintainer to update their code to use the latest version of the media-kit plugin.

@Feichtmeier
Copy link

I built Musicpod using the following configurations:

* Debian bookworm, trixie

* Flutter 3.19.6, 3.22.0

The build results are available here.

In summary, the build succeeds with debian:bookworm but fails with debian:trixie. It also fails on my local Fedora 40 machine.

The error message is identical to what repoter has reported.

During my local run, I discovered several files in build.ninja that have -D-pthread in the DEFINES field.

build plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir/video_output_manager.cc.o: CXX_COMPILER__media_kit_video_plugin_unscanned_Debug /path/to/musicpod/linux/flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/video_output_manager.cc || cmake_object_order_depends_target_media_kit_video_plugin
  DEFINES = -D-pthread -DAPPLICATION_ID=\"org.feichtmeier.Musicpod\" -DFLUTTER_PLUGIN_IMPL -DWITH_GZFILEOP -D_REENTRANT -Dmedia_kit_video_plugin_EXPORTS
  DEP_FILE = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir/video_output_manager.cc.o.d
  FLAGS = -g -std=gnu++17 -fPIC -fvisibility=hidden -Wall -Werror -DWITH_GZFILEOP -pthread -D_REENTRANT
INCLUDES = ... (remaining include paths)
  OBJECT_DIR = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir
  OBJECT_FILE_DIR = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir

This is incorrect. -pthread is not a valid preprocessor definition for the DEFINES field. It should be included in the FLAGS field (often CXXFLAGS).

Furthermore, these incorrect flags only appear in files related to media_kit_video.

On my local machine, I found a CMake code in the linux/flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/CMakeLists.txt file:

  target_compile_definitions(
    ${PLUGIN_NAME} PRIVATE
    FLUTTER_PLUGIN_IMPL
    "${mpv_CFLAGS_OTHER}"
    "${epoxy_CFLAGS_OTHER}"
  )

This is also incorrect. target_compile_definitions is for preprocessor definitions, not compiler flags. It should be target_compile_options instead.

For more information, refer to Brad King's comment (The core developer of CMake) here.

I checked the latest code of the media-kit plugin and found that this issue has been fixed here.

Therefore, this is not a Flutter issue. To resolve this problem, you should request the musicpod maintainer to update their code to use the latest version of the media-kit plugin.

Thanks for the detailed analysis. Media kit is up to date though, maybe we should continue on musicpod github repo then if you are sure this is not a flutter issue

@TheShadowOfHassen
Copy link
Author

I built Musicpod using the following configurations:

* Debian bookworm, trixie

* Flutter 3.19.6, 3.22.0

The build results are available here.

In summary, the build succeeds with debian:bookworm but fails with debian:trixie. It also fails on my local Fedora 40 machine.

The error message is identical to what repoter has reported.

During my local run, I discovered several files in build.ninja that have -D-pthread in the DEFINES field.

build plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir/video_output_manager.cc.o: CXX_COMPILER__media_kit_video_plugin_unscanned_Debug /path/to/musicpod/linux/flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/video_output_manager.cc || cmake_object_order_depends_target_media_kit_video_plugin
  DEFINES = -D-pthread -DAPPLICATION_ID=\"org.feichtmeier.Musicpod\" -DFLUTTER_PLUGIN_IMPL -DWITH_GZFILEOP -D_REENTRANT -Dmedia_kit_video_plugin_EXPORTS
  DEP_FILE = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir/video_output_manager.cc.o.d
  FLAGS = -g -std=gnu++17 -fPIC -fvisibility=hidden -Wall -Werror -DWITH_GZFILEOP -pthread -D_REENTRANT
INCLUDES = ... (remaining include paths)
  OBJECT_DIR = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir
  OBJECT_FILE_DIR = plugins/media_kit_video/CMakeFiles/media_kit_video_plugin.dir

This is incorrect. -pthread is not a valid preprocessor definition for the DEFINES field. It should be included in the FLAGS field (often CXXFLAGS).

Furthermore, these incorrect flags only appear in files related to media_kit_video.

On my local machine, I found a CMake code in the linux/flutter/ephemeral/.plugin_symlinks/media_kit_video/linux/CMakeLists.txt file:

  target_compile_definitions(
    ${PLUGIN_NAME} PRIVATE
    FLUTTER_PLUGIN_IMPL
    "${mpv_CFLAGS_OTHER}"
    "${epoxy_CFLAGS_OTHER}"
  )

This is also incorrect. target_compile_definitions is for preprocessor definitions, not compiler flags. It should be target_compile_options instead.

For more information, refer to Brad King's comment (The core developer of CMake) here.

I checked the latest code of the media-kit plugin and found that this issue has been fixed here.

Therefore, this is not a Flutter issue. To resolve this problem, you should request the musicpod maintainer to update their code to use the latest version of the media-kit plugin.

We made a branch with the media-kit plugin updated to the latest git: https://github.com/ubuntu-flutter-community/musicpod/tree/mk_test and the issue seems to persist.

@bc-lee
Copy link

bc-lee commented May 18, 2024

It is necessary to override media_kit_native_event_loop also due to another issue in the media-kit project's CMakeLists.txt file. This was addressed in a commit.

To resolve the issue locally, I added another override section like this:

  media_kit_native_event_loop:
    git:
      url: https://github.com/media-kit/media-kit
      path: media_kit_native_event_loop/
      ref: 13f6b3f0ef9ccf8a711e396bc49cb05af9b3e497

This approach allowed me to build the project successfully. I hope this helps.

@TheShadowOfHassen
Copy link
Author

TheShadowOfHassen commented May 18, 2024

Thanks, @bc-lee for the help, but one question. I'm kind of new to all of this, where do I put the overide section?

@bc-lee
Copy link

bc-lee commented May 18, 2024

Below the last line of pubspec.yaml file. Specifically, see the existing ovride section in the pubspec.yaml file of the musicpod project: https://github.com/ubuntu-flutter-community/musicpod/blob/4fed637b4771bff3c3dedd4cd2b62c697d331cc8/pubspec.yaml#L98

@TheShadowOfHassen
Copy link
Author

That fixes it, thank you.

Copy link

github-actions bot commented Jun 1, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants