1

I'm running flutter 3.0.0

$ flutter run -d linux or flutter run

Launching lib/main.dart on Linux in debug mode... CMake Error at /var/lib/snapd/snap/flutter/111/usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message): The C++ compiler

"/snap/flutter/current/usr/bin/clang++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/xxx/AndroidStudioProjects/myapp/build/linux/x64/debug/CMakeFiles/CMakeTmp

Run Build Command:"/snap/flutter/current/usr/bin/ninja" "cmTC_8627d"
[1/2] Building CXX object CMakeFiles/cmTC_8627d.dir/testCXXCompiler.cxx.o
[2/2] Linking CXX executable cmTC_8627d
FAILED: cmTC_8627d 
: && /snap/flutter/current/usr/bin/clang++    -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/ -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/ CMakeFiles/cmTC_8627d.dir/testCXXCompiler.cxx.o  -o cmTC_8627d   && :
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crt1.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0008002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crt1.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crt1.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crti.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crti.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/crtbegin.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/crtbegin.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/crtend.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/crtend.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crtn.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: /usr/lib64/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/crtn.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: //usr/lib32/libgpg-error.so.0: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: //usr/lib32/libgpg-error.so.0: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/snap/flutter/current/usr/bin/ld: warning: //lib64/libgpg-error.so.0: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/snap/flutter/current/usr/bin/ld: warning: //lib64/libgpg-error.so.0: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
//lib64/libgpg-error.so.0: undefined reference to `__libc_single_threaded@GLIBC_2.32'
//lib64/libgpg-error.so.0: undefined reference to `pthread_mutex_trylock@GLIBC_2.34'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project)

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

0

1 Answer 1

1

I had the same issue.

From discussions on this Github issue, it looks like the issue might boil down to the libraries shipped with the snap itself.

I managed to get it running on Manjaro (had the same issue as you) by switching to edge and rebuilding the app from scratch:

# Switch to the edge channel instead of stable
snap refresh flutter --edge

# Clean out the current build dir.
rm -rf ./build

# Try running again
flutter run -d linux

The edge channel probably isn't a good choice for production code, but if you just wanted to dive in to get a feel for the Linux mode, it should probably be fine :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.