View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013995CMakeCMakepublic2013-03-09 00:422013-03-10 17:35
ReporterYichao Yu 
Assigned ToAlex Neundorf 
PriorityurgentSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformLinux x86-64OSArch LinuxOS Version
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0013995: Builtin automoc doesn't automatically include system include path.
DescriptionWhen qt is not installed in /usr/include (e.g. installed in /usr/include/qt4 instead), which is the default system include dir, the moc command line generated by builtin automoc doesn't have -I/usr/include argument, even if it has been explicitly added as include dir by include_directories, causing moc not able to find headers installed in the system include dir. Since this is the path the compiler will search anyway (unless using some special switch to turn off maybe?), moc should also search in this(these) path(s), especially when a dependency library has headers installed in it and therefore had added it explicitly.

Since moc may has no idea what exactly the system include dir is (it's not gcc anyway) not to mention whether it has been explicitly added using include_directories in cmake, while cmake has access to these info, cmake should pass these dir as command line arguments (may put them at the end though).
Steps To Reproduce1. Install qt's header in /usr/include/qt4 (so that qt4' qmake -query QT_INSTALL_HEADERS gives /usr/include/qt4) (just as what is done in archlinux's package).
2. Install phonon from git, which has headers installed in /usr/include/phonon and require /usr/include to be in the include path and also uses cmake's builtin automoc for newer cmake in it's git version.
3. Try compiling phonon-vlc from git, using make VERBOSE=1, error will be reported causing by not being able to find the definition of an interface which is actually defined in one of the headers in /usr/include/phonon (which is actually included by that header using #include <phonon/**.h>), the command line shows that -I/usr/include is not in the command line argument and strace the command line also shows the correct path is not searched. Adding -I/usr/include to command line argument works well.
Additional Informationthe automoc package works perfect.
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0013762closedAlex Neundorf Automoc still fails to handle Q_INTERFACES 

  Notes
(0032545)
Alex Neundorf (developer)
2013-03-09 03:59

I think this is a duplicate of 0013762 .
In a few days the first release candidate for 2.8.11 will be out.
Can you please give this a try ?
It should fix the problem.
(0032559)
Yichao Yu (reporter)
2013-03-09 08:30

I will give the cmake git master a try. (I think I have found that issue but didn't pay attention to the comment....).
(0032560)
Yichao Yu (reporter)
2013-03-09 08:51

Yes, at least fixed in git master, THX. (haven't found out how to close though..., if possible...).
(0032565)
Alex Neundorf (developer)
2013-03-10 17:35

No change required, as this has already been fixed for 0013762 .

 Issue History
Date Modified Username Field Change
2013-03-09 00:42 Yichao Yu New Issue
2013-03-09 03:55 Alex Neundorf Assigned To => Alex Neundorf
2013-03-09 03:55 Alex Neundorf Status new => assigned
2013-03-09 03:59 Alex Neundorf Note Added: 0032545
2013-03-09 08:30 Yichao Yu Note Added: 0032559
2013-03-09 08:51 Yichao Yu Note Added: 0032560
2013-03-10 17:34 Alex Neundorf Relationship added duplicate of 0013762
2013-03-10 17:35 Alex Neundorf Note Added: 0032565
2013-03-10 17:35 Alex Neundorf Status assigned => closed
2013-03-10 17:35 Alex Neundorf Resolution open => duplicate


Copyright © 2000 - 2018 MantisBT Team