QT <5.14 not supported by latest dev branch #141

Closed
opened 3 months ago by duke · 3 comments
duke commented 3 months ago
Owner

I tried to compile on a machine which had qt 5.12.0 . The compile gets pretty far but then gets compilation errors:

/usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qwizard.h:194:18: note: hidden overloaded virtual function 'QWizard::initializePage' declared here: different number of parameters (1 vs 0)
    virtual void initializePage(int id);
                 ^
src/connection.cpp:119:20: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>'
        isSyncing->storeRelaxed(false);
        ~~~~~~~~~  ^
src/connection.cpp:127:39: error: no member named 'loadRelaxed' in 'QAtomicInteger<bool>'
        if (!isSyncing || !isSyncing->loadRelaxed()) {
                           ~~~~~~~~~  ^
src/connection.cpp:221:65: error: no member named 'endl' in namespace 'Qt'; did you mean simply 'endl'?
             << " connection=" << connection << " me=" << me << Qt::endl;
                                                                ^~~~~~~~
                                                                endl
/usr/local/Cellar/qt/5.12.0/lib/QtCore.framework/Headers/qtextstream.h:260:28: note: 'endl' declared here
Q_CORE_EXPORT QTextStream &endl(QTextStream &s);
                           ^
src/connection.cpp:229:20: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>'
        isSyncing->storeRelaxed(true);
        ~~~~~~~~~  ^
src/connection.cpp:237:24: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>'
            isSyncing->storeRelaxed(false);
            ~~~~~~~~~  ^
src/connection.cpp:248:32: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>'
                    isSyncing->storeRelaxed(false);
                    ~~~~~~~~~  ^
src/connection.cpp:262:52: error: no member named 'loadRelaxed' in 'QAtomicInteger<bool>'
            if (isSyncing != nullptr && isSyncing->loadRelaxed()) {
                                        ~~~~~~~~~  ^
1 warning and 7 errors generated.
make: *** [bin/connection.o] Error 1

I don't think we should try to support QT 5.12.0 but I do think we should detect what version of QT is available very early in the compile and if it's not new enough, to give a useful message instead of the current behavior.

I tried to compile on a machine which had qt 5.12.0 . The compile gets pretty far but then gets compilation errors: ``` /usr/local/Cellar/qt/5.12.0/lib/QtWidgets.framework/Headers/qwizard.h:194:18: note: hidden overloaded virtual function 'QWizard::initializePage' declared here: different number of parameters (1 vs 0) virtual void initializePage(int id); ^ src/connection.cpp:119:20: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>' isSyncing->storeRelaxed(false); ~~~~~~~~~ ^ src/connection.cpp:127:39: error: no member named 'loadRelaxed' in 'QAtomicInteger<bool>' if (!isSyncing || !isSyncing->loadRelaxed()) { ~~~~~~~~~ ^ src/connection.cpp:221:65: error: no member named 'endl' in namespace 'Qt'; did you mean simply 'endl'? << " connection=" << connection << " me=" << me << Qt::endl; ^~~~~~~~ endl /usr/local/Cellar/qt/5.12.0/lib/QtCore.framework/Headers/qtextstream.h:260:28: note: 'endl' declared here Q_CORE_EXPORT QTextStream &endl(QTextStream &s); ^ src/connection.cpp:229:20: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>' isSyncing->storeRelaxed(true); ~~~~~~~~~ ^ src/connection.cpp:237:24: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>' isSyncing->storeRelaxed(false); ~~~~~~~~~ ^ src/connection.cpp:248:32: error: no member named 'storeRelaxed' in 'QAtomicInteger<bool>' isSyncing->storeRelaxed(false); ~~~~~~~~~ ^ src/connection.cpp:262:52: error: no member named 'loadRelaxed' in 'QAtomicInteger<bool>' if (isSyncing != nullptr && isSyncing->loadRelaxed()) { ~~~~~~~~~ ^ 1 warning and 7 errors generated. make: *** [bin/connection.o] Error 1 ``` I don't think we should try to support QT 5.12.0 but I do think we should detect what version of QT is available very early in the compile and if it's not new enough, to give a useful message instead of the current behavior.
duke added the
bug
label 3 months ago
lucretius was assigned by duke 3 months ago
Poster
Owner

Seems that this does not compile on QT 5.12.8 either, which is what I have used to compile SDL for many years.

According to
https://doc.qt.io/qt-5/qatomicinteger.html#storeRelaxed it was added in QT 5.14 .

@lucretius are you able to easily change the code to not use these new functions?

Another question I think we need to address is: what is the minumum version of QT that we want to support? We never really officially decided this but it seems that unofficially it was QT 5.12 and this new code changed that.

Seems that this does not compile on QT 5.12.8 either, which is what I have used to compile SDL for many years. According to https://doc.qt.io/qt-5/qatomicinteger.html#storeRelaxed it was added in QT 5.14 . @lucretius are you able to easily change the code to not use these new functions? Another question I think we need to address is: what is the minumum version of QT that we want to support? We never really officially decided this but it seems that unofficially it was QT 5.12 and this new code changed that.
duke changed title from QT 5.12.0 not supported to QT <5.14 not supported by latest dev branch 3 months ago
Collaborator

I have restored the compatibility for qt 5.12.0 in this PR: #142

I have restored the compatibility for qt 5.12.0 in this PR: https://git.hush.is/hush/SilentDragonLite/pulls/142
Poster
Owner

thanks @lucretius

thanks @lucretius
duke closed this issue 3 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.