[kde-linux] cmake hell

Dag Nygren dag at newtech.fi
Thu Dec 20 05:58:54 UTC 2007


> > With a decent trace ala "sh -x configure" it would be very easy to see
> > what wasn't found...
> >
> > And don't tell me to check the CmakeFiles/*.log files, they tell me a lot
> > of failed
> > tests, but not about the ones reported.
> >
> > And it took me quite some time and an strace (!!) to find out that
> > some of my libraries "didn't exist" as the permissions on the include
> > directory was 750 , and not 755.
> >
> > Any hints on how to trace cmake decision making are very welcome.
> >
> > Best
> > Dag
> >
> Hi Dag,
> 
> I had a small experience with Qt quite some time ago.
> Normally I would have a xxx.pro file and apply qmake to it in order to 
> generate a makefile suitable for Qt. That makefile would create the uic and 
> moc files (IIRC, and that was for Qt 3). Then I used make (don't know if 
> cmake also works).
> So it is possible you didn't follow all the steps to have a working makefile 
> or the one you were provided has a problem.
> I would also expect that you have to install Qt-devel in order to compile Qt 
> programs.
> 
> Perhaps you can get more advice from the list or Qt's archives. 
> qt-interest at trolltech.com
> List archive and information: http://lists.trolltech.com/qt-interest/

Thanks for the advice.

In case someone else has the same problem:

It turned out that my upgrading my Qt4 from 4.3.2 to 4.3.3 
 previously having cmake:ed the same source had left a cache  file
in the Source (!!) tree as well as in the build directory.
I usually use a symlink to point to the current version of both
kde and Qt and then have this in my PATH, in this case the link was
/usr/local/Trolltech/Qt-4 -> /usr/local/Trolltech/Qt-4.3.3 and the PATH
/usr/local/Trolltech/Qt-4/bin
The cache file contained the absolute path to moc et al. for some reason
and thus it tried to use the old removed version of them.
Removing both cache files (CMakeCache.txt) got me forward on this.
But cmake could have told me "
/usr/local/Trolltech/Qt-4.3.2/bin/moc not found"
instead of: moc not found.

=== Start rant ====

And the main issue still remains though:
cmake is VERY MUCH lacking a trace possibility and I haven't had
to spend more time finding out "what it wants this time"  since 
compiling/porting things before automake et al. 10-15 years ago.
I still think cmake was a bad choice for KDE4.

=== End rant ===

Best and thanks
Dag




More information about the kde-linux mailing list