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

Building on Ubuntu 20.04 broken #24

Open
DrivebyCoding opened this issue Sep 2, 2021 · 4 comments
Open

Building on Ubuntu 20.04 broken #24

DrivebyCoding opened this issue Sep 2, 2021 · 4 comments

Comments

@DrivebyCoding
Copy link

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
@proninyaroslav
Copy link
Owner

proninyaroslav commented Sep 3, 2021

You probably need to enter the following command before building (runs once):

flutter config --enable-linux-desktop

I will add it to the documentation.

@DrivebyCoding
Copy link
Author

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)

@proninyaroslav
Copy link
Owner

proninyaroslav commented Sep 3, 2021

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.

@DrivebyCoding
Copy link
Author

Will try that. Thanks again.

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