libretrack
libretrack copied to clipboard
Building on Ubuntu 20.04 broken
Following BUILD.md, typing 'flutter build linux' results in '"build linux" is not currently supported'. This is the first time I've even heard of flutter, so possibly I'm missing something that is obvious to more seasoned developers:
~/libretrack$ flutter build linux
Downloading linux-x64/linux-x64-flutter-gtk tools... 4.2s
Downloading linux-x64-profile/linux-x64-flutter-gtk tools... 2,371ms
Downloading linux-x64-release/linux-x64-flutter-gtk tools... 1,800ms
Warning: You are using these overridden dependencies:
! analyzer 2.1.0 (2.2.0 available)
! meta 1.7.0
! provider 6.0.0
Running "flutter pub get" in libretrack... 17.6s
"build linux" is not currently supported.
~/libretrack$ flutter --version
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (9 weeks ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
~/libretrack$ git log --pretty=format:'%h' -n 1
57b68d1
You probably need to enter the following command before building (runs once):
flutter config --enable-linux-desktop
I will add it to the documentation.
Thanks, that was it!
It later fails to link with this if you happen to have any tips:
[ +605 ms] [14/15] Linking CXX executable intermediates_do_not_run/libretrack
[ ] FAILED: intermediates_do_not_run/libretrack
[ +17 ms] : && /snap/flutter/current/usr/bin/clang++ -O3 -DNDEBUG -L/snap/flutter/current/usr/lib/gcc/x86_64-linux-gnu/8
-L/snap/flutter/current/usr/lib/x86_64-linux-gnu -lblkid -lgcrypt -llzma -lpthread -ldl -L/snap/flutter/current/usr/lib/
*snip*
/snap/flutter/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so && :
[ +5 ms] //usr/lib/x86_64-linux-gnu/libjsoncpp.so.1: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>
>::basic_ostringstream()@GLIBCXX_3.4.26'
[ +1 ms] clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like the Flutter snap package was compiled by a different compiler and the symbols don't match with the symbols of the libjsoncpp
library in the system. Try to install Flutter manually without using snap, I heard it has some problems.
Will try that. Thanks again.