Bug 342015 - cannot compile libkdepim without baloo
Summary: cannot compile libkdepim without baloo
Status: RESOLVED NOT A BUG
Alias: None
Product: kdepim
Classification: Applications
Component: libkdepim (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 342477 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-18 23:48 UTC by kavol
Modified: 2015-01-04 20:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2014-12-18 23:48:48 UTC
I don't want Baloo on my system. Reading some references, it should be doable - e.g. bug 332195 comment 13 says it should be possible to uninstall. When trying to compile libkdepim, cmake says:


-- The following OPTIONAL packages have not been found:

 * Baloo (required version >= 4.14.0) , The Baloo libraries , <http://www.kde.org>
   Baloo provides search capabilities in KMail and Akonadi


... it even shouts at me that Baloo is "OPTINAL". But then the compilation fails with:

[  2%] Building CXX object libkdepim/CMakeFiles/kdepim.dir/addressline/addresseelineedit.o
cd /var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3_build/libkdepim && /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++  -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=56 -DKDEPIM_STORAGESERVICE_GDRIVE -DKDE_DEFAULT_DEBUG_AREA=5300 -DKDE_DEPRECATED_WARNINGS -DMAKE_KDEPIM_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_STL -DQT_USE_QSTRINGBUILDER -D_BSD_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500  -DQT_NO_DEBUG -DNDEBUG -O2 -pipe -march=native -ggdb  -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 -fexceptions -UQT_NO_EXCEPTIONS -fPIC -I/var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3_build/libkdepim -I/var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3/libkdepim -I/var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3 -I/var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3_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/QtMultimedia -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/kdepim.dir/addressline/addresseelineedit.o -c /var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3/libkdepim/addressline/addresseelineedit.cpp
/var/tmp/portage/kde-base/kdepim-common-libs-4.14.3/work/kdepim-common-libs-4.14.3/libkdepim/addressline/addresseelineedit.cpp:42:40: fatal error: baloo/pim/contactcompleter.h: No such file or directory
 #include <baloo/pim/contactcompleter.h>
                                        ^
compilation terminated.


Despite the fact that the top-level cmakelists fails the check for Baloo, the cmakelists from the added subdirectory 'libkdepim' doesn't make use of the result of the check and just hardcodes Baloo-specific options and tries to compile code that unconditionally depends on Baloo headers ...

Reproducible: Always
Comment 1 Laurent Montel 2014-12-19 06:40:25 UTC
It was not optional
=> so it's not a bug.

"
  find_package(Baloo 4.14.0 QUIET CONFIG)
  set_package_properties(Baloo PROPERTIES DESCRIPTION "The Baloo libraries" URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Baloo provides search capabilities in KMail and Akonadi")
"
=> it's required
Comment 2 kavol 2014-12-19 07:51:39 UTC
(In reply to Laurent Montel from comment #1)
> It was not optional
> => so it's not a bug.

ahem, I've referenced a comment from *Baloo developer* who says that Baloo should be uninstallable

that implies that the compilation should not depend on it; either as a direct implication (if the "uninstallability" is excercised before the compilation) and either as indirect implication (if compiled with Baloo and then it gets removed, you'd get executables broken due to missing libraries)

so in no way I can see how this could _not_ be a bug


> "
>   find_package(Baloo 4.14.0 QUIET CONFIG)
>   set_package_properties(Baloo PROPERTIES DESCRIPTION "The Baloo libraries"
> URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Baloo provides search
> capabilities in KMail and Akonadi")
> "
> => it's required

then, in addition, there's some bug with cmake if the configure phase output lists it  in the section of optional and not required packages ... feel free to open a new report for it

the full detection output is as follows:


-- The following OPTIONAL packages have been found:

 * Perl
 * KdepimLibs (required version >= 4.14.3) , The KDEPIM libraries , <http://www.kde.org>
 * Boost (required version >= 1.34.0) , Boost C++ Libraries , <http://www.boost.org>
   Boost is required for building most KDEPIM applications
 * Akonadi (required version >= 1.12.90) , Akonadi server libraries , <http://pim.kde.org/akonadi>
   Akonadi is required to build KDEPIM
 * ZLIB , The Zlib compression library , <http://www.zlib.net>
 * Gpgme
 * Threads
 * PkgConfig
 * OpenSSL
 * Grantlee (required version >= 0.3.0) , The Grantlee Template System , <http://www.gitorious.org/grantlee/pages/Home>
   Grantlee is requires for kmail and templating, theming for KJots, KaddressBook, KNotes and MessageViewer(KMail).
 * Xsltproc , XSLT processor from libxslt
   Required to generate D-Bus interfaces.
 * QJSON , QJSON , <http://qjson.sourceforge.net/>
   Qt library for handling JSON data
 * LibKGAPI2 (required version >= 2.2.0) , KDE-based library for accessing various Google services , <https://projects.kde.org/libkgapi>
   LibKGAPI is required to build Google Drive Storage Service
 * Assuan2

-- The following RECOMMENDED packages have been found:

 * QGpgme , The QGpgMe library , <http://www.kde.org>
   QGpgME is required to build KMail, KOrganizer and Kleopatra

-- The following REQUIRED packages have been found:

 * Automoc4
 * Phonon (required version >= 4.3.80)
 * KDE4Internal
 * KDE4 (required version >= 4.13.0)
 * X11
 * Qt4

-- The following OPTIONAL packages have not been found:

 * Baloo (required version >= 4.14.0) , The Baloo libraries , <http://www.kde.org>
   Baloo provides search capabilities in KMail and Akonadi
 * Prison , The Prison library , <http://projects.kde.org/prison>
   Needed to show mobile barcodes of your contacts
Comment 3 Laurent Montel 2014-12-19 08:08:10 UTC
(In reply to kavol from comment #2)
> (In reply to Laurent Montel from comment #1)
> > It was not optional
> > => so it's not a bug.
> 
> ahem, I've referenced a comment from *Baloo developer* who says that Baloo
> should be uninstallable
> 
> that implies that the compilation should not depend on it; either as a
> direct implication (if the "uninstallability" is excercised before the
> compilation) and either as indirect implication (if compiled with Baloo and
> then it gets removed, you'd get executables broken due to missing libraries)
> 
> so in no way I can see how this could _not_ be a bug

Baloo developper has created this patch.
So it was required and there is never optional so no it's not a bug.
Perhaps you need a feature but it's not a bug because never supported.

So I will look at for kf5 but not for 4.14. I will not break all for it.
If you don't want it. remove akonadi_baloo_indexer.

> 
> 
> > "
> >   find_package(Baloo 4.14.0 QUIET CONFIG)
> >   set_package_properties(Baloo PROPERTIES DESCRIPTION "The Baloo libraries"
> > URL "http://www.kde.org" TYPE REQUIRED PURPOSE "Baloo provides search
> > capabilities in KMail and Akonadi")
> > "
> > => it's required
> 
> then, in addition, there's some bug with cmake if the configure phase output
> lists it  in the section of optional and not required packages ... feel free
> to open a new report for it

I don't know why it reported it as optional but it's not my problem.
If you want to open a bug report about it, report to kdelibs

Regards

> 
> the full detection output is as follows:
> 
> 
> -- The following OPTIONAL packages have been found:
> 
>  * Perl
>  * KdepimLibs (required version >= 4.14.3) , The KDEPIM libraries ,
> <http://www.kde.org>
>  * Boost (required version >= 1.34.0) , Boost C++ Libraries ,
> <http://www.boost.org>
>    Boost is required for building most KDEPIM applications
>  * Akonadi (required version >= 1.12.90) , Akonadi server libraries ,
> <http://pim.kde.org/akonadi>
>    Akonadi is required to build KDEPIM
>  * ZLIB , The Zlib compression library , <http://www.zlib.net>
>  * Gpgme
>  * Threads
>  * PkgConfig
>  * OpenSSL
>  * Grantlee (required version >= 0.3.0) , The Grantlee Template System ,
> <http://www.gitorious.org/grantlee/pages/Home>
>    Grantlee is requires for kmail and templating, theming for KJots,
> KaddressBook, KNotes and MessageViewer(KMail).
>  * Xsltproc , XSLT processor from libxslt
>    Required to generate D-Bus interfaces.
>  * QJSON , QJSON , <http://qjson.sourceforge.net/>
>    Qt library for handling JSON data
>  * LibKGAPI2 (required version >= 2.2.0) , KDE-based library for accessing
> various Google services , <https://projects.kde.org/libkgapi>
>    LibKGAPI is required to build Google Drive Storage Service
>  * Assuan2
> 
> -- The following RECOMMENDED packages have been found:
> 
>  * QGpgme , The QGpgMe library , <http://www.kde.org>
>    QGpgME is required to build KMail, KOrganizer and Kleopatra
> 
> -- The following REQUIRED packages have been found:
> 
>  * Automoc4
>  * Phonon (required version >= 4.3.80)
>  * KDE4Internal
>  * KDE4 (required version >= 4.13.0)
>  * X11
>  * Qt4
> 
> -- The following OPTIONAL packages have not been found:
> 
>  * Baloo (required version >= 4.14.0) , The Baloo libraries ,
> <http://www.kde.org>
>    Baloo provides search capabilities in KMail and Akonadi
>  * Prison , The Prison library , <http://projects.kde.org/prison>
>    Needed to show mobile barcodes of your contacts
Comment 4 kavol 2015-01-04 11:37:04 UTC
(In reply to Laurent Montel from comment #3)
...
> Baloo developper has created this patch.
> So it was required and there is never optional so no it's not a bug.
> Perhaps you need a feature but it's not a bug because never supported.

ahem, sorry, but I still do not follow ...

there is a discrepancy between the statement and the actual code

so one of them is wrong - "buggy"

and as the statement is part of a broader discussion, not just a random thought, I'd say the bug is in the code and not in the statement

it's not a feature in the sense of "new functionality", it is a problem with already existing code

so probably reassigning this to the actual author of the code to make it compliant with what he says the code should do would be better than just closing the bugreport with something like "he coded it this way so it should be so" - if I get your words right

(if not, I apologise; also, I don't know much about processes in this bugzilla instance, if the assignee is tied to the component and cannot be changed or whatever ... I just present my POV which doesn't have to be best due to missing context)

> So I will look at for kf5

cool, thanks

> but not for 4.14. I will not break all for it.
> If you don't want it. remove akonadi_baloo_indexer.

ok, I guess I can live with that as long as `rm /usr/bin/baloo*` doesn't break anything I use

...
> I don't know why it reported it as optional but it's not my problem.
> If you want to open a bug report about it, report to kdelibs

ok, bug 342477
Comment 5 Christophe Marin 2015-01-04 19:47:13 UTC
*** Bug 342477 has been marked as a duplicate of this bug. ***
Comment 6 Christophe Marin 2015-01-04 19:48:24 UTC
As it's still not clear to you: Baloo is mandatory for kdepimlibs. That's not a bug.
Comment 7 Christophe Marin 2015-01-04 19:51:26 UTC
s/kdepimlibs/kdepim/

It's the gentoo build system that changes it to optional.
Comment 8 kavol 2015-01-04 20:41:16 UTC
(In reply to Christophe Giboudeaux from comment #6)
> As it's still not clear to you: Baloo is mandatory for kdepimlibs.

that part is clear to me just by looking at the code, however correctness of the code cannot be proved by referencing itself

> That's not a bug.

why?

as already said, the code contradicts to what was said how it should behave

so the code not doing what it should do according to its developer is not a bug because ...?

(In reply to Christophe Giboudeaux from comment #7)
> It's the gentoo build system that changes it to optional.

oops, I apologize, you're right ... I must have mistaken directories when examining the sources and I didn't have any suspicion as there isn't any such patch and I hadn't realized it can get changed elsewhere; running it through diff I see the REQUIRED => OPTIONAL change now ... sorry :-(