Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue compiling on Ubuntu #61

Closed
Ahmad138 opened this issue Apr 18, 2020 · 1 comment
Closed

Issue compiling on Ubuntu #61

Ahmad138 opened this issue Apr 18, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Ahmad138
Copy link
Owner

Describe the bug
after cloning, i tried compiling using qmake but it kept failing.

To Reproduce
Steps to reproduce the behavior:

  1. clone the repo and cd into the Software/SatRot-GUI
  2. mkdir build && cd build
  3. qmake ..
  4. make

Expected behavior


/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h:654:5: note: because ‘QStyleOptionSizeGrip’ has user-provided ‘QStyleOptionSizeGrip::QStyleOptionSizeGrip(const QStyleOptionSizeGrip&)’
  654 |     QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
      |     ^~~~~~~~~~~~~~~~~~~~
/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h: In member function ‘QStyleOptionSizeGrip& QStyleOptionSizeGrip::operator=(const QStyleOptionSizeGrip&)’:
/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h:645:24: warning: implicitly-declared ‘QStyleOptionComplex& QStyleOptionComplex::operator=(const QStyleOptionComplex&)’ is deprecated [-Wdeprecated-copy]
  645 | class Q_WIDGETS_EXPORT QStyleOptionSizeGrip : public QStyleOptionComplex
      |                        ^~~~~~~~~~~~~~~~~~~~
/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h:510:5: note: because ‘QStyleOptionComplex’ has user-provided ‘QStyleOptionComplex::QStyleOptionComplex(const QStyleOptionComplex&)’
  510 |     QStyleOptionComplex(const QStyleOptionComplex &other) : QStyleOption(Version, Type) { *this = other; }
      |     ^~~~~~~~~~~~~~~~~~~
/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h: In copy constructor ‘QStyleOptionSizeGrip::QStyleOptionSizeGrip(const QStyleOptionSizeGrip&)’:
/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h:654:108: note: synthesized method ‘QStyleOptionSizeGrip& QStyleOptionSizeGrip::operator=(const QStyleOptionSizeGrip&)’ first required here
  654 | eOptionSizeGrip &other) : QStyleOptionComplex(Version, Type) { *this = other; }
      |                                                                        ^~~~~

/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h: In copy constructor ‘QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem&)’:
/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h:670:109: warning: implicitly-declared ‘QStyleOptionGraphicsItem& QStyleOptionGraphicsItem::operator=(const QStyleOptionGraphicsItem&)’ is deprecated [-Wdeprecated-copy]
  670 | tyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
      |                                                                        ^~~~~

/home/ahmad/anaconda3/include/qt/QtWidgets/qstyleoption.h:670:5: note: because ‘QStyleOptionGraphicsItem’ has user-provided ‘QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem&)’
  670 |     QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
../src/mainwindow.cpp: In lambda function:
../src/mainwindow.cpp:157:39: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [5]’)
  157 |         QString r = o.value("company")["name"].toString();
      |                                       ^
../src/mainwindow.cpp: In lambda function:
../src/mainwindow.cpp:164:39: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [5]’)
  164 |         QString r = o.value("company")["name"].toString();
      |                                       ^
../src/mainwindow.cpp: In lambda function:
../src/mainwindow.cpp:413:52: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [6]’)
  413 |         QString a = QString::number(o.value("info")["satid"].toInt());
      |                                                    ^
../src/mainwindow.cpp:414:36: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [8]’)
  414 |         QString b = o.value("info")["satname"].toString();
      |                                    ^
