Bug 375076 - Build failure for kgpgfile.cpp
Summary: Build failure for kgpgfile.cpp
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: git (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-15 05:13 UTC by Ian Neal
Modified: 2017-02-05 15:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Check for version (583 bytes, patch)
2017-01-15 18:27 UTC, Ian Neal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Neal 2017-01-15 05:13:11 UTC
Building on Fedora 25:
cmake picks up that kf5-gpgmepp-devel is installed
GpgME Encryption:                        yes

When I try to compile in the build directory, I get the following:
[  0%] Building CXX object libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile.cpp.o
/src/kmymoney/kmymoney4/kmymoney/libkgpgfile/kgpgfile.cpp:40:29: fatal error: gpgme++/context.h: No such file or directory
 #include <gpgme++/context.h>

If I set CPLUS_INCLUDE_PATH=/usr/include/KF5:/usr/include/KF5/gpgme++
then the compile does get passed two errors.

Later it then produces:
[ 63%] Linking CXX executable kmymoney
/usr/bin/ld: cannot find -lGpgmepp
collect2: error: ld returned 1 exit status
kmymoney/CMakeFiles/kmymoney.dir/build.make:271: recipe for target 'kmymoney/kmymoney' failed
make[2]: *** [kmymoney/kmymoney] Error 1
CMakeFiles/Makefile2:501: recipe for target 'kmymoney/CMakeFiles/kmymoney.dir/all' failed
make[1]: *** [kmymoney/CMakeFiles/kmymoney.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Comment 1 Thomas Baumgart 2017-01-15 07:34:29 UTC
Did you upgrade Fedora with the KMyMoney build directory being present? Try to remove build/CMakeCache.txt and run make again. Does that make a difference? If not, what happens if you start with a complete new build directory?
Comment 2 Ian Neal 2017-01-15 10:40:03 UTC
(In reply to Thomas Baumgart from comment #1)
> Did you upgrade Fedora with the KMyMoney build directory being present? Try
> to remove build/CMakeCache.txt and run make again. Does that make a
> difference? If not, what happens if you start with a complete new build
> directory?

I did a clobber build, so completely removed the build directory before starting the process.
I pulled the latest master down as well, so this is the result of doing that.
Comment 3 Ian Neal 2017-01-15 17:44:48 UTC
Could it be that GPGME 1.7 is needed, yet isn't checked for?
Most distros only seem to come with 1.6, some are picking up 1.8 for their next development cycle.
Comment 4 Ian Neal 2017-01-15 18:20:37 UTC
I've backed out diff from https://git.reviewboard.kde.org/r/129265/ locally and that allows me to build.
Comment 5 Ian Neal 2017-01-15 18:27:14 UTC
Created attachment 103426 [details]
Check for version

Add check for version.
This allows a non-Gpgme build to complete
Comment 6 Andreas Sturmlechner 2017-01-16 17:18:39 UTC
Yes, only >=GpgME-1.7.0 contains the C++/Qt5 bindings. +1 for the patch, 4.8 branch already does the same.

(In reply to Ian Neal from comment #3)
> Most distros only seem to come with 1.6
LTS distros, maybe. Anyone packaging KDE Applications 16.12.0 or later needs GpgME-1.7.0 as well. Though I'm curious what Fedora is doing here, because kf5-gpgmepp-devel should definitely not be found (that would require find_package(KF5Gpgmepp)).
Comment 7 NSLW 2017-01-22 15:34:27 UTC
I've got installed following packages:
qgpgme 1.8.0
kf5-gpgmepp 16.08.3
gpgmepp 1.8.0
gpgme 1.8.0

and no problems with compilation on Fedora 25.
Comment 8 Ian Neal 2017-02-05 11:10:24 UTC
Now that gpgme 1.8 is available on Fedora 25, with the following installed, cmake did not complain but make failed:
gpgme-1.8.0-8
python3-pygpgme-0.3-18
kf5-gpgmepp-16.08.3-3
python2-pygpgme-0.3-18
gpgme-devel-1.8.0-8
kf5-gpgmepp-devel-16.08.3-3
kdepimlibs-gpgme-4.14.10-17

I installed gpgmepp-1.8.0-8, gpgmepp-devel-1.8.0-8, qgpgme-1.8.0-8 and qgpgme-devel-1.8.0-8 and the build process started, so looks like more checks are needed.
Comment 9 Ian Neal 2017-02-05 11:23:51 UTC
make has now failed on:
[ 64%] Linking CXX executable kmymoney
/usr/bin/ld: cannot find -lassuan

Installed libassuan-devel which fixed that issue
Comment 10 Andreas Sturmlechner 2017-02-05 11:47:38 UTC
libassuan has always been a dependency of gpgme.
Comment 11 Ian Neal 2017-02-05 11:52:32 UTC
(In reply to andreas.sturmlechner from comment #10)
> libassuan has always been a dependency of gpgme.

libassuan was installed, it was libassuan-devel that wasn't - for Fedora 25 there appears to be no dependency between gpgme devel libraries and the libassuan devel library
Comment 12 Rex Dieter 2017-02-05 14:56:41 UTC
I kmymoney explicitly links assuan, then it ought to have a cmake check for it.

It's not fair to assume it is present via any implicit dependency.

yes, fedora removes the implicit dependency gpgme->libassuan because it's not (directly) used anywhere (in gpgme)
Comment 13 Rex Dieter 2017-02-05 14:57:43 UTC
oops, except I think the version of gpgme in f25 updates hasn't fixed that issue (yet), so it may be a downstream issue.

(I'll take care of fixing that now)
Comment 14 Rex Dieter 2017-02-05 14:59:32 UTC
This should help,

https://bodhi.fedoraproject.org/updates/FEDORA-2017-4cd637d375
Comment 15 Rex Dieter 2017-02-05 15:21:50 UTC
marking resolved->downstream