KDAB / hotspot

The Linux perf GUI for performance analysis.
4.05k stars 250 forks source link

Undefined references against qcustomplot QList<double> functions #662

Closed Jannik2099 closed 1 month ago

Jannik2099 commented 2 months ago

Hi

I'm working on packaging the newest hotspot version for gentoo, but I'm running into the following issue when building with qcustomplot:

ld.lld: error: undefined symbol: QCPGraph::setData(QList<double> const&, QList<double> const&, bool)
>>> referenced by frequencypage.cpp
>>>               src/CMakeFiles/hotspot.dir/frequencypage.cpp.o:(QtPrivate::QCallableObject<FrequencyPage::FrequencyPage(PerfParser*, QWidget*)::$_1, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*))

ld.lld: error: undefined symbol: QCPAxisTicker::generate(QCPRange const&, QLocale const&, QChar, int, QList<double>&, QList<double>*, QList<QString>*)
>>> referenced by frequencypage.cpp
>>>               src/CMakeFiles/hotspot.dir/frequencypage.cpp.o:(vtable for (anonymous namespace)::TimeAxis)

ld.lld: error: undefined symbol: QCPAxisTicker::createSubTickVector(int, QList<double> const&)
>>> referenced by frequencypage.cpp
>>>               src/CMakeFiles/hotspot.dir/frequencypage.cpp.o:(vtable for (anonymous namespace)::TimeAxis)

ld.lld: error: undefined symbol: QCPAxisTicker::createLabelVector(QList<double> const&, QLocale const&, QChar, int)
>>> referenced by frequencypage.cpp
>>>               src/CMakeFiles/hotspot.dir/frequencypage.cpp.o:(vtable for (anonymous namespace)::TimeAxis)

qcustomplot only provides these functions for QVector<double>. Any idea why the compiler emits calls against the QList overload? Where's that overload even coming from, considering that e.g. QCPGraph::setData isn't even templated? My last guess is that some default type changed from QVector to QList, but I am woefully unexperienced with Qt.

hotspot 1.5.1 Qt 6.7.2 KDE Frameworks 6.3.0 qcustomplot 2.1.1

milianw commented 1 month ago

my hunch: your qcustomplot is build against qt5, can you check that?

milianw commented 1 month ago

no response, closing this

Jannik2099 commented 1 month ago

Oops, I had to leave unexpectedly shortly after filing this and forgot - sorry.

Yeah, my qcustomplot was built against Qt5 - didn't even know that it supports Qt6. Thanks!