nitroshare-desktop icon indicating copy to clipboard operation
nitroshare-desktop copied to clipboard

0.3.4 fails to build on Arch Linux

Open glitsj16 opened this issue 7 years ago • 7 comments

Hi, using nitroshare PKGBUILD from AUR 0.3.4 currently fails to build correctly.

$ pacman -Q qt5-base qt5-svg qt5-tools
qt5-base 5.11.0-1
qt5-svg 5.11.0-1
qt5-tools 5.11.0-1

Full makepkg log available, I'll post the relevant error snippet here:

...
/home/glitsj16/.buildzone/00.tmpfs/nitroshare/src/nitroshare-desktop-0.3.4/src/application/splashdialog.cpp: In constructor ‘SplashDialog::SplashDialog()’:
/home/glitsj16/.buildzone/00.tmpfs/nitroshare/src/nitroshare-desktop-0.3.4/src/application/splashdialog.cpp:40:25: error: incomplete type ‘QStyle’ used in nested name specifier
     setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, size(), QApplication::desktop()->availableGeometry()));
                         ^~~~~~~~~~~
make[2]: *** [src/CMakeFiles/nitroshare.dir/build.make:168: src/CMakeFiles/nitroshare.dir/application/splashdialog.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:153: src/CMakeFiles/nitroshare.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
...

Looks like a QT5 issue, not sure how to fix it properly. I did manage to build nitroshare 0.3.4 succesfully by uncommenting the centering code in the 0.3.4 splashdialog.cpp file, but that's a dirty hack at best.

Regards

glitsj16 avatar May 26 '18 01:05 glitsj16

This is indeed a compilation error caused by a missing include at the top of the file:

#include <QStyle>

However, this chunk of code has already been removed in master (the splash dialog has been replaced by the wizard plugin) so there isn't really a way to "fix" it in the latest release.

nathan-osman avatar May 26 '18 05:05 nathan-osman

@nathan-osman Indeed, I've noticed the code changes and have tested a build from git master on Arch Linux a few hours ago. Looks smashing! Perhaps a patch can be added to the AUR files to fix this bug, like 0.3.4-2. It would keep Arch users from dropping interest in nitroshare while the package can't be built properly. Whether or not that is worth the effort is something I'll leave up to you, as I'm clueless when that will be happening.

glitsj16 avatar May 26 '18 06:05 glitsj16

I did not face this, installed successfully moments ago. Any way I could help?

aksh1618 avatar May 26 '18 14:05 aksh1618

/tmp/makepkg/nitroshare/src/nitroshare-desktop-0.3.4/src/application/splashdialog.cpp: In constructor ‘SplashDialog::SplashDialog()’: /tmp/makepkg/nitroshare/src/nitroshare-desktop-0.3.4/src/application/splashdialog.cpp:40:25: error: incomplete type ‘QStyle’ used in nested name specifier setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, size(), QApplication::desktop()->availableGeometry())); ^~~~~~~~~~~ make[2]: *** [src/CMakeFiles/nitroshare.dir/build.make:168: src/CMakeFiles/nitroshare.dir/application/splashdialog.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:153: src/CMakeFiles/nitroshare.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Makepkg was unable to build nitroshare. ==> Restart building nitroshare ? [y/N]

With glitsj16's patch it compiles fine.

mozo78 avatar May 30 '18 15:05 mozo78

Hi,

I confirm that with this following patch fixes build issue against Qt 5.11:

http://svnweb.mageia.org/packages/cauldron/nitroshare/current/SOURCES/nitroshare-0.3.4-fix-build-against-qt-5.11.0.patch?view=markup&pathrev=1233418

david-geiger avatar Jun 01 '18 01:06 david-geiger

+1

agush22 avatar Jul 14 '18 03:07 agush22

As @nathan-osman suggested it is a easy fix, add #include <QStyle> on the top in src/application/splashdialog.cpp

shivanshtalwar0 avatar Oct 16 '19 21:10 shivanshtalwar0