Closed 1div0 closed 3 months ago
With
qmake-qt5 -spec linux-clang-libc++ CONFIG+=debug
compilation and linking succeeded.
I can confirm this. But it also only happens with clang. GCC also compiles correctly.
I am wondering if this is a bug in clang / Qt or if this is a change in Qt where clang is just more strict then GCC is. This is definitely super strange. I can see these things that are failing:
QBasicTimer::start
- There was a change in 6.5. Might be related.QByteArray::toStdString
- I could not see a big change. The QString got a new constructor in 6.5 but no idea if this is realted. Dockerfile to reproduce:
FROM fedora:40
RUN dnf install -y git qt6-qtbase-devel clang libcxx-devel
then run
qmake -spec linux-clang-libc++ ../../
make -j 12
So I was not able to track this down. For now my recommendation is, to compile with GCC.
My best guess is, that something is not completely right with the type definitions in clang or how the defines are setup. For example, I could see that the QBasicTimer is now using std::chrono::milliseconds as a parameter. The type for this is defined as std::int64_t
.
Sorry but I will not further investigate this.
@ChristianFeldmann Thank you for all your efforts. I will try to dig deeper.
Describe the bug Linker command failed with following errors: cd YUViewApp/ && ( test -e Makefile || /bin/qmake6 -o Makefile /2TB/usr/src/github.com/IENT/YUView/YUViewApp/YUViewApp.pro -spec linux-clang-libc++ CONFIG+=debug ) && make -f Makefile make[1]: Entering directory '/2TB/usr/src/github.com/IENT/YUView/YUViewApp' clang++ -c -pipe -stdlib=libc++ -g -std=gnu++1z -Wall -Wextra -D_REENTRANT -DYUVIEW_VERSION=\"v2.14-70-g4b039328\" -DQT_WIDGETS_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../YUViewLib/src -I/usr/include/qt6 -I/usr/include/qt6/QtWidgets -I/usr/include/qt6/QtOpenGL -I/usr/include/qt6/QtGui -I/usr/include/qt6/QtXml -I/usr/include/qt6/QtConcurrent -I/usr/include/qt6/QtNetwork -I/usr/include/qt6/QtCore -I. -I/usr/lib64/qt6/mkspecs/linux-clang-libc++ -o yuviewapp.o src/yuviewapp.cpp clang++ -ccc-gcc-name g++ -stdlib=libc++ -Wl,-rpath-link,/usr/lib64 -o YUView yuviewapp.o -L/2TB/usr/src/github.com/IENT/YUView/YUViewLib -lYUViewLib /usr/lib64/libQt6Widgets.so /usr/lib64/libQt6OpenGL.so /usr/lib64/libQt6Gui.so /usr/lib64/libQt6Xml.so /usr/lib64/libQt6Concurrent.so /usr/lib64/libQt6Network.so /usr/lib64/libQt6Core.so -lpthread -lGLX -lOpenGL
/bin/ld: /2TB/usr/src/github.com/IENT/YUView/YUViewLib/libYUViewLib.a(Mainwindow.o): in function
bool QMetaType::registerConverterImpl<std::__1::pair<int, int>, QtMetaTypePrivate::QPairVariantInterfaceImpl>(std::__1::function<bool (void const*, void*)>, QMetaType, QMetaType)': /usr/include/qt6/QtCore/qmetatype.h:652: undefined reference to
QMetaType::registerConverterFunction(std::1::function<bool (void const, void)> const&, QMetaType, QMetaType)' /bin/ld: /2TB/usr/src/github.com/IENT/YUView/YUViewLib/libYUViewLib.a(PlaybackController.o): in functionQBasicTimer::start(int, Qt::TimerType, QObject*)': /usr/include/qt6/QtCore/qbasictimer.h:54: undefined reference to
QBasicTimer::start(std::1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, Qt::TimerType, QObject)' /bin/ld: /2TB/usr/src/github.com/IENT/YUView/YUViewLib/libYUViewLib.a(BitstreamAnalysisWidget.o): in functionQtConcurrent::RunFunctionTaskBase<void>::run()': /usr/include/qt6/QtConcurrent/qtconcurrentrunbase.h:88: undefined reference to
QUnhandledException::QUnhandledException(std::exception_ptr)' /bin/ld: /2TB/usr/src/github.com/IENT/YUView/YUViewLib/libYUViewLib.a(FFmpegVersionHandler.o): in functionQString::toStdString() const': /usr/include/qt6/QtCore/qstring.h:1397: undefined reference to
QByteArray::toStdString() const' /bin/ld: /2TB/usr/src/github.com/IENT/YUView/YUViewLib/libYUViewLib.a(playlistItemStatisticsFile.o): in function `QBasicTimer::start(int, QObject)': /usr/include/qt6/QtCore/qbasictimer.h:49: undefined reference to `QBasicTimer::start(std::1::chrono::duration<long long, std::1::ratio<1l, 1000l> >, QObject*)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [Makefile:69: YUView] Error 1 make[1]: Leaving directory '/2TB/usr/src/github.com/IENT/YUView/YUViewApp' make: [Makefile:73: sub-YUViewApp-make_first] Error 2qmake6 -spec linux-clang-libc++ CONFIG+=debug
Version (please complete the following information):