Bug 364387 - kmymoney 4.8.0 builds libpayeeidentifier.so but asks for libkmm_payeeidentifier.so
Summary: kmymoney 4.8.0 builds libpayeeidentifier.so but asks for libkmm_payeeidentifi...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 16:27 UTC by José JORGE
Modified: 2019-08-29 00:21 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1
ralf.habacker: Version_5-


Attachments
kmymoney-4.8.0-fix-libkmm_payeeidentifier-soversion.patch (543 bytes, patch)
2016-06-29 11:37 UTC, David Geiger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José JORGE 2016-06-16 16:27:57 UTC
I am packaging kmymoney for Mageia for some years.

I am stuck with a naming problem : 

lib64kmm_mymoney4.so needs libkmm_payeeidentifier.so but the build provides libpayeeidentifier.so .

Is there a renaming problem in this libs?

Reproducible: Always

Steps to Reproduce:
At build
Comment 1 José JORGE 2016-06-16 18:29:21 UTC
I wonder where the problem is :

cat build/install_manifest.txt | grep kmm_p

/usr/lib64/libkmm_payeeidentifier.so
/usr/lib64/libkmm_plugin.so.4.14.5
/usr/lib64/libkmm_plugin.so.4
/usr/lib64/libkmm_plugin.so

But the first file is not installed!
Comment 2 Christian David 2016-06-17 21:19:37 UTC
Hi José,

unfortunately I cannot reproduce this bug. There must be a Mageia specific option because we do not create a file called "lib64kmm_mymoney4.so" (only libkmm_mymoney4.so). There is no library called "libpayeeidentifier.so". I checked the CMakeLists.txt and they look fine, too.

