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

compilation errors in Ubuntu 20.04 #127

Open
mcmillco opened this issue Jan 26, 2021 · 5 comments
Open

compilation errors in Ubuntu 20.04 #127

mcmillco opened this issue Jan 26, 2021 · 5 comments
Assignees
Labels

Comments

@mcmillco
Copy link

Thanks for this project, it looks very interesting! I am having some troubles compiling on Ubuntu 20.04, though. I believe I have all the dependencies listed, but it feels like something is missing. I have the same issues on both the master and v2 branches.

$ make
g++ -c -pipe -O2 -pthread -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -Isrc/ew-node/src -isystem /usr/include/hidapi -isystem /usr/include/libusb-1.0 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o main.o src/main.cpp
In file included from src/accountmodel.h:33,
                 from src/main.cpp:36:
src/ew-node/src/nodeipc.h:211:9: error: ‘QElapsedTimer’ does not name a type; did you mean ‘QBasicTimer’?
  211 |         QElapsedTimer fKillTime;
      |         ^~~~~~~~~~~~~
      |         QBasicTimer
make: *** [Makefile:891: main.o] Error 1

If I go to src/ew-node/src/nodeipc.h and add the line #include <QElapsedTimer>, it passes that step but then crashes with the error:

g++ -c -pipe -O2 -pthread -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Isrc -Isrc/ew-node/src -isystem /usr/include/hidapi -isystem /usr/include/libusb-1.0 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebSockets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o nodeipc.o src/ew-node/src/nodeipc.cpp
src/ew-node/src/nodeipc.cpp: In constructor ‘Etherwall::NodeIPC::NodeIPC(Etherwall::GethLog&)’:
src/ew-node/src/nodeipc.cpp:106:42: error: ‘errorOccurred’ is not a member of ‘QLocalSocket’
  106 |         connect(&fSocket, &QLocalSocket::errorOccurred, this, &NodeIPC::onSocketError);
      |                                          ^~~~~~~~~~~~~
src/ew-node/src/nodeipc.cpp: In member function ‘virtual const QStringList Etherwall::NodeIPC::buildGethArgs()’:
src/ew-node/src/nodeipc.cpp:730:81: error: ‘SkipEmptyParts’ is not a member of ‘Qt’
  730 |             args = (argStr + " --datadir " + ddStr + "/rinkeby").split(' ', Qt::SkipEmptyParts);
      |                                                                                 ^~~~~~~~~~~~~~
src/ew-node/src/nodeipc.cpp:733:68: error: ‘SkipEmptyParts’ is not a member of ‘Qt’
  733 |             args = (argStr + " --datadir " + ddStr).split(' ', Qt::SkipEmptyParts);
      |                                                                    ^~~~~~~~~~~~~~
make: *** [Makefile:1109: nodeipc.o] Error 1

Thank you!

@almindor almindor self-assigned this Jan 26, 2021
@almindor
Copy link
Owner

This seems like some sort of QT5 version issue. I wonder if the ubuntu Qt5 setup is somehow different. What's the qt5base package version you have?

@mcmillco
Copy link
Author

I was thinking in that direction too. It seems like something is subtly different in Qt. I have 5.12 (the Ubuntu default packages), which is why I tried the v2 branch -- the master branch says it wants 5.15+, while the v2 branch says 5.6+. But I get the same behavior in both branches.

$ apt-cache policy libqt5core5a
libqt5core5a:
  Installed: 5.12.8+dfsg-0ubuntu1
  Candidate: 5.12.8+dfsg-0ubuntu1
  Version table:
 *** 5.12.8+dfsg-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status
$ qmake --version
QMake version 3.1
Using Qt version 5.12.8 in /usr/lib/x86_64-linux-gnu

@almindor
Copy link
Owner

I'll try and set up a VM to test this sometime next week.

@kaoh
Copy link

kaoh commented Aug 1, 2021

An updates? I see the same behavior on Ubuntu 20.04.

@TheOnePerson
Copy link

I had the same issue on Ubuntu 20.04. It appears that Qt version 5.12, which comes with Ubuntu 20.04 is too old for proper compiling. My solution was to download Qt 5.15.2 sources (from here: https://download.qt.io/official_releases/qt/5.15/5.15.2/single/ ), and compile it from scratch. With Qt 5.15.x Etherwallet compiles just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants