IJHack / QtPass

QtPass is a multi-platform GUI for pass, the standard unix password manager.
https://qtpass.org/
GNU General Public License v3.0
1.03k stars 162 forks source link

Compilation error in (K)ubuntu 16.04.5 with sources tar.gz from version 1.2.3 #408

Closed fredg02 closed 6 years ago

fredg02 commented 6 years ago

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 commented 6 years ago

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

annejan commented 6 years ago

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 commented 6 years ago

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. :+1: 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.

annejan commented 6 years ago

That means a 1.2.4 maintenance release is due.