Bug 328990

Summary: #include <gpgme++/key.h> not Guarded by #ifdef
Product: [Applications] kwalletmanager Reporter: David E. Narvaez <david.narvaez>
Component: generalAssignee: Valentin Rusu <valir>
Status: RESOLVED DUPLICATE    
Severity: normal CC: johu, valir
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: kwalletd-4.12.0-qgpgme.patch

Description David E. Narvaez 2013-12-19 03:47:19 UTC
http://commits.kde.org/kde-runtime/a6c3e399e8674914ccde5d80710de866cbb700da

introduced the follwing line (31)

#include <gpgme++/key.h>

but it is not guarded by #ifdef HAVE_QGPGME like all other additions to that file.

Reproducible: Always

Steps to Reproduce:
1. Try building kdewalletd withouth gpgme++
Actual Results:  
[ 29%] Building CXX object kwalletd/backend/CMakeFiles/kwalletbackend.dir/kwalletbackend.o
cd /var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0_build/kwalletd/backend && /usr/bin/x86_64-pc-linux-gnu-g++  -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=46 -DKDE_DEPRECATED_WARNINGS -DMAKE_KWALLETBACKEND_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_STL -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -D_BSD_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500  -DQT_NO_DEBUG -DNDEBUG -march=core2 -O2 -pipe  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -I/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0_build/kwalletd/backend -I/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/backend -I/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0 -I/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0_build -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtDBus -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4    -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kwalletbackend.dir/kwalletbackend.o -c /var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/backend/kwalletbackend.cc
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/backend/kwalletbackend.cc:31:25: fatal error: gpgme++/key.h: No such file or directory

Expected Results:  
Should compile fine since the commit message says it is optional.
Comment 1 Alex 2013-12-19 04:56:51 UTC
Created attachment 84170 [details]
kwalletd-4.12.0-qgpgme.patch

This is a partial patch.  There are still problems:

nclude/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4    -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kdeinit_kwalletd.dir/kwalletwizard.o -c /var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletwizard.cpp
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletwizard.cpp:123:5: error: ‘KWalletWizardPagePasswordGpg’ in namespace ‘Ui’ does not name a type
     Ui::KWalletWizardPagePasswordGpg ui;
     ^
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletwizard.cpp: In constructor ‘PagePassword::PagePassword(QWidget*)’:
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletwizard.cpp:83:9: error: ‘ui’ was not declared in this scope
         ui.setupUi(this);
         ^
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletwizard.cpp: In member function ‘void PagePassword::setMatchLabelText(const QString&)’:
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletwizard.cpp:119:9: error: ‘ui’ was not declared in this scope
         ui._matchLabel->setText(text);
         ^
kwalletd/CMakeFiles/kdeinit_kwalletd.dir/build.make:186: recipe for target 'kwalletd/CMakeFiles/kdeinit_kwalletd.dir/kwalletwizard.o' failed
make[2]: *** [kwalletd/CMakeFiles/kdeinit_kwalletd.dir/kwalletwizard.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletd.cpp: In member function ‘void KWalletD::doTransactionChangePassword(const QString&, const QString&, qlonglong)’:
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletd.cpp:838:28: error: ‘BACKEND_CIPHER_GPG’ is not a member of ‘KWallet’
     if (w->cipherType() == KWallet::BACKEND_CIPHER_GPG) {
                            ^
/var/tmp/portage/kde-base/kwalletd-4.12.0/work/kwalletd-4.12.0/kwalletd/kwalletd.cpp:839:28: error: ‘class KWallet::Backend’ has no member named ‘gpgKey’
         QString keyID = w->gpgKey().shortKeyID();
                            ^
kwalletd/CMakeFiles/kdeinit_kwalletd.dir/build.make:163: recipe for target 'kwalletd/CMakeFiles/kdeinit_kwalletd.dir/kwalletd.o' failed
make[2]: *** [kwalletd/CMakeFiles/kdeinit_kwalletd.dir/kwalletd.o] Error 1
Comment 2 Johannes Huber 2013-12-19 06:51:16 UTC

*** This bug has been marked as a duplicate of bug 328476 ***