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 error in (K)ubuntu 16.04.5 with sources tar.gz from version 1.2.3 #408

Closed
fredg02 opened this issue Aug 2, 2018 · 4 comments

Comments

@fredg02
Copy link

fredg02 commented Aug 2, 2018

Installed qt5-default and tried qmake && make && make install:
Error message looks quite similar to #388:

g++  -c -m64 -pipe -DSINGLE_APP=1 -O2 -fPIC -std=c++0x -Wall -W -Wno-unknown-pragmas
-D_REENTRANT -DVERSION="\"1.2.3\"" -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_WIDGETS_LIB
-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -isystem /usr/include/x86_64-linux-gnu/qt5
-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/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore
-I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o usersdialog.o usersdialog.cpp
usersdialog.cpp: In member function ‘virtual void UsersDialog::closeEvent(QCloseEvent*)’:
usersdialog.cpp:124:8: error: invalid use of incomplete type ‘class QCloseEvent’
     event->accept();
          ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:37:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from usersdialog.h:6,
                 from usersdialog.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:73:7: note: forward declaration of ‘class QCloseEvent’
 class QCloseEvent;
       ^
usersdialog.cpp: In member function ‘virtual void UsersDialog::keyPressEvent(QKeyEvent*)’:
usersdialog.cpp:138:16: error: invalid use of incomplete type ‘class QKeyEvent’
   switch (event->key()) {
                ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdialog.h:37:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDialog:1,
                 from usersdialog.h:6,
                 from usersdialog.cpp:1:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:68:7: note: forward declaration of ‘class QKeyEvent’
 class QKeyEvent;
       ^
Makefile:624: recipe for target 'usersdialog.o' failed
make[1]: *** [usersdialog.o] Error 1
@annejan
Copy link
Member

annejan commented Aug 14, 2018

Testing on Kubuntu 16.04.2 and Ubuntu 16.04.5 from https://www.osboxes.org/

@annejan
Copy link
Member

annejan commented Aug 14, 2018

Kubuntu 16.04.2 (boot clean VM, login as osboxes):

sudo apt update
sudo apt full-upgrade
sudo apt install git build-essential qt5-qmake qtbase5-dev qtbase5-dev-tools qttools5-dev-tools
git clone https://github.com/ijhack/qtpass
cd qtpass
qmake -qt5 && make && sudo make install
qtpass

I get no errors . . very nice looking KDE interface.

Ubuntu 16.04.5 (boot clean VM, login as osboxes):

sudo apt update
sudo apt install git build-essential qt5-qmake qtbase5-dev qtbase5-dev-tools qttools5-dev-tools
git clone https://github.com/ijhack/qtpass
cd qtpass
qmake -qt5 && make && sudo make install
qtpass

No errors, just a less nice looking interface . .

Could it be that you are not using the default g++ (5.4) from Ubuntu @fredg02 ?

@fredg02
Copy link
Author

fredg02 commented Aug 15, 2018

Could it be that you are not using the default g++ (5.4) from Ubuntu @fredg02 ?

I'm using the default g++ version. g++ --version shows:
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

I tried to reproduce your steps... and it worked. 👍
The difference was/is that I downloaded the source tar.gz from the releases page (https://github.com/IJHack/QtPass/archive/v1.2.3.tar.gz) instead of cloning directly via git. And with that source tar it still does not work, I double-checked.
So compilation works with a git clone, but not with the sources tar.gz from version 1.2.3.

@fredg02 fredg02 changed the title Compilation error in (K)ubuntu 16.04.5 Compilation error in (K)ubuntu 16.04.5 with sources tar.gz from version 1.2.3 Aug 15, 2018
@annejan
Copy link
Member

annejan commented Aug 15, 2018

That means a 1.2.4 maintenance release is due.

@annejan annejan closed this as completed Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants