Errror running on Linux with Flutter from snap
Checklist
- [X] I read the troubleshooting guide before raising this issue
- [X] I made sure that the issue I am raising doesn't already exist
Current bug behaviour
First install Flutter from snap (and set up Android Studio or VS Code) Then add dependencies into pubspec.yaml into arbitrary app: audioplayers: ^5.1.0
Then flutter pub get Then the app can not start. With this error: [ +121 ms] [7/8] Linking CXX executable intermediates_do_not_run/test3 [ ] FAILED: intermediates_do_not_run/test3 .. [ ] clang: error: linker command failed with exit code 1 (use -v to see invocation) [ +1 ms] ninja: build stopped: subcommand failed.
Always. Easy to reproduce. Can not start the app because of audioplayer :(
Expected behaviour
App should run with Flutter from snap too. We should use it if we want to publish app into snap store. Flutter apps that use snap store flutter can not start (can not publish) with audioplayer. The problem occurred from the published audioplayer 1.0 (version 5.1 too). But: audioplayer version 0.20, 0.18 was ok.
Steps to reproduce
- Add audioplayers: ^5.1.0 into dependencies in arbitrary apps. Like in flutter demo.
- Execute
flutter run -d linux - And the app can not start
If you would like to see a good one:
- Add audioplayers: ^0.18.0 into dependencies in arbitrary apps. Like in flutter demo.
- Execute
flutter run -d linux - And the app can start without error
- :)
Code sample
Code sample
void main() {
}
dependencies:
audioplayers: ^5.1.0
Affected platforms
Linux
Platform details
Ubuntu 23.04, not relevant
AudioPlayers Version
all from 1.0
Build mode
debug, release
Audio Files/URLs/Sources
No response
Screenshots
No response
Logs
[ +93 ms] [6/8] Linking CXX shared library
plugins/audioplayers_linux/libaudioplayers_linux_plugin.so
[ +121 ms] [7/8] Linking CXX executable intermediates_do_not_run/test3
[ ] FAILED: intermediates_do_not_run/test3
[ +4 ms] : && /snap/flutter/current/usr/bin/clang++ -g
[ ] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[ +1 ms] ninja: build stopped: subcommand failed.
Related issues / more information
No response
Working on PR
no way
See #1631
For an example to publish to snap store, see also: https://github.com/jyotirmoy-paul/planets/blob/main/snap/snapcraft.yaml