5

After routine upgrade Ubuntu, my system build failed. It is using gcc 14 now, and I guess it wants 13?

I tried following the instructions here but I don't know how to do syslink

Please give me a step by step answer of what to type.

The error-build output is below:

CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler

    "/usr/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /mnt/Data/git/tipitaka-pali-reader/build/linux/x64/release/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/ninja cmTC_4da98 && [1/2] Building CXX object CMakeFiles/cmTC_4da98.dir/testCXXCompiler.cxx.o
    [2/2] Linking CXX executable cmTC_4da98
    FAILED: cmTC_4da98 
    : && /usr/bin/clang++   CMakeFiles/cmTC_4da98.dir/testCXXCompiler.cxx.o -o cmTC_4da98   && :
    /usr/bin/ld: cannot find -lstdc++: No such file or directory
    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)


Building Linux application...                                           
Unable to generate build files

The flutter doctor is below:

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.7, on Ubuntu 22.04.1 LTS 5.15.0-53-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.73.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

I'm quite sure I need 13. It is installed and reinstalled, but not showing below:

 $ clang++ --version
    Ubuntu clang version 14.0.0-1ubuntu1
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
Bhikkhu Subhuti
  • 434
  • 2
  • 12

1 Answers1

5

It seems as though the new dependencies are not listed. https://github.com/flutter/flutter/issues/115909

Reinstall all dependencies (it is included here now)

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
Bhikkhu Subhuti
  • 434
  • 2
  • 12