Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
dev
-
None
-
-
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.