audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

Errror running on Linux with Flutter from snap

Open zsmiklos opened this issue 2 years ago • 2 comments

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

  1. Add audioplayers: ^5.1.0 into dependencies in arbitrary apps. Like in flutter demo.
  2. Execute flutter run -d linux
  3. And the app can not start

If you would like to see a good one:

  1. Add audioplayers: ^0.18.0 into dependencies in arbitrary apps. Like in flutter demo.
  2. Execute flutter run -d linux
  3. And the app can start without error
  4. :)

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

zsmiklos avatar Sep 14 '23 19:09 zsmiklos

See #1631

Gustl22 avatar Sep 26 '23 10:09 Gustl22

For an example to publish to snap store, see also: https://github.com/jyotirmoy-paul/planets/blob/main/snap/snapcraft.yaml

Gustl22 avatar Nov 08 '23 16:11 Gustl22