Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6
-
None
-
84c7c2061 (dev), 8d0bfb83b (6.6)
Description
Error while building latest qt5 dev's HEAD on Linux x86_64
[6/288] Linking CXX shared library qtbase/lib/libQt6Grpc.so.6.6.0 FAILED: qtbase/lib/libQt6Grpc.so.6.6.0 : && /usr/bin/clang++-13 -fPIC -g -Wl,--no-undefined -Wl,--version-script,/home/builder/qt6-host-developer-build/qtgrpc/src/grpc/Grpc.version -fuse-ld=lld -Wl,--enable-new-dtags -shared -Wl,-soname,libQt6Grpc.so.6 -o qtbase/lib/libQt6Grpc.so.6.6.0 qtgrpc/src/grpc/CMakeFiles/Grpc.dir/Grpc_autogen/mocs_compilation.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpcoperation.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpccallreply.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpcstream.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpcstatus.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qabstractgrpcchannel.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpchttp2channel.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qabstractgrpcclient.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpccredentials.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpcuserpasswordcredentials.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpccalloptions.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpcchanneloptions.cpp.o qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qtgrpcglobal.cpp.o -Wl,-rpath,"\$ORIGIN:/home/builder/qt6-host-developer-build/qtbase/lib:" qtbase/lib/libQt6Protobuf.so.6.6.0 qtbase/lib/libQt6Network.so.6.6.0 qtbase/lib/libQt6Core.so.6.6.0 && : ld.lld: error: undefined symbol: QGrpcChannelOptions::metadata() const >>> referenced by qgrpchttp2channel.cpp:137 (/home/builder/qt5-git/qtgrpc/src/grpc/qgrpchttp2channel.cpp:137) >>> qtgrpc/src/grpc/CMakeFiles/Grpc.dir/qgrpchttp2channel.cpp.o:(QGrpcHttp2ChannelPrivate::post(QLatin1String, QLatin1String, QByteArrayView, QGrpcCallOptions const&, bool)) clang-13.0: error: linker command failed with exit code 1 (use -v to see invocation)
How to reproduce
cd $SRC_DIR git clone git://code.qt.io/qt/qt5.git cd qt5 perl init-repository -f --module-subset=default,-qtwebengine cd $BUILD_DIR ~/$SRC_DIR/qt5/configure \ -skip qtlocation,qtspeech,qttranslations -no-warnings-are-errors \ -no-gui -developer-build -linker lld -nomake tests -nomake examples \ -- -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 ninja
EDIT: reproduced with both clang-13 and clang-16, and both linkers, lld and GNU ld.