Bug 315318 - kde-runtime does not compile on case-sensitive filesystems due to nepomuk includes
Summary: kde-runtime does not compile on case-sensitive filesystems due to nepomuk inc...
Status: RESOLVED NOT A BUG
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: 4.9.5
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-17 13:41 UTC by Nicolas Pavillon
Modified: 2013-02-22 02:18 UTC (History)
3 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 Nicolas Pavillon 2013-02-17 13:41:50 UTC
In the kde-runtime package, both #include<Nepomuk2...> and #include<nepomuk2...> syntaxes are used, which breaks compilation on case-sensitive file systems.

Reproducible: Always

Steps to Reproduce:
1. Build kde-runtime package on Mac with a case-sensitive system
Actual Results:  
Build crashes with the error:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_kde4-runtime/kde4-runtime/work/kde-runtime-4.9.5/nepomuk/kcm/nepomukserverkcm.h:27:10: fatal error: 'Nepomuk2/Query/Query' file not found
:info:build #include <Nepomuk2/Query/Query>

Expected Results:  
Compilation does not crash.

The error log is for KDE 4.9.5, but as the includes are identical on version 4.10.0, it is expected to give the same result.
Comment 1 Vishesh Handa 2013-02-17 14:04:04 UTC
I'm a little confused. <Nepomuk2/Query/Query> does exist. <nepomuk2/query/query> does not. So the error doesn't seem right. Also, AFAIK, ext4 (the one I use) is a case sensitive file system, and it compiles fine for me.

Could you possibly provide a patch? Or give more information on how to fix this?
Comment 2 Franz Trischberger 2013-02-17 14:25:09 UTC
Nepomuk2 contains Qt-style CamelCase-includes, they include the actual headers from nepomuk2 (lower case):
$ cat /usr/include/Nepomuk2/Query/Query
#include "../../nepomuk2/query.h"

Do you have "nepomuk-core" installed?
Where (prefix) did you install the package?
Can your compiler find the headers?
Comment 3 Vishesh Handa 2013-02-17 14:59:41 UTC
(In reply to comment #2)
> Nepomuk2 contains Qt-style CamelCase-includes, they include the actual
> headers from nepomuk2 (lower case):
> $ cat /usr/include/Nepomuk2/Query/Query
> #include "../../nepomuk2/query.h"
As far as I know this is the standard way of doing it across KDE.

vlap:~/kde/src/kdelibs/includes/Solid $ cat Camera 
#include "../../solid/camera.h

> 
> Do you have "nepomuk-core" installed?
Yes

> Where (prefix) did you install the package?
/usr/include and a custom ~/kde/include/

> Can your compiler find the headers?
Yup. Both gcc and clang find them.
Comment 4 Franz Trischberger 2013-02-17 15:05:54 UTC
:D
I was asking Nicolas. You - Vishesh -  develop nepomuk, so I am sure your (own) headers can be found ;)
Comment 5 Vishesh Handa 2013-02-17 15:17:18 UTC
(In reply to comment #4)
> :D
> I was asking Nicolas. You - Vishesh -  develop nepomuk, so I am sure your
> (own) headers can be found ;)

Heh. Sorry, I didn't notice that the reply was from a different person.
Comment 6 Nicolas Pavillon 2013-02-17 15:28:04 UTC
I may unfortunately not be able to answer fully accurately to all questions, as I am reporting the case from a ticket we got at Macports (https://trac.macports.org/ticket/37968). I should have given the link from the start, sorry.
In the default case (not case-sensitive for Mac), compilation builds fine. 

(In reply to comment #2)
> Do you have "nepomuk-core" installed?
Yes, it had been proposed as a solution in the ticket, and was installed.
> Where (prefix) did you install the package?
Macports installs by default everything in the /opt/local prefix.
> Can your compiler find the headers?
Not in the configuration described. The solution has been to replace every occurrence of Nepomuk2 in includes with nepomuk2, in which case compilation appears to work. 

> Nepomuk2 contains Qt-style CamelCase-includes, they include the actual
> headers from nepomuk2 (lower case):
> $ cat /usr/include/Nepomuk2/Query/Query
> #include "../../nepomuk2/query.h"
I was not aware of this. 
In this case, it seems that the real problem resides in the installation of headers of nepomuk-core. My headers are installed as PREFIX/include/nepomuk2/Query/AndTerm for example, so that the capital is not present in nepomuk2, but is in the rest of the path. 

On my system (case-insensitive), it builds fine on top of it, but a case-sensitive system would break, as reported.
Comment 7 Vishesh Handa 2013-02-19 14:46:49 UTC
I'm not sure why it is being installed with the wrong prefix. The Cmake command clearly tells it to install under the "Nepomuk2" prefix. Look -

nepomuk-core/includes/CMakeLists.txt -
DESTINATION ${INCLUDE_INSTALL_DIR}/Nepomuk2/Types COMPONENT Devel)

Maybe some variable is set on your end?
Comment 8 Nicolas Pavillon 2013-02-22 02:18:13 UTC
Thanks for all the answers. I looked in more details into the issue and tested on a case-sensitive filesystem, and I can confirm that the issue is not on the KDE code side (hence putting the bug as resolved). 

For reference, here is the explanation I could come up for the bug reports I had received.
On a case-sensitive system, I could confirm that it works as intended. On a case-insensitive system, all include files are gathered in nepomuk2 (and nothing in Nepomuk2), but as there are no identically named files, it can still be properly used.

I the particular broken case, I think that nepomuk-core has been installed from a pre-compiled package on a machine, which is case-insensitive, and then the user tried to build kde-runtime on its case-sensitive machine on top of it, breaking compilation.