Closed ycollet closed 2 months ago
Thanks a lot !
Same issue here on Ubuntu Studio 22.04 (trying to compile Polyphone 2.4.0
):
core/sample/sampleutils.cpp: In static member function ‘static QVector<float> SampleUtils::resampleMono(QVector<float>, double, quint32)’:
core/sample/sampleutils.cpp:76:54: error: no matching function for call to ‘qMin(double, float)’
76 | pos1 = static_cast<qint32>(qMax(0.f, qMin(floor(delta), 2047.f)) + .5f);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QList:1,
from core/types/idlist.h:28,
from core/types/basetypes.h:28,
from core/sample/sampleutils.h:28,
from core/sample/sampleutils.cpp:25:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:671:27: note: candidate: ‘template<class T> constexpr const T& qMin(const T&, const T&)’
671 | constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
| ^~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:671:27: note: template argument deduction/substitution failed:
core/sample/sampleutils.cpp:76:54: note: deduced conflicting types for parameter ‘const T’ (‘double’ and ‘float’)
76 | pos1 = static_cast<qint32>(qMax(0.f, qMin(floor(delta), 2047.f)) + .5f);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
core/sample/sampleutils.cpp:77:54: error: no matching function for call to ‘qMin(double, float)’
77 | pos2 = static_cast<qint32>(qMax(0.f, qMin(ceil (delta), 2047.f)) + .5f);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qalgorithms.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:43,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QList:1,
from core/types/idlist.h:28,
from core/types/basetypes.h:28,
from core/sample/sampleutils.h:28,
from core/sample/sampleutils.cpp:25:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:671:27: note: candidate: ‘template<class T> constexpr const T& qMin(const T&, const T&)’
671 | constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
| ^~~~
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:671:27: note: template argument deduction/substitution failed:
core/sample/sampleutils.cpp:77:54: note: deduced conflicting types for parameter ‘const T’ (‘double’ and ‘float’)
77 | pos2 = static_cast<qint32>(qMax(0.f, qMin(ceil (delta), 2047.f)) + .5f);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:6432: sampleutils.o] Error 1
Tried to compile the source from a repo clone (instead of source_code_link from web site). Problem seems to be partially solved.
Now I'm stuck here:
player/playerpresetlist.cpp: In member function ‘int PlayerPresetList::columnCount()’:
player/playerpresetlist.cpp:58:29: error: ‘ceil’ was not declared in this scope
58 | return static_cast<int>(ceil((double)this->viewport()->width() / _minCellWidth) + 0.5);
| ^~~~
player/playerpresetlist.cpp:58:29: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:59,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qframe.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractscrollarea.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemview.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qlistview.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QListView:1,
from player/playerpresetlist.h:28,
from player/playerpresetlist.cpp:25:
/usr/include/c++/11/chrono:976:7: note: ‘std::chrono::ceil’
976 | ceil(const time_point<_Clock, _Dur>& __tp)
| ^~~~
/usr/include/c++/11/chrono:360:7: note: ‘std::chrono::ceil’
360 | ceil(const duration<_Rep, _Period>& __d)
| ^~~~
make: *** [Makefile:9120: playerpresetlist.o] Error 1
I just commited 2b03ac9 that should fix this problem. Could you please try again?
I compiled the master branch on Fedora and everything went fine on my side.
I am trying to build polyphone 2.4.0 on Fedora 40 and I met the following error message: