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

cmake version #123

Closed
gsouf opened this issue Sep 20, 2022 · 2 comments
Closed

cmake version #123

gsouf opened this issue Sep 20, 2022 · 2 comments

Comments

@gsouf
Copy link

gsouf commented Sep 20, 2022

Hi,

I've got a flutter app setup with Drift. I'm running on linux using the snap install of flutter.

When I build the app I get the following error message:

CMake Error at flutter/ephemeral/.plugin_symlinks/sqlite3_flutter_libs/linux/CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.14 or higher is required.  You are running version 3.10.2

I made a bit of research and found that using the snap install of flutter I cannot upgrade the cmake version used for the build. That's mentioned in the following ticket: flutter/flutter#100183

I tried to manually decrease the cmake requirement in the cmakefile but that's also failing with error

CMake Error at flutter/ephemeral/.plugin_symlinks/sqlite3_flutter_libs/linux/CMakeLists.txt:9 (include):
  include could not find load file:

    FetchContent


CMake Error at flutter/ephemeral/.plugin_symlinks/sqlite3_flutter_libs/linux/CMakeLists.txt:20 (FetchContent_Declare):
  Unknown CMake command "FetchContent_Declare".


Exception: Unable to generate build files

So I suppose that cmake 3.14 is really required here. I have absolutely no knowledge on how cmake works, but I was wondering if it would be possible to make some changes to lower the minimum requirement of cmake is order to support the default flutter installation on linux?

Thanks

@gsouf
Copy link
Author

gsouf commented Sep 20, 2022

I should have done a bit more research before opening this one..they published an upgraded version of cmake flutter snap: canonical/flutter-snap#53

It is in core 20 so can already be installed with: snap refresh --channel=edge/core20 flutter

@gsouf gsouf closed this as completed Sep 20, 2022
@simolus3
Copy link
Owner

Unfortunately, we really need that cmake version. I'm not too familiar with all the depths of cmake either, but I think there's no good way around FetchContent which we need to download the native sqlite3 dependency. If anyone is aware of one, I'm happy to take a look at that and lower our minimum required version.

Nice find with the updated snap and the new base snap though! Hopefully this won't be a problem much longer then :)

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

No branches or pull requests

2 participants