Since upgrading to Ubuntu 22.04, the flutter snap no longer compiles for Linux:
flutter build linux
πͺ Building with sound null safety πͺ
CMake Error at /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/david/Source/inkworm/build/linux/x64/release/CMakeFiles/CMakeTmp
Run Build Command:"/snap/flutter/current/usr/bin/ninja" "cmTC_29e5f"
[1/2] Building CXX object CMakeFiles/cmTC_29e5f.dir/testCXXCompiler.cxx.o
[2/2] Linking CXX executable cmTC_29e5f
FAILED: cmTC_29e5f
: && /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_29e5f.dir/testCXXCompiler.cxx.o -o cmTC_29e5f && :
/snap/flutter/current/usr/bin/ld: warning: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crt1.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0008002
/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libgcc_s.so.1: undefined reference to `_dl_find_object@GLIBC_2.35'
//lib/x86_64-linux-gnu/libgpg-error.so.0: undefined reference to `__libc_single_threaded@GLIBC_2.32'
//lib/x86_64-linux-gnu/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:2 (project)