imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.77k stars 1.74k forks source link

Bug: Linux Example App build fails #1667

Closed Neer-Pathak closed 4 months ago

Neer-Pathak commented 4 months ago

Describe the bug The example APP present in the repository fails to build for Linux. Upon running flutter run, I get the following error -

flutter run 
Connected devices:
Linux (desktop) • linux  • linux-x64      • Ubuntu 22.04.4 LTS 6.5.0-28-generic
Chrome (web)    • chrome • web-javascript • Google Chrome 125.0.6422.60
[1]: Linux (linux)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1

Resolving dependencies... 
Downloading packages... 
  flutter_lints 2.0.3 (4.0.0 available)
  go_router 11.1.4 (14.1.2 available)
  leak_tracker 10.0.4 (10.0.5 available)
  leak_tracker_flutter_testing 3.0.3 (3.0.5 available)
  lints 2.1.1 (4.0.0 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  meta 1.12.0 (1.15.0 available)
  package_info_plus 4.2.0 (8.0.0 available)
  package_info_plus_platform_interface 2.0.1 (3.0.0 available)
  test_api 0.7.0 (0.7.1 available)
  vm_service 14.2.1 (14.2.2 available)
Got dependencies!
11 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on Linux in debug mode...
CMake Error at CMakeLists.txt:63 (add_executable):
  The target name "FL Chart App" is reserved or not valid for certain CMake
  features, such as generator expressions, and may result in undefined
  behavior.

CMake Error at CMakeLists.txt:43 (target_compile_features):
  Cannot specify compile features for target "FL Chart App" which is not
  built by this project.
Call Stack (most recent call first):
  CMakeLists.txt:71 (apply_standard_settings)

CMake Error at CMakeLists.txt:74 (target_link_libraries):
  Cannot specify link libraries for target "FL Chart App" which is not built
  by this project.

Building Linux application...                                           
Error: Unable to generate build files

To Reproduce To reproduce simply download the repository main branch code and run flutter run for linux.

Screenshots image

Versions

Neer-Pathak commented 4 months ago

I have created a pull request fixing this problem, please do check. (#1668 )