Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138026

cxx23_stacktrace test incorrectly fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.8.3, 6.9.1, 6.10.0 Beta1
    • Build System: CMake
    • None

    Description

      Even for brand-new GCC 15, the test fails:

          buildResult:
            variable: "HAVE_cxx23_stacktrace"
            cached: true
            stdout: |
              Change Dir: '/home/marc/Qt/qt5-build-2/CMakeFiles/CMakeScratch/TryCompile-5ewnSE'
              
              Run Build Command(s): /usr/bin/ninja -v cmTC_e1da7
              [1/2] /d/gcc/15/bin/c++ -DHAVE_cxx23_stacktrace  -std=gnu++23 -fPIE -o CMakeFiles/cmTC_e1da7.dir/src.cxx.o -c /home/marc/Qt/qt5-build-2/CMakeFiles/CMakeScratch/TryCompile-5ewnSE/src.cxx
              [2/2] : && /d/gcc/15/bin/c++   CMakeFiles/cmTC_e1da7.dir/src.cxx.o -o cmTC_e1da7   && :
              FAILED: cmTC_e1da7 
              : && /d/gcc/15/bin/c++   CMakeFiles/cmTC_e1da7.dir/src.cxx.o -o cmTC_e1da7   && :
              /usr/bin/ld: CMakeFiles/cmTC_e1da7.dir/src.cxx.o: in function `std::basic_stacktrace<std::allocator<std::stacktrace_entry> >::current(std::allocator<std::stacktrace_entry> const&)':
              src.cxx:(.text._ZNSt16basic_stacktraceISaISt16stacktrace_entryEE7currentERKS1_[_ZNSt16basic_stacktraceISaISt16stacktrace_entryEE7currentERKS1_]+0x5b): undefined reference to `std::__stacktrace_impl::_S_current(int (*)(void*, unsigned long), void*, int)'
              collect2: error: ld returned 1 exit status
              ninja: build stopped: subcommand failed.
              
            exitCode: 1
      

      This is because, as https://stackoverflow.com/questions/72341483/how-can-i-generate-a-c23-stacktrace-with-gcc-12-1 explains, you need to link an extra library.

      Since we don't, all the <stacktrace> code is probably untested, because the test never succeeds (Clang 19 doesn't have <stacktrace> at all).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              mmutz Marc Mutz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes