error: no viable overloaded operator[] #70

Closed
opened 3 years ago by oDinZu · 20 comments
oDinZu commented 3 years ago

Compiling SD on Ubuntu 18.04 resulted in the following error.

In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
In file included from src/peerstablemodel.cpp:5:
In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
In file included from src/rpc.cpp:3:
In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
In file included from src/main.cpp:6:
In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
src/rpc.cpp:278:45: error: no viable overloaded operator[] for type
      'const QJsonValue'
        if (!parsed.isUndefined() && !parsed["error"].toObject()["messag...
                                      ~~~~~~^~~~~~~~
src/rpc.cpp:279:23: error: no viable overloaded operator[] for type
      'const QJsonValue'
            err(parsed["error"].toObject()["message"].toString());
                ~~~~~~^~~~~~~~
In file included from src/senttxstore.cpp:3:
In file included from src/senttxstore.h:8:
In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
src/rpc.cpp:537:73: error: no viable overloaded operator[] for type 'QJsonValue'
  ...auto confirmations = (unsigned long)txidInfo["confirmations"].toInt();
                                         ~~~~~~~~^~~~~~~~~~~~~~~~
src/rpc.cpp:576:19: error: no viable overloaded operator[] for type
      'const QJsonValue'
        if (!reply["testnet"].isNull()) {
             ~~~~~^~~~~~~~~~
src/rpc.cpp:577:54: error: no viable overloaded operator[] for type
      'const QJsonValue'
            Settings::getInstance()->setTestnet(reply["testnet"].toBool());
                                                ~~~~~^~~~~~~~~~
src/rpc.cpp:586:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int curBlock            = reply["blocks"].toInt();
                                  ~~~~~^~~~~~~~~
src/rpc.cpp:587:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int longestchain        = reply["longestchain"].toInt();
                                  ~~~~~^~~~~~~~~~~~~~~
src/rpc.cpp:588:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int version             = reply["version"].toInt();
                                  ~~~~~^~~~~~~~~~
src/rpc.cpp:589:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int p2pport             = reply["p2pport"].toInt();
                                  ~~~~~^~~~~~~~~~
src/rpc.cpp:590:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int rpcport             = reply["rpcport"].toInt();
                                  ~~~~~^~~~~~~~~~
src/rpc.cpp:591:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int notarized           = reply["notarized"].toInt();
                                  ~~~~~^~~~~~~~~~~~
src/rpc.cpp:592:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int protocolversion     = reply["protocolversion"].toInt();
                                  ~~~~~^~~~~~~~~~~~~~~~~~
src/rpc.cpp:599:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        QString ntzhash         = reply["notarizedhash"].toString();
                                  ~~~~~^~~~~~~~~~~~~~~~
src/rpc.cpp:600:40: error: no viable overloaded operator[] for type
      'const QJsonValue'
        QString ntztxid         = reply["notarizedtxid"].toString();
                                  ~~~~~^~~~~~~~~~~~~~~~
src/rpc.cpp:624:35: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int  connections   = reply["connections"].toInt();
                             ~~~~~^~~~~~~~~~~~~~
src/rpc.cpp:625:36: error: no viable overloaded operator[] for type
      'const QJsonValue'
        bool hasTLS        = !reply["tls_connections"].isNull();
                              ~~~~~^~~~~~~~~~~~~~~~~~
src/rpc.cpp:627:44: error: no viable overloaded operator[] for type
      'const QJsonValue'
        int tlsconnections = hasTLS ? reply["tls_connections"].toInt() : 0;
                                      ~~~~~^~~~~~~~~~~~~~~~~~
src/rpc.cpp:650:42: error: no viable overloaded operator[] for type
      'const QJsonValue'
            QString clientname    = reply["subversion"].toString();
                                    ~~~~~^~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from src/sendtab.cpp:10:
In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
20 errors generated.
Makefile:2215: recipe for target 'bin/rpc.o' failed
make: *** [bin/rpc.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/txtablemodel.cpp:5:
In file included from src/rpc.h:13:
src/connection.h:158:52: error: no viable overloaded operator[] for type
      'QJsonDocument'
                        (*responses)[item] = parsed["result"];
                                             ~~~~~~^~~~~~~~~
1 error generated.
Makefile:2707: recipe for target 'bin/peerstablemodel.o' failed
make: *** [bin/peerstablemodel.o] Error 1
1 error generated.
Makefile:2029: recipe for target 'bin/main.o' failed
make: *** [bin/main.o] Error 1
1 error generated.
Makefile:2543: recipe for target 'bin/senttxstore.o' failed
make: *** [bin/senttxstore.o] Error 1
1 error generated.
Makefile:2625: recipe for target 'bin/txtablemodel.o' failed
make: *** [bin/txtablemodel.o] Error 1
1 error generated.
Makefile:2460: recipe for target 'bin/sendtab.o' failed
make: *** [bin/sendtab.o] Error 1
1 error generated.
Makefile:2128: recipe for target 'bin/mainwindow.o' failed
make: *** [bin/mainwindow.o] Error 1

Compiling SD on Ubuntu 18.04 resulted in the following error. ``` In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ In file included from src/peerstablemodel.cpp:5: In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ In file included from src/rpc.cpp:3: In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ In file included from src/main.cpp:6: In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ src/rpc.cpp:278:45: error: no viable overloaded operator[] for type 'const QJsonValue' if (!parsed.isUndefined() && !parsed["error"].toObject()["messag... ~~~~~~^~~~~~~~ src/rpc.cpp:279:23: error: no viable overloaded operator[] for type 'const QJsonValue' err(parsed["error"].toObject()["message"].toString()); ~~~~~~^~~~~~~~ In file included from src/senttxstore.cpp:3: In file included from src/senttxstore.h:8: In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ src/rpc.cpp:537:73: error: no viable overloaded operator[] for type 'QJsonValue' ...auto confirmations = (unsigned long)txidInfo["confirmations"].toInt(); ~~~~~~~~^~~~~~~~~~~~~~~~ src/rpc.cpp:576:19: error: no viable overloaded operator[] for type 'const QJsonValue' if (!reply["testnet"].isNull()) { ~~~~~^~~~~~~~~~ src/rpc.cpp:577:54: error: no viable overloaded operator[] for type 'const QJsonValue' Settings::getInstance()->setTestnet(reply["testnet"].toBool()); ~~~~~^~~~~~~~~~ src/rpc.cpp:586:40: error: no viable overloaded operator[] for type 'const QJsonValue' int curBlock = reply["blocks"].toInt(); ~~~~~^~~~~~~~~ src/rpc.cpp:587:40: error: no viable overloaded operator[] for type 'const QJsonValue' int longestchain = reply["longestchain"].toInt(); ~~~~~^~~~~~~~~~~~~~~ src/rpc.cpp:588:40: error: no viable overloaded operator[] for type 'const QJsonValue' int version = reply["version"].toInt(); ~~~~~^~~~~~~~~~ src/rpc.cpp:589:40: error: no viable overloaded operator[] for type 'const QJsonValue' int p2pport = reply["p2pport"].toInt(); ~~~~~^~~~~~~~~~ src/rpc.cpp:590:40: error: no viable overloaded operator[] for type 'const QJsonValue' int rpcport = reply["rpcport"].toInt(); ~~~~~^~~~~~~~~~ src/rpc.cpp:591:40: error: no viable overloaded operator[] for type 'const QJsonValue' int notarized = reply["notarized"].toInt(); ~~~~~^~~~~~~~~~~~ src/rpc.cpp:592:40: error: no viable overloaded operator[] for type 'const QJsonValue' int protocolversion = reply["protocolversion"].toInt(); ~~~~~^~~~~~~~~~~~~~~~~~ src/rpc.cpp:599:40: error: no viable overloaded operator[] for type 'const QJsonValue' QString ntzhash = reply["notarizedhash"].toString(); ~~~~~^~~~~~~~~~~~~~~~ src/rpc.cpp:600:40: error: no viable overloaded operator[] for type 'const QJsonValue' QString ntztxid = reply["notarizedtxid"].toString(); ~~~~~^~~~~~~~~~~~~~~~ src/rpc.cpp:624:35: error: no viable overloaded operator[] for type 'const QJsonValue' int connections = reply["connections"].toInt(); ~~~~~^~~~~~~~~~~~~~ src/rpc.cpp:625:36: error: no viable overloaded operator[] for type 'const QJsonValue' bool hasTLS = !reply["tls_connections"].isNull(); ~~~~~^~~~~~~~~~~~~~~~~~ src/rpc.cpp:627:44: error: no viable overloaded operator[] for type 'const QJsonValue' int tlsconnections = hasTLS ? reply["tls_connections"].toInt() : 0; ~~~~~^~~~~~~~~~~~~~~~~~ src/rpc.cpp:650:42: error: no viable overloaded operator[] for type 'const QJsonValue' QString clientname = reply["subversion"].toString(); ~~~~~^~~~~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] In file included from src/sendtab.cpp:10: In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ 20 errors generated. Makefile:2215: recipe for target 'bin/rpc.o' failed make: *** [bin/rpc.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from src/txtablemodel.cpp:5: In file included from src/rpc.h:13: src/connection.h:158:52: error: no viable overloaded operator[] for type 'QJsonDocument' (*responses)[item] = parsed["result"]; ~~~~~~^~~~~~~~~ 1 error generated. Makefile:2707: recipe for target 'bin/peerstablemodel.o' failed make: *** [bin/peerstablemodel.o] Error 1 1 error generated. Makefile:2029: recipe for target 'bin/main.o' failed make: *** [bin/main.o] Error 1 1 error generated. Makefile:2543: recipe for target 'bin/senttxstore.o' failed make: *** [bin/senttxstore.o] Error 1 1 error generated. Makefile:2625: recipe for target 'bin/txtablemodel.o' failed make: *** [bin/txtablemodel.o] Error 1 1 error generated. Makefile:2460: recipe for target 'bin/sendtab.o' failed make: *** [bin/sendtab.o] Error 1 1 error generated. Makefile:2128: recipe for target 'bin/mainwindow.o' failed make: *** [bin/mainwindow.o] Error 1 ```
Owner

@odinzu are you able to compile on any system? I think that sometimes Ubuntu changes the names or splits dependencies into multiple new dependencies. This seems like not the full QT5 dependency list has been installed.

@odinzu are you able to compile on any system? I think that sometimes Ubuntu changes the names or splits dependencies into multiple new dependencies. This seems like not the full QT5 dependency list has been installed.
Poster
Linux Horizon 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Yeah, it compiled and launched without any errors on Ubuntu 20.04 following the README.md.

``` Linux Horizon 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux ``` Yeah, it compiled and launched without any errors on Ubuntu 20.04 following the README.md.
Owner

@oDinZu hmm, this sounds like maybe Ubuntu 18.04 needs another dependency installed

@oDinZu hmm, this sounds like maybe Ubuntu 18.04 needs another dependency installed
Owner
Related https://www.reddit.com/r/Myhush/comments/llfbzx/can_not_build_silentdragon_wallet/
Owner

@odinzu I just tested on an Ubuntu 18.04.3 system and it compiled fine. Perhaps I installed the necessary dependency in the past on this system

@odinzu I just tested on an Ubuntu 18.04.3 system and it compiled fine. Perhaps I installed the necessary dependency in the past on this system
Poster

That is good news; I wonder what that dep it is? It has to be JSON related with QT5.

That is good news; I wonder what that dep it is? It has to be JSON related with QT5.
Owner

QJsonDocument is part of QT5 core: https://doc.qt.io/qt-5/qjsondocument.html

But not part of QT4, so you may need to use qtchooser or uninstall qt4 to make things work @odinzu

QJsonDocument is part of QT5 core: https://doc.qt.io/qt-5/qjsondocument.html But not part of QT4, so you may need to use `qtchooser` or uninstall qt4 to make things work @odinzu
Owner

So it sounds like this bug effects people that maybe upgraded old systems from qt4 or installed qt4 before qt5, then qt4 is the default QT that is used. Something like that

So it sounds like this bug effects people that maybe upgraded old systems from qt4 or installed qt4 before qt5, then qt4 is the default QT that is used. Something like that
Poster

On Ubuntu 18.04

qtcreator -version

Qt Creator 4.5.2 based on Qt 5.9.5

qmake --version

QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu

qtchooser -print-env

QT_SELECT="default"
QTTOOLDIR="/usr/lib/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

On Ubuntu 20.04

qtcreator -version

Qt Creator 4.11.0 based on Qt 5.12.8
qmake --version
QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu
On Ubuntu 18.04 qtcreator -version ``` Qt Creator 4.5.2 based on Qt 5.9.5 ``` qmake --version ``` QMake version 3.1 Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu ``` qtchooser -print-env ``` QT_SELECT="default" QTTOOLDIR="/usr/lib/qt5/bin" QTLIBDIR="/usr/lib/x86_64-linux-gnu" ``` On Ubuntu 20.04 ``` qtcreator -version Qt Creator 4.11.0 based on Qt 5.12.8 ``` ``` qmake --version QMake version 3.1 Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu ```
Poster

@odinzu I just tested on an Ubuntu 18.04.3 system and it compiled fine. Perhaps I installed the necessary dependency in the past on this system

What is your qmake --version? It shows I am using Qt5.

> @odinzu I just tested on an Ubuntu 18.04.3 system and it compiled fine. Perhaps I installed the necessary dependency in the past on this system What is your qmake --version? It shows I am using Qt5.
Owner

@oDinZu

$ qmake -v
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu

$ qtcreator --version
qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.

$ apt show qtcreator
Package: qtcreator
Version: 4.5.2-3ubuntu2
Priority: optional
Section: universe/devel
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 56.3 MB
Depends: libqt5sql5-sqlite, qml-module-qtqml-models2, qml-module-qtquick-controls (>= 5.5.0~), qml-module-qtquick2 (>= 5.5.0~), qtchooser, qtcreator-data (= 4.5.2-3ubuntu2), libbotan-2-4, libc6 (>= 2.14), libclang1-6.0 (>= 1:5.0~+rc1~), libgcc1 (>= 1:3.0), libqbscore1.10 (>= 1.10.0), libqbsqtprofilesetup1.10 (>= 1.2.1), libqt5concurrent5 (>= 5.6.2~), libqt5core5a (>= 5.9.0~beta), libqt5designer5 (>= 5.6.2~), libqt5designercomponents5 (>= 5.6.2~), libqt5gui5 (>= 5.8.0), libqt5help5 (>= 5.6.2~), libqt5network5 (>= 5.6.2~), libqt5printsupport5 (>= 5.6.2~), libqt5qml5 (>= 5.1.0), libqt5quick5 (>= 5.9.0~beta), libqt5quickwidgets5 (>= 5.9.0~beta), libqt5sql5 (>= 5.6.2~), libqt5widgets5 (>= 5.7.0), libqt5xml5 (>= 5.6.2~), libstdc++6 (>= 7), qtdeclarative-abi-5-9-5
Recommends: clang, gdb, make, qmlscene, qt5-doc, qt5-qmltooling-plugins, qtbase5-dev-tools, qtcreator-doc, qtdeclarative5-dev-tools, qttools5-dev-tools, qttranslations5-l10n, qtxmlpatterns5-dev-tools, xterm | x-terminal-emulator
Suggests: cmake, g++, git, kate-data, subversion
Breaks: qtcreator-data (<< 4.5.2-2~)
Replaces: qtcreator-data (<< 4.5.2-2~)

Plz add the output of your apt show qtcreator, maybe we can find a difference. The machine I use is Ubuntu 18.04.3 server, with no GUI. Maybe that is related?

@oDinZu ``` $ qmake -v QMake version 3.1 Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu $ qtcreator --version qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display. $ apt show qtcreator Package: qtcreator Version: 4.5.2-3ubuntu2 Priority: optional Section: universe/devel Origin: Ubuntu Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 56.3 MB Depends: libqt5sql5-sqlite, qml-module-qtqml-models2, qml-module-qtquick-controls (>= 5.5.0~), qml-module-qtquick2 (>= 5.5.0~), qtchooser, qtcreator-data (= 4.5.2-3ubuntu2), libbotan-2-4, libc6 (>= 2.14), libclang1-6.0 (>= 1:5.0~+rc1~), libgcc1 (>= 1:3.0), libqbscore1.10 (>= 1.10.0), libqbsqtprofilesetup1.10 (>= 1.2.1), libqt5concurrent5 (>= 5.6.2~), libqt5core5a (>= 5.9.0~beta), libqt5designer5 (>= 5.6.2~), libqt5designercomponents5 (>= 5.6.2~), libqt5gui5 (>= 5.8.0), libqt5help5 (>= 5.6.2~), libqt5network5 (>= 5.6.2~), libqt5printsupport5 (>= 5.6.2~), libqt5qml5 (>= 5.1.0), libqt5quick5 (>= 5.9.0~beta), libqt5quickwidgets5 (>= 5.9.0~beta), libqt5sql5 (>= 5.6.2~), libqt5widgets5 (>= 5.7.0), libqt5xml5 (>= 5.6.2~), libstdc++6 (>= 7), qtdeclarative-abi-5-9-5 Recommends: clang, gdb, make, qmlscene, qt5-doc, qt5-qmltooling-plugins, qtbase5-dev-tools, qtcreator-doc, qtdeclarative5-dev-tools, qttools5-dev-tools, qttranslations5-l10n, qtxmlpatterns5-dev-tools, xterm | x-terminal-emulator Suggests: cmake, g++, git, kate-data, subversion Breaks: qtcreator-data (<< 4.5.2-2~) Replaces: qtcreator-data (<< 4.5.2-2~) ``` Plz add the output of your `apt show qtcreator`, maybe we can find a difference. The machine I use is Ubuntu 18.04.3 server, with no GUI. Maybe that is related?
Poster

After uninstalling and purging Qt, the same error is created. The exact same versions were reinstalled.

After uninstalling and purging Qt, the same error is created. The exact same versions were reinstalled.
Poster

apt show qtcreator

Package: qtcreator
Version: 4.5.2-3ubuntu2
Priority: optional
Section: universe/devel
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 56.3 MB
Depends: libqt5sql5-sqlite, qml-module-qtqml-models2, qml-module-qtquick-controls (>= 5.5.0~), qml-module-qtquick2 (>= 5.5.0~), qtchooser, qtcreator-data (= 4.5.2-3ubuntu2), libbotan-2-4, libc6 (>= 2.14), libclang1-6.0 (>= 1:5.0~+rc1~), libgcc1 (>= 1:3.0), libqbscore1.10 (>= 1.10.0), libqbsqtprofilesetup1.10 (>= 1.2.1), libqt5concurrent5 (>= 5.6.2~), libqt5core5a (>= 5.9.0~beta), libqt5designer5 (>= 5.6.2~), libqt5designercomponents5 (>= 5.6.2~), libqt5gui5 (>= 5.8.0), libqt5help5 (>= 5.6.2~), libqt5network5 (>= 5.6.2~), libqt5printsupport5 (>= 5.6.2~), libqt5qml5 (>= 5.1.0), libqt5quick5 (>= 5.9.0~beta), libqt5quickwidgets5 (>= 5.9.0~beta), libqt5sql5 (>= 5.6.2~), libqt5widgets5 (>= 5.7.0), libqt5xml5 (>= 5.6.2~), libstdc++6 (>= 7), qtdeclarative-abi-5-9-5
Recommends: clang, gdb, make, qmlscene, qt5-doc, qt5-qmltooling-plugins, qtbase5-dev-tools, qtcreator-doc, qtdeclarative5-dev-tools, qttools5-dev-tools, qttranslations5-l10n, qtxmlpatterns5-dev-tools, xterm | x-terminal-emulator
Suggests: cmake, g++, git, kate-data, subversion
Breaks: qtcreator-data (<< 4.5.2-2~)
Replaces: qtcreator-data (<< 4.5.2-2~)
Homepage: https://doc.qt.io/qt-5/topics-app-development.html
Download-Size: 14.0 MB
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Description: integrated development environment (IDE) for Qt
 Qt Creator is a cross-platform integrated development environment (IDE)
 designed to make development with the Qt application framework faster
 and easier.
 .
 It includes:
  * An advanced C++ code editor
  * Integrated GUI layout and forms designer
  * Project and build management tools
  * Integrated, context-sensitive help system
  * Visual debugger
  * Rapid code navigation tools
  * Supports multiple platforms
  * Qt Quick Designer
apt show qtcreator ``` Package: qtcreator Version: 4.5.2-3ubuntu2 Priority: optional Section: universe/devel Origin: Ubuntu Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 56.3 MB Depends: libqt5sql5-sqlite, qml-module-qtqml-models2, qml-module-qtquick-controls (>= 5.5.0~), qml-module-qtquick2 (>= 5.5.0~), qtchooser, qtcreator-data (= 4.5.2-3ubuntu2), libbotan-2-4, libc6 (>= 2.14), libclang1-6.0 (>= 1:5.0~+rc1~), libgcc1 (>= 1:3.0), libqbscore1.10 (>= 1.10.0), libqbsqtprofilesetup1.10 (>= 1.2.1), libqt5concurrent5 (>= 5.6.2~), libqt5core5a (>= 5.9.0~beta), libqt5designer5 (>= 5.6.2~), libqt5designercomponents5 (>= 5.6.2~), libqt5gui5 (>= 5.8.0), libqt5help5 (>= 5.6.2~), libqt5network5 (>= 5.6.2~), libqt5printsupport5 (>= 5.6.2~), libqt5qml5 (>= 5.1.0), libqt5quick5 (>= 5.9.0~beta), libqt5quickwidgets5 (>= 5.9.0~beta), libqt5sql5 (>= 5.6.2~), libqt5widgets5 (>= 5.7.0), libqt5xml5 (>= 5.6.2~), libstdc++6 (>= 7), qtdeclarative-abi-5-9-5 Recommends: clang, gdb, make, qmlscene, qt5-doc, qt5-qmltooling-plugins, qtbase5-dev-tools, qtcreator-doc, qtdeclarative5-dev-tools, qttools5-dev-tools, qttranslations5-l10n, qtxmlpatterns5-dev-tools, xterm | x-terminal-emulator Suggests: cmake, g++, git, kate-data, subversion Breaks: qtcreator-data (<< 4.5.2-2~) Replaces: qtcreator-data (<< 4.5.2-2~) Homepage: https://doc.qt.io/qt-5/topics-app-development.html Download-Size: 14.0 MB APT-Manual-Installed: yes APT-Sources: http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages Description: integrated development environment (IDE) for Qt Qt Creator is a cross-platform integrated development environment (IDE) designed to make development with the Qt application framework faster and easier. . It includes: * An advanced C++ code editor * Integrated GUI layout and forms designer * Project and build management tools * Integrated, context-sensitive help system * Visual debugger * Rapid code navigation tools * Supports multiple platforms * Qt Quick Designer ```
Owner

@odinzu plz DM me the full output of your build.sh on Telegram and maybe I can see a clue. This is a weird bug.

@odinzu plz DM me the full output of your build.sh on Telegram and maybe I can see a clue. This is a weird bug.
Poster

It is okay, it is all contained in a qemu vm awesome sauce. This is the fresh build.sh output.

It is okay, it is all contained in a qemu vm awesome sauce. This is the fresh build.sh output.
Owner

@odinzu ls -la /usr/include/x86_64-linux-gnu/qt5/QtCore/qjsondocument.h

Does that file exist?

@odinzu `ls -la /usr/include/x86_64-linux-gnu/qt5/QtCore/qjsondocument.h` Does that file exist?
Poster

Yes.

QtCore/qjsonobject.h:    friend class QJsonDocument;
QtCore/qjsonarray.h:    friend class QJsonDocument;
QtCore/qmetatype.h:    F(QJsonDocument, 48, QJsonDocument) \
QtCore/qmetatype.h:        QJsonValue = 45, QJsonObject = 46, QJsonArray = 47, QJsonDocument = 48,
QtCore/qjsondocument.h:class Q_CORE_EXPORT QJsonDocument
QtCore/qjsondocument.h:    QJsonDocument();
QtCore/qjsondocument.h:    explicit QJsonDocument(const QJsonObject &object);
QtCore/qjsondocument.h:    explicit QJsonDocument(const QJsonArray &array);
QtCore/qjsondocument.h:    ~QJsonDocument();
QtCore/qjsondocument.h:    QJsonDocument(const QJsonDocument &other);
QtCore/qjsondocument.h:    QJsonDocument &operator =(const QJsonDocument &other);
QtCore/qjsondocument.h:    static QJsonDocument fromRawData(const char *data, int size, DataValidation validation = Validate);
QtCore/qjsondocument.h:    static QJsonDocument fromBinaryData(const QByteArray &data, DataValidation validation  = Validate);
QtCore/qjsondocument.h:    static QJsonDocument fromVariant(const QVariant &variant);
QtCore/qjsondocument.h:    static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = Q_NULLPTR);
QtCore/qjsondocument.h:    bool operator==(const QJsonDocument &other) const;
QtCore/qjsondocument.h:    bool operator!=(const QJsonDocument &other) const { return !(*this == other); }
QtCore/qjsondocument.h:    friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);
QtCore/qjsondocument.h:    QJsonDocument(QJsonPrivate::Data *data);
QtCore/qjsondocument.h:Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);
QtCore/qvariant.h:    QVariant(const QJsonDocument &jsonDocument);
QtCore/qvariant.h:    QJsonDocument toJsonDocument() const;
Yes. ``` QtCore/qjsonobject.h: friend class QJsonDocument; QtCore/qjsonarray.h: friend class QJsonDocument; QtCore/qmetatype.h: F(QJsonDocument, 48, QJsonDocument) \ QtCore/qmetatype.h: QJsonValue = 45, QJsonObject = 46, QJsonArray = 47, QJsonDocument = 48, QtCore/qjsondocument.h:class Q_CORE_EXPORT QJsonDocument QtCore/qjsondocument.h: QJsonDocument(); QtCore/qjsondocument.h: explicit QJsonDocument(const QJsonObject &object); QtCore/qjsondocument.h: explicit QJsonDocument(const QJsonArray &array); QtCore/qjsondocument.h: ~QJsonDocument(); QtCore/qjsondocument.h: QJsonDocument(const QJsonDocument &other); QtCore/qjsondocument.h: QJsonDocument &operator =(const QJsonDocument &other); QtCore/qjsondocument.h: static QJsonDocument fromRawData(const char *data, int size, DataValidation validation = Validate); QtCore/qjsondocument.h: static QJsonDocument fromBinaryData(const QByteArray &data, DataValidation validation = Validate); QtCore/qjsondocument.h: static QJsonDocument fromVariant(const QVariant &variant); QtCore/qjsondocument.h: static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = Q_NULLPTR); QtCore/qjsondocument.h: bool operator==(const QJsonDocument &other) const; QtCore/qjsondocument.h: bool operator!=(const QJsonDocument &other) const { return !(*this == other); } QtCore/qjsondocument.h: friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &); QtCore/qjsondocument.h: QJsonDocument(QJsonPrivate::Data *data); QtCore/qjsondocument.h:Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &); QtCore/qvariant.h: QVariant(const QJsonDocument &jsonDocument); QtCore/qvariant.h: QJsonDocument toJsonDocument() const; ```
Poster

These are the only deps I installed to compile qt5.15.2 from scratch. I don't see anything to do with JSON though.

Qt Dependencies

sudo apt install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libgles2-mesa-dev libgbm-dev libdrm-dev

====

These are the options I used that allowed me to build the SD 1.2.0 bins successfully on Ubuntu 18.04.01. Most of these options are for speeding up compiliation.

Qt 5.15.2 Configure

../qt-everywhere-src-5.15.2/configure -v -opengl es2 -eglfs -opensource -confirm-license -release -ssl -glib -no-feature-geoservices_mapboxgl -qt-pcre -nomake examples -no-compile-examples -nomake tests -reduce-exports -system-freetype -fontconfig -qpa eglfs

These are the only deps I installed to compile qt5.15.2 from scratch. I don't see anything to do with JSON though. ## Qt Dependencies sudo apt install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libgles2-mesa-dev libgbm-dev libdrm-dev ==== These are the options I used that allowed me to build the SD 1.2.0 bins successfully on Ubuntu 18.04.01. Most of these options are for speeding up compiliation. ## Qt 5.15.2 Configure ../qt-everywhere-src-5.15.2/configure -v -opengl es2 -eglfs -opensource -confirm-license -release -ssl -glib -no-feature-geoservices_mapboxgl -qt-pcre -nomake examples -no-compile-examples -nomake tests -reduce-exports -system-freetype -fontconfig -qpa eglfs
Poster

Just for reference. I was able to compile / build / launch SD 1.3.0 on Ubuntu 18.04 when I compiled my own QT 5.15.2. If someone wants SD on 18.04, this is the only solution I have discovered that works.

It seems to be an Ubuntu 18.04 "ppa:repository" for old QT5 version. The default QT5 is 5.9 for 18.04 if I remember correctly.

Me and @duke did extensive testing to see if it was a compiler issue and various other things..but had no luck. Somehow @duke could compile SD on QT 5.9 with Ubuntu 18.04 Server..

Solution: https://git.hush.is/hush/docs/src/branch/master/advanced/compile-qt5-from-source.md

Just for reference. I was able to compile / build / launch SD 1.3.0 on Ubuntu 18.04 when I compiled my own **QT 5.15.2**. If someone wants SD on 18.04, this is the only solution I have discovered that works. It seems to be an Ubuntu 18.04 "ppa:repository" for old QT5 version. The default QT5 is 5.9 for 18.04 if I remember correctly. Me and @duke did extensive testing to see if it was a compiler issue and various other things..but had no luck. Somehow @duke could compile SD on QT 5.9 with Ubuntu 18.04 Server.. Solution: https://git.hush.is/hush/docs/src/branch/master/advanced/compile-qt5-from-source.md
duke commented 1 year ago
Owner

I think the resolution of this issue is that QT 5.9 is not supported (some systems likely have custom patches to 5.9 which is potentially why it sometimes worked), our code is only known to work well with at least 5.12 and 5.15.x or higher is recommended. Closing

I think the resolution of this issue is that QT 5.9 is not supported (some systems likely have custom patches to 5.9 which is potentially why it sometimes worked), our code is only known to work well with at least 5.12 and 5.15.x or higher is recommended. Closing
duke closed this issue 1 year 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.