Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Linux build error (Flutter snap) #8

Closed
Sotneo opened this issue Sep 26, 2021 · 7 comments
Closed

Linux build error (Flutter snap) #8

Sotneo opened this issue Sep 26, 2021 · 7 comments

Comments

@Sotneo
Copy link
Contributor

Sotneo commented Sep 26, 2021

Hello. I have a error while building my app. After adding to pubspec.yaml:

libwinmedia: ^0.0.6
just_audio_libwinmedia: any
Launching lib/main.dart on Linux in debug mode...
lib/main.dart:1
CMake Error at flutter/ephemeral/.plugin_symlinks/libwinmedia/.master/CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.15 or higher is required.  You are running version 3.10.2


Exception: Unable to generate build files
Exited (sigterm)

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on Ubuntu 20.10 5.8.0-63-generic, locale ru_RU.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 4.2)
[✓] Android Studio
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)

• No issues found!

I use Flutter snap.

@alexmercerind
Copy link
Member

Sorry, I can't help with snap.
Two things:

  • Snap version of Flutter is packing older CMake (it's not my fault).
  • Why are you using distro packages in your app when you want to pack it using snap?

@Sotneo
Copy link
Contributor Author

Sotneo commented Sep 26, 2021

Sorry, I can't help with snap.
Two things:

* Snap version of Flutter is packing older CMake (it's not my fault).

Snap version of Flutter is default(In Flutter documentation). When I find a package on pub.dev with "Linux" support badge I just add it to pubspec.yaml. Usually, It just work. Anyway, thank you for your work and answer. I will try not snaped Flutter later.

* Why are you using distro packages in your app when you want to pack it using snap?

Sorry, I don't understand you question. I don't use distro packages in my app (only pub.dev dependencies).

@bdlukaa
Copy link
Contributor

bdlukaa commented Sep 26, 2021

@Sotneo can you try version 0.0.4?

@Sotneo
Copy link
Contributor Author

Sotneo commented Sep 26, 2021

@Sotneo can you try version 0.0.4?

Same error. I moved line:
cmake_minimum_required(VERSION 3.15)
to
if (CMAKE_SYSTEM_NAME STREQUAL "Windows") cmake_minimum_required(VERSION 3.15)
and add to Linux if
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") cmake_minimum_required(VERSION 3.10)
And find out that libwinmedia depend on GTK 3.0 & WebKit2 4.0 libs, which we don't have inside Flutter snap. Is there any way to add packages inside snap without rebuilding it?

@alexmercerind
Copy link
Member

I already said it.

Referencing your above comment.

I don't use distro packages in my app.

I have no experience in building snap packages or how their dependencies work unfortunately. I ship debian, flatpak packages with this library as dependency.

@Sotneo
Copy link
Contributor Author

Sotneo commented Sep 28, 2021

It is building outside of snap, if everything is installed.
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libwebkit2gtk-4.0-dev

@Sotneo Sotneo closed this as completed Sep 28, 2021
@alexmercerind
Copy link
Member

alexmercerind commented Sep 28, 2021

@Sotneo this library is internal dependency of Harmonoid & I have users using the app just fine on Linux. We distribute on Debian, Flatpak & AppImage.
There is no chance of it not building. For the bugs, I didn't check the latest pull requests & I'm using my pinned version to 0.0.4. I'm currently busy these days, neither able to work on app nor the libraries too much.
I'll see once I figure everything out myself.

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