Can you post your cmake call with all manually set variables?
Comment 3 José JORGE 2016-06-18 13:40:33 UTC
(In reply to Christian David from comment #2)
> 
> Can you post your cmake call with all manually set variables?



Maybe even better : here is the build log from our build system available for some days. It has a build error because of a make -j24 I think, as it builds well with make -j1

http://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20160616215849.tmb.duvel.37274/log/kmymoney-4.8.0-1.mga6/build.0.20160616215909.log

Please tell me if this is not the information you need.
Comment 4 Thomas Baumgart 2016-06-18 14:57:33 UTC
I can confirm that it builds with -j9 so it does not seem to be a general parallel build problem, though it could be if run with more cores (how many do you have?)
Comment 5 José JORGE 2016-06-18 16:45:36 UTC
(In reply to Thomas Baumgart from comment #4)
> I can confirm that it builds with -j9 so it does not seem to be a general
> parallel build problem, though it could be if run with more cores (how many
> do you have?)

Yes the build log shows much more cores : 24 !
/usr/bin/make -O -j24
Comment 6 Thomas Baumgart 2016-06-19 10:39:01 UTC
The problem is not related to parallel building at all.

*** This bug has been marked as a duplicate of bug 364355 ***
Comment 7 José JORGE 2016-06-19 14:26:57 UTC
Sorry to insist, but the build error was not the initial bug here. The libpayee was what this bug is about.

I  explained it badly, lets restart : kmymoney build installed me this libs :

/usr/lib64/libpayeeidentifier_iban_bic.so.4
/usr/lib64/libpayeeidentifier_iban_bic_widgets.so.4.14.5
/usr/lib64/libpayeeidentifier_iban_bic.so.4.14.5
/usr/lib64/libpayeeidentifier_nationalAccount.so.4
/usr/lib64/libpayeeidentifier_iban_bic_widgets.so.4
/usr/lib64/libpayeeidentifier_nationalAccount.so.4.14.5

And it complains about another missing lib :

kmymoney: error while loading shared libraries: libkmm_payeeidentifier.so: cannot open shared object file: No such file or directory

Should this lib be built by kmymoney?
Comment 8 Christian David 2016-06-19 20:01:04 UTC
Hi,

in the log you linked I can see that kmm_payeeidentifier is compiled correctly: "[ 16%] Built target kmm_payeeidentifier"

However, you build failed at a different point. So linking will not work.

CMakeFiles/mymoneyseqaccessmgrtest.dir/mymoneyseqaccessmgrtest.cpp.o: In function `MyMoneySeqAccessMgrTest::testEmptyConstructor()':
/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/kmymoney/mymoney/storage/mymoneyseqaccessmgrtest.cpp:61: undefined reference to `bool QTest::qCompare<unsigned int, unsigned long>(unsigned int const&, unsigned long const&, char const*, char const*, char const*, int)'
/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/kmymoney/mymoney/storage/mymoneyseqaccessmgrtest.cpp:62: undefined reference to `bool QTest::qCompare<unsigned int, unsigned long>(unsigned int const&, unsigned long const&, char const*, char const*, char const*, int)'
/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/kmymoney/mymoney/storage/mymoneyseqaccessmgrtest.cpp:63: undefined reference to `bool QTest::qCompare<unsigned int, unsigned long>(unsigned int const&, unsigned long const&, char const*, char const*, char const*, int)'
/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/kmymoney/mymoney/storage/mymoneyseqaccessmgrtest.cpp:64: undefined reference to `bool QTest::qCompare<unsigned int, unsigned long>(unsigned int const&, unsigned long const&, char const*, char const*, char const*, int)'
/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/kmymoney/mymoney/storage/mymoneyseqaccessmgrtest.cpp:65: undefined reference to `bool QTest::qCompare<unsigned int, unsigned long>(unsigned int const&, unsigned long const&, char const*, char const*, char const*, int)'
CMakeFiles/mymoneyseqaccessmgrtest.dir/mymoneyseqaccessmgrtest.cpp.o:/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/kmymoney/mymoney/storage/mymoneyseqaccessmgrtest.cpp:66: more undefined references to `bool QTest::qCompare<unsigned int, unsigned long>(unsigned int const&, unsigned long const&, char const*, char const*, char const*, int)' follow
collect2: error: ld returned 1 exit status
kmymoney/mymoney/storage/CMakeFiles/mymoneyseqaccessmgrtest.dir/build.make:194: recipe for target 'kmymoney/mymoney/storage/mymoneyseqaccessmgrtest' failed
make[2]: *** [kmymoney/mymoney/storage/mymoneyseqaccessmgrtest] Error 1
make[2]: Leaving directory '/home/iurt/rpmbuild/BUILD/kmymoney-4.8.0/build'
CMakeFiles/Makefile2:2838: recipe for target 'kmymoney/mymoney/storage/CMakeFiles/mymoneyseqaccessmgrtest.dir/all' failed
make[1]: *** [kmymoney/mymoney/storage/CMakeFiles/mymoneyseqaccessmgrtest.dir/all] Error 2

Maybe this and the parallel build cause the linking error you have. I do not think that your parallel build is the problem, btw.

I think the compiler errors you have were fixed in the 4.8 branch already. Also you can disable the test, which you may want to do anyway. Setting the cmake variable "BUILD_TESTING" to off should do this.

libkmm_payeeidentifier.so should be build and installed by KMyMoney. It works on my system and KDE's CI (there are several tests which depend on kmm_payeeidentifier).
Comment 9 José JORGE 2016-06-20 07:21:57 UTC
(In reply to Christian David from comment #8)
> libkmm_payeeidentifier.so should be build and installed by KMyMoney. It
> works on my system and KDE's CI (there are several tests which depend on
> kmm_payeeidentifier).

Thank you, now I think I found the problem : the file is not built as libkmm_payeeidentifier.so.4.14.21 with a symlink for libkmm_payeeidentifier.so.4 and libkmm_payeeidentifier.so.

I am a nuts with libs, but I see all other kmymoney libs built and installed this way, so I suppose something was forgotten in cmake for this lib?
Comment 10 Rémi Verschelde 2016-06-29 10:26:02 UTC
As José mentions in comment 9, the problem is that libkmm_payeeidentifier.so is not properly libified; it's only provided as a non-symlink .so and not a binary .so.4.14.21 symlinked to the .so.

Excerpt from the (successful, after the parallel build issue was fixed) build on Mageia 6 x86_64 [0]:

extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libpayeeidentifier_iban_bic_widgets.so.4.14.21
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libkmm_widgets.so.4.14.21
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libkmm_kdchart.so.4.14.21
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_ofximport.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_weboob.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_csvimport.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/payeeidentifier_nationalAccount_ui.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_reconciliationreport.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_printcheck.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/payeeidentifier_iban_bic_delegates.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_icalendarexport.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/konlinetasks_sepa.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kmm_csvexport.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kcm_kmm_printcheck.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/payeeidentifier_ibanbic_storageplugin.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/konlinetasks_national.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/kcm_kmm_icalendarexport.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/kde4/payeeidentifier_nationalaccount_storageplugin.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libkmm_plugin.so.4.14.21
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libpayeeidentifier_nationalAccount.so.4.14.21
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libkmm_payeeidentifier.so
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libpayeeidentifier_iban_bic.so.4.14.21
extracting debug info from /home/iurt/rpmbuild/BUILDROOT/kmymoney-4.8.0-1.mga6.x86_64/usr/lib64/libkmm_mymoney.so.4.14.21

I took the debuginfo extraction part, not because it is relevant for the issue, but because it shows the inconsistency in the naming of the binary libs (the ones from which debugging symbols will be extracted).

All libs (in /usr/lib64) have the following naming scheme: libkmm_$name.so.4.14.21, apart from libkmm_payeeidentifier.so.
On the other hand plugins in /usr/lib64/kde4 don't have a suffix after the .so, but that's fine for plugins.

This is a simple issue that needs to be fixed in your CMake buildsystem.

It's non critical in itself, but triggered various issues in Mageia's packaging [1] that José needs to workaround:
- Since it had no .so suffix, José did not split libkmm_payeeidentifier.so in its own library package. Still, RPM's autorequires know that libkmm_mymoney.so.4.14.21 needs it, so RPM will look for it.
- Against due to the unconventional .so suffix, the file was globbed by /usr/lib64/*.so and thus packaged within Mageia's lib64kmymoney-devel, i.e. the development package meant to hold .so symlinks and headers.
- So the non-devel package that holds libkmm_mymoney.so.4.14.21 requires libkmm_payeeidentifier.so()(64bit), which is provided by lib64kmymoney-devel and thus needs to be installed, but it fails because the latter does not provide libkmm_payeeidentifier(64bit) due to the lack of a libkmm_payeeidentifier.so symlink. That triggers this Mageia bug report [2].

So all in all, this is fixable on Mageia's side by tweaking the packaging a bit, but the root cause is an upstream bug that you don't name libkmm_payeeidentifier.so with the proper lib suffix as done for the other libs.

[0] https://pkgsubmit.mageia.org/uploads/done/cauldron/core/release/20160627173851.tmb.duvel.20376/kmymoney-4.8.0-1.mga6/build.0.20160627173913.log
[1] http://svnweb.mageia.org/packages/cauldron/kmymoney/current/SPECS/kmymoney.spec?view=markup
[2] https://bugs.mageia.org/show_bug.cgi?id=18815
Comment 11 Rémi Verschelde 2016-06-29 10:31:19 UTC
So to clarify, the bug is not "kmymoney 4.8.0 builds libpayeeidentifier.so but asks for libkmm_payeeidentifier.so" as currently titled, but more "kmymoney 4.8.0 names a lib binary libkmm_payeeidentifier.so instead of libkmm_payeeidentifier.so.$libmajor, triggering packaging issues".
Comment 12 David Geiger 2016-06-29 11:37:20 UTC
Created attachment 99761 [details]
kmymoney-4.8.0-fix-libkmm_payeeidentifier-soversion.patch

Hi,

I attached a patch who fixes this library issue.

Regards,
David
Comment 13 Christian David 2016-07-12 20:31:47 UTC
Git commit 4a0fed749df71bb2acfc15bd6c0bff4806927f01 by Christian Dávid.
Committed on 12/07/2016 at 20:30.
Pushed by christiand into branch 'master'.

Added versioning to kmm_payeeidentifier library

The missing version caused incorrect naming of the library.
FIXED-IN: 5.0

M  +2    -0    kmymoney/mymoney/payeeidentifier/CMakeLists.txt

http://commits.kde.org/kmymoney/4a0fed749df71bb2acfc15bd6c0bff4806927f01
Comment 14 Christian David 2016-07-12 20:35:48 UTC
(In reply to David Geiger from comment #12)
> Created attachment 99761 [details]
> kmymoney-4.8.0-fix-libkmm_payeeidentifier-soversion.patch
[…]
> I attached a patch who fixes this library issue.

Hello David,

sorry for not answering that long. The patch you provided should fix the issue. Unfortunately I cannot not test it at the moment, so I cannot push it. However, I fixed the bug in the master branch (it is slightly different there). Is there someone who can compile 4.8 and push the patch from David?

Greetings
Christian
Comment 15 Thomas Baumgart 2016-07-13 05:51:44 UTC
Git commit 1b818335b4242ad5096489ab4f8e3e7c3fc62d55 by Thomas Baumgart.
Committed on 13/07/2016 at 05:48.
Pushed by tbaumgart into branch '4.8'.

Added versioning to kmm_payeeidentifier library

The missing version caused incorrect naming of the library.

Modified version of patch provided by Christian Dávid in commit
4a0fed749df71bb2acfc15bd6c0bff4806927f01
FIXED-IN: 4.8.1

M  +2    -0    kmymoney/mymoney/payeeidentifier/CMakeLists.txt

http://commits.kde.org/kmymoney/1b818335b4242ad5096489ab4f8e3e7c3fc62d55
Comment 16 Pino Toscano 2016-07-13 06:55:24 UTC
Well, thanks for having ignored my fix: https://git.reviewboard.kde.org/r/128255/
Next time I'll just push directly and not bother with reviewboard, since you don't seem to pay attention to it.
Comment 17 Cristian Oneț 2016-07-21 12:10:57 UTC
(In reply to Pino Toscano from comment #16)
> Well, thanks for having ignored my fix:
> https://git.reviewboard.kde.org/r/128255/
> Next time I'll just push directly and not bother with reviewboard, since you
> don't seem to pay attention to it.

Sorry, I'm sure it was not intentional. Next time feel free to push directly such fixes.