../src/mainwindow.cpp:416:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  416 |         QString c = QString::number(o.value("positions")[0]["satlatitude"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:417:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  417 |         QString d = QString::number(o.value("positions")[0]["satlongitude"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:418:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  418 |         QString e = QString::number(o.value("positions")[0]["sataltitude"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:419:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  419 |         QString f = QString::number(o.value("positions")[0]["azimuth"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:420:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  420 |         QString g = QString::number(o.value("positions")[0]["elevation"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:421:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  421 |         QString h = QString::number(o.value("positions")[0]["ra"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:422:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  422 |         QString i = QString::number(o.value("positions")[0]["dec"].toDouble());
      |                                                         ^
../src/mainwindow.cpp:423:57: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  423 |         QString j = QString::number(o.value("positions")[0]["timestamp"].toInt());
      |                                                         ^
../src/mainwindow.cpp: In lambda function:
../src/mainwindow.cpp:478:56: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [6]’)
  478 |             QString a = QString::number(o.value("info")["satid"].toInt());
      |                                                        ^
../src/mainwindow.cpp:479:40: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [8]’)
  479 |             QString b = o.value("info")["satname"].toString();
      |                                        ^
../src/mainwindow.cpp:480:56: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [12]’)
  480 |             QString c = QString::number(o.value("info")["passescount"].toInt());
      |                                                        ^
../src/mainwindow.cpp:485:55: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  485 |                 myDateTime.setTime_t(o.value("passes")[x]["startUTC"].toInt());
      |                                                       ^
../src/mainwindow.cpp:487:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  487 |                 QString e = QString::number(o.value("passes")[x]["startAz"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:488:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  488 |                 QString f = QString::number(o.value("passes")[x]["startEl"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:489:55: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  489 |                 myDateTime.setTime_t(o.value("passes")[x]["maxUTC"].toInt());
      |                                                       ^
../src/mainwindow.cpp:491:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  491 |                 QString h = QString::number(o.value("passes")[x]["maxAz"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:492:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  492 |                 QString i = QString::number(o.value("passes")[x]["maxEl"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:493:55: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  493 |                 myDateTime.setTime_t(o.value("passes")[x]["endUTC"].toInt());
      |                                                       ^
../src/mainwindow.cpp:495:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  495 |                 QString k = QString::number(o.value("passes")[x]["endAz"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:496:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  496 |                 QString l = QString::number(o.value("passes")[x]["endEl"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:497:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  497 |                 QString m = o.value("passes")[x]["startAzCompass"].toString();
      |                                              ^
../src/mainwindow.cpp:498:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  498 |                 QString n = o.value("passes")[x]["maxAzCompass"].toString();
      |                                              ^
../src/mainwindow.cpp:499:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  499 |                 QString p = o.value("passes")[x]["endAzCompass"].toString();
      |                                              ^
../src/mainwindow.cpp:501:38: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  501 |                 if (o.value("passes")[x]["mag"].toDouble() == 100000)
      |                                      ^
../src/mainwindow.cpp:507:60: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  507 |                     mag = QString::number(o.value("passes")[x]["mag"].toDouble());
      |                                                            ^
../src/mainwindow.cpp:510:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  510 |                 QString r = QString::number(o.value("passes")[x]["duration"].toInt());
      |                                                              ^
../src/mainwindow.cpp: In lambda function:
../src/mainwindow.cpp:577:56: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [6]’)
  577 |             QString a = QString::number(o.value("info")["satid"].toInt());
      |                                                        ^
../src/mainwindow.cpp:578:40: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [8]’)
  578 |             QString b = o.value("info")["satname"].toString();
      |                                        ^
../src/mainwindow.cpp:579:56: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [12]’)
  579 |             QString c = QString::number(o.value("info")["passescount"].toInt());
      |                                                        ^
../src/mainwindow.cpp:584:55: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  584 |                 myDateTime.setTime_t(o.value("passes")[x]["startUTC"].toInt());
      |                                                       ^
../src/mainwindow.cpp:586:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  586 |                 QString e = QString::number(o.value("passes")[x]["startAz"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:587:52: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  587 |                 myDateTime.setTime_t(o.value("pes")[x]["maxUTC"].toInt());
      |                                                    ^
../src/mainwindow.cpp:589:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  589 |                 QString g = QString::number(o.value("passes")[x]["maxAz"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:590:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  590 |                 QString h = QString::number(o.value("passes")[x]["maxEl"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:591:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  591 |                 QString i = QString::number(o.value("passes")[x]["endAz"].toDouble()) + "°";
      |                                                              ^
../src/mainwindow.cpp:592:55: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  592 |                 myDateTime.setTime_t(o.value("passes")[x]["endUTC"].toInt());
      |                                                       ^
../src/mainwindow.cpp:594:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  594 |                 QString k = o.value("passes")[x]["startAzCompass"].toString();
      |                                              ^
../src/mainwindow.cpp:595:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  595 |                 QString l = o.value("passes")[x]["maxAzCompass"].toString();
      |                                              ^
../src/mainwindow.cpp:596:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  596 |                 QString m = o.value("passes")[x]["endAzCompass"].toString();
      |                                              ^
../src/mainwindow.cpp: In lambda function:
../src/mainwindow.cpp:650:52: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [6]’)
  650 |         QString a = QString::number(o.value("info")["satid"].toInt());
      |                                                    ^
../src/mainwindow.cpp:651:36: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [8]’)
  651 |         QString b = o.value("info")["satname"].toString();
      |                                    ^
../src/mainwindow.cpp: In member function ‘void MainWindow::tableTimer()’:
../src/mainwindow.cpp:919:39: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  919 |             if (var.value("positions")[i]["timestamp"].toInt() == UTC.toSecsSinceEpoch())
      |                                       ^
../src/mainwindow.cpp:922:62: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [6]’)
  922 |                 QString a = QString::number(var.value("info")["satid"].toInt());
      |                                                              ^
../src/mainwindow.cpp:923:46: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘const char [8]’)
  923 |                 QString b = var.value("info")["satname"].toString();
      |                                              ^
../src/mainwindow.cpp:925:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  925 |            QString c = QString::number(var.value("positions")[i]["satlatitude"].toDouble()) + "°";
      |                                                              ^

../src/mainwindow.cpp:926:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  926 |            QString d = QString::number(var.value("positions")[i]["satlongitude"].toDouble()) + "°";
      |                                                              ^

../src/mainwindow.cpp:927:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  927 |            QString e = QString::number(var.value("positions")[i]["sataltitude"].toDouble()) + " Km";
      |                                                              ^

../src/mainwindow.cpp:928:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  928 |            QString f = QString::number(var.value("positions")[i]["azimuth"].toDouble()) + "°";
      |                                                              ^

../src/mainwindow.cpp:929:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  929 |            QString g = QString::number(var.value("positions")[i]["elevation"].toDouble()) + "°";
      |                                                              ^

../src/mainwindow.cpp:930:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  930 |            QString h = QString::number(var.value("positions")[i]["ra"].toDouble()) + "°";
      |                                                              ^

../src/mainwindow.cpp:931:67: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  931 |            QString j = QString::number(var.value("positions")[i]["dec"].toDouble()) + "°";
      |                                                              ^

../src/mainwindow.cpp:933:60: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  933 |                 myDateTime.setTime_t(var.value("positions")[i]["timestamp"].toInt());
      |                                                            ^
../src/mainwindow.cpp:966:70: error: no match for ‘operator[]’ (operand types are ‘QJsonValue’ and ‘int’)
  966 | if (UTC.toSecsSinceEpoch() > (positions[0].value("positions")[lm - 1]["timestamp"].toInt() + 0))
      |                                                              ^


Desktop (please complete the following information):

  • OS: Ubuntu 19.10
  • qmake
  • Version 3.1

Additional context
quick solution will be appreciated

@Ahmad138
Copy link
Owner Author

Some systems that qmake already installed or not properly or not the right version can get this error. One way to solve this is to use the qmake that comes with the installation of the Qt.

In my case, I have my Qt installed in the home directory version Qt5.14.1. Follow this step to compile using that qmake:

  1. cd into the build folder
  2. In the terminal:
{path to Qt installation folder}/{version}/gcc_64/bin/qmake ..

#in my case, it will be: ~/Qt5.14.1/5.14.1/gcc_64/bin/qmake ..

NB: I faced this error because the qmake my terminal was using was from Anaconda package by default and that version was not reconciling with the code used for this project.

@sonOFsalah-2425778 sonOFsalah-2425778 added the bug Something isn't working label Apr 18, 2020
@sonOFsalah-2425778 sonOFsalah-2425778 added this to To do in SatRot - Software via automation Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants