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 Linux]: Bundling for Snap Store not working #941

Open
matthiasn opened this issue May 4, 2022 · 4 comments
Open

[Flutter Linux]: Bundling for Snap Store not working #941

matthiasn opened this issue May 4, 2022 · 4 comments

Comments

@matthiasn
Copy link
Owner

matthiasn commented May 4, 2022

Bundling the Linux app as a Snap file and eventually publishing to the Snap Store would offer a far better user experience than publishing a tar file on GitHub Releases. However, I'm running into issues with CMake being too old. When bundling a Snap file, apparently the Flutter installation from the Flutter Snap is used, and that comes with an ancient version.

Also see:

@matthiasn matthiasn changed the title Bundling for Snap Store not working [Flutter Linux] Bundling for Snap Store not working May 4, 2022
@matthiasn matthiasn changed the title [Flutter Linux] Bundling for Snap Store not working [Flutter Linux]: Bundling for Snap Store not working May 4, 2022
@matthiasn
Copy link
Owner Author

canonical/flutter-snap#61 looks promising

@matthiasn
Copy link
Owner Author

@matthiasn
Copy link
Owner Author

@lucyllewy I just found https://github.com/lucyllewy/macOS-Linux-VM-with-Rosetta and wow, that's awesome, thank you so much, that looks really promising! However, I was struggling with getting the latest released Flutter version running via snap, and also ran into issues running manually installed Flutter. So while I did try to run with your fix in krille-chan/fluffychat-snap#1, I'm still struggling 🙂

@afl-dev
Copy link

afl-dev commented Sep 1, 2023

Still not working:
snapcraft --use-lxd --bind-ssh

(if build from flutter git version its ok)

[+15 ms] executing: [build/linux/x64/release/] cmake -G Ninja
-DCMAKE_BUILD_TYPE=Release -DFLUTTER_TARGET_PLATFORM=linux-x64
/root/parts/myapp/build/linux
[ +777 ms] CMake Error: The current CMakeCache.txt directory
/root/parts/myapp/build/build/linux/x64/release/CMakeCache.txt is different
than the directory /home/vboxuser/projects/sd/build/linux/x64/release where
CMakeCache.txt was created. This may result in binaries being created in the
wrong place. If you are not sure, reedit the CMakeCache.txt
[ +9 ms] CMake Error: The source
"/root/parts/myapp/build/linux/CMakeLists.txt" does not match the source
"/home/vboxuser/projects/sd/linux/CMakeLists.txt" used to generate cache.
Re-run cmake with a different source directory.
[ +167 ms] Building Linux application... (completed in 958ms)
[ ] "flutter linux" took 3,316ms.
[ +5 ms] Unable to generate build files
[ +1 ms]
0 throwToolExit
(package:flutter_tools/src/base/common.dart:10:3)
1 _runCmake
(package:flutter_tools/src/linux/build_linux.dart:151:5)

2 buildLinux
(package:flutter_tools/src/linux/build_linux.dart:73:5)

3 BuildLinuxCommand.runCommand
(package:flutter_tools/src/commands/build_linux.dart:86:5)

4 FlutterCommand.run.
(package:flutter_tools/src/runner/flutter_command.dart:1297:27)

5 AppContext.run.
(package:flutter_tools/src/base/context.dart:150:19)

6 CommandRunner.runCommand
(package:args/command_runner.dart:212:13)

7 FlutterCommandRunner.runCommand.
(package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)

8 AppContext.run.
(package:flutter_tools/src/base/context.dart:150:19)

9 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)

10 run..
(package:flutter_tools/runner.dart:115:9)

11 AppContext.run.
(package:flutter_tools/src/base/context.dart:150:19)

12 main (package:flutter_tools/executable.dart:90:3)

snapcraft 7.5.2
cmake version 3.27.4

(snap download Flutter 3.13.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ff5b5b5fa6 (8 days ago) • 2023-08-24 08:12:28 -0500
Engine • revision b20183e040)
Tools • Dart 3.1.0 • DevTools 2.25.0

Ubuntu 22.04.3 LTS (vbox)

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

No branches or pull requests

2 participants