Link errors to libQt5DBus
I have the following link errors when I try to build "kdesrc-build dolphin". (kwallet is a dependency.) I am new to KDE development and I am not sure if it is a bug in kwallet.
Consolidate compiler generated dependencies of target kwallet-example-asynchronous
Consolidate compiler generated dependencies of target kwallet-query
Consolidate compiler generated dependencies of target kwalletwizardtest
[ 16%] Built target kwallettestlib
[ 19%] Built target kwallettest
[ 23%] Built target kwallet-example-asynchronous
[ 27%] Built target kwallet-query
[ 28%] Linking CXX executable ../../bin/kwalletwizardtest
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QObjectPrivate::QObjectPrivate(int)@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QMetaStringTable::blobSize() const@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QMetaStringTable::enter(QByteArray const&)@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `typeinfo for QAbstractMetaCallEvent@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QDaemonThread::~QDaemonThread()@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QDaemonThread::QDaemonThread(QObject*)@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QMetaStringTable::writeBlob(char*) const@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QObject::QObject(QObjectPrivate&, QObject*)@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QAbstractMetaCallEvent::~QAbstractMetaCallEvent()@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `typeinfo for QDaemonThread@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QMetaStringTable::QMetaStringTable(QByteArray const&)@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `typeinfo for QObjectPrivate@Qt_5_PRIVATE_API'
/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: /home/sascha/kde/qt5/lib/libQt5DBus.so.5: undefined reference to `QObjectPrivate::~QObjectPrivate()@Qt_5_PRIVATE_API'
collect2: error: ld returned 1 exit status
gmake[2]: *** [tests/kwalletd/CMakeFiles/kwalletwizardtest.dir/build.make:158: bin/kwalletwizardtest] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:975: tests/kwalletd/CMakeFiles/kwalletwizardtest.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/backendpersisthandler.cpp: In member function 'virtual int KWallet::GpgPersistHandler::read(KWallet::Backend*, QFile&, WId)':
/home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/backendpersisthandler.cpp:608:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
608 | while (bytes = sf.read(buffer, sizeof(buffer) / sizeof(buffer[0]))) {
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/backendpersisthandler.cpp:649:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
649 | while (bytes = decryptedData.read(buffer, sizeof(buffer) / sizeof(buffer[0]))) {
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'int password2hash(const QByteArray&, QByteArray&)',
inlined from 'void KWallet::Backend::setPassword(const QByteArray&)' at /home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/kwalletbackend.cc:700:18:
/home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/kwalletbackend.cc:206:23: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
206 | memcpy(hash.data() + 40, block3.data(), 16);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt5/QtCore/qbytearray.h:46,
from /usr/include/qt5/QtCore/qstring.h:50,
from /usr/include/qt5/QtCore/QString:1,
from /home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/kwalletentry.h:11,
from /home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/kwalletbackend.h:13,
from /home/sascha/kde/src/kwallet/src/runtime/kwalletd/backend/kwalletbackend.cc:8:
/usr/include/qt5/QtCore/qarraydata.h: In member function 'void KWallet::Backend::setPassword(const QByteArray&)':
/usr/include/qt5/QtCore/qarraydata.h:129:8: note: at offset [40, 64] into destination object 'QTypedArrayData<char>::<anonymous>' of size 24
129 | struct QTypedArrayData
| ^~~~~~~~~~~~~~~
[ 29%] Linking CXX shared library ../../../../bin/libkwalletbackend5.so
[ 35%] Built target kwalletbackend5
gmake: *** [Makefile:146: all] Error 2