Linking error on Qt6 build
cd /builddir/build/BUILD/kio-extras-4f500c5/redhat-linux-build/smb/kded && /usr/bin/cmake -E cmake_link_script CMakeFiles/kded-smbwatcher.dir/link.txt --verbose=1
/usr/bin/g++ -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Werror=undef -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -pedantic -Wzero-as-null-pointer-constant -Wmissing-include-dirs -DNDEBUG -Wl,--as-needed -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -shared -o ../../bin/smbwatcher.so "CMakeFiles/kded-smbwatcher.dir/kded-smbwatcher_autogen/mocs_compilation.cpp.o" "CMakeFiles/kded-smbwatcher.dir/watcher.cpp.o" /usr/lib64/libKF6DBusAddons.so.5.240.0 ../../lib/libkio_smb_static.a /usr/lib64/libKF6KIOCore.so.5.240.0 /usr/lib64/libKF6CoreAddons.so.5.240.0 /usr/lib64/libKF6I18n.so.5.240.0 /usr/lib64/libKF6ConfigCore.so.5.240.0 /usr/lib64/libsmbclient.so /usr/lib64/libKF6DNSSD.so.5.240.0 /usr/lib64/libQt6DBus.so.6.5.1 ../../lib/libKDSoapWSDiscoveryClient.a /usr/lib64/libkdsoap-qt6.so.2.1.1 /usr/lib64/libQt6Network.so.6.5.1 /usr/lib64/libQt6Core5Compat.so.6.5.1 /usr/lib64/libQt6Core.so.6.5.1
In member function '__ct ',
inlined from 'detached' at /usr/include/qt6/QtCore/qhash.h:577:20,
inlined from 'detach' at /usr/include/qt6/QtCore/qhash.h:941:75:
/usr/include/qt6/QtCore/qhash.h:561:17: warning: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
561 | spans = new Span[nSpans];
| ^
/usr/include/c++/13/new: In member function 'detach':
/usr/include/c++/13/new:128:26: note: in a call to allocation function 'operator new []' declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
gmake[2]: Leaving directory '/builddir/build/BUILD/kio-extras-4f500c5/redhat-linux-build'
[100%] Built target smbnotifier
gmake[2]: Leaving directory '/builddir/build/BUILD/kio-extras-4f500c5/redhat-linux-build'
[100%] Built target kded-smbwatcher
In member function '__ct ',
inlined from 'detached' at /usr/include/qt6/QtCore/qhash.h:577:20,
inlined from 'detach' at /usr/include/qt6/QtCore/qhash.h:941:75:
/usr/include/qt6/QtCore/qhash.h:561:17: warning: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
561 | spans = new Span[nSpans];
| ^
/usr/include/c++/13/new: In member function 'detach':
/usr/include/c++/13/new:128:26: note: in a call to allocation function 'operator new []' declared here
128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^
/usr/bin/ld: /tmp/ccqP3cEL.ltrans3.ltrans.o: in function `QtPrivate::QDebugStreamOperatorForType<KDQName, true>::debugStream(QtPrivate::QMetaTypeInterface const*, QDebug&, void const*)':
/usr/include/qt6/QtCore/qmetatype.h:2355: undefined reference to `operator<<(QDebug, KDQName const&)'
/usr/bin/ld: /tmp/ccqP3cEL.ltrans3.ltrans.o: in function `QtPrivate::QDebugStreamOperatorForType<QList<KDQName>, true>::debugStream(QtPrivate::QMetaTypeInterface const*, QDebug&, void const*)':
/usr/include/qt6/QtCore/qdebug.h:247: undefined reference to `operator<<(QDebug, KDQName const&)'
/usr/bin/ld: /tmp/ccqP3cEL.ltrans3.ltrans.o:/usr/include/qt6/QtCore/qdebug.h:251: undefined reference to `operator<<(QDebug, KDQName const&)'
collect2: error: ld returned 1 exit status
Edited by Méven Car