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

-platform linux-clang-libc++ fails to compile qtprotobufgen

    XMLWordPrintable

Details

    • Linux/X11
    • 26ec3d663 (dev), efee4ae9a (6.6), 476d629c6 (6.5)

    Description

      Very recent qtgrpc and qtbase fail to compile qtprotobufgen when using -platform linux-clang-libc+. The error message looks like it's trying to link to a C+ library that requires libstdc++:

      FAILED: qtbase/libexec/qtprotobufgen 
      : && /d/llvm/15/bin/clang++ -g -DNDEBUG -O2 -Wl,--enable-new-dtags -stdlib=libc++ -fPIE -pie qtgrpc/src/tools/qtprotobufgen/CMakeFiles/qtprotobufgen.dir/Unity/unity_0_cxx.cxx.o -o qtbase/libexec/qtprotobufgen  -Wl,-rpath,"\$ORIGIN/../lib:"  qtgrpc/src/tools/qtprotoccommon/libQtProtocCommon.a  /usr/lib/x86_64-linux-gnu/libprotobuf.so  /usr/lib/x86_64-linux-gnu/libprotoc.so  -lpthread && cd /home/marc/Qt/qt5-build-clang/qtgrpc/src/tools/qtprotobufgen && /d/llvm/15/bin/llvm-objcopy --only-keep-debug /home/marc/Qt/qt5-build-clang/qtbase/libexec/qtprotobufgen /home/marc/Qt/qt5-build-clang/qtbase/libexec/qtprotobufgen.debug && /d/llvm/15/bin/llvm-objcopy --strip-debug /home/marc/Qt/qt5-build-clang/qtbase/libexec/qtprotobufgen && /d/llvm/15/bin/llvm-objcopy --add-gnu-debuglink=/home/marc/Qt/qt5-build-clang/qtbase/libexec/qtprotobufgen.debug /home/marc/Qt/qt5-build-clang/qtbase/libexec/qtprotobufgen && chmod -x /home/marc/Qt/qt5-build-clang/qtbase/libexec/qtprotobufgen.debug
      /usr/bin/ld: qtgrpc/src/tools/qtprotoccommon/libQtProtocCommon.a(unity_0_cxx.cxx.o): undefined reference to symbol '_ZSt15__once_callable@@GLIBCXX_3.4.11'
      /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
      clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
      

      We should probably refuse to compile qtprotobufgen if we're compiling with an incompatible std-lib. Maybe they can both be linked into the same executable, though, and we're just missing the `-lstdc++`? This is above my paygrade, I'm afraid.

      Attachments

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

        Activity

          People

            semlanik Alexey Edelev
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes