cmake problem: dependencies are not updated until make is re-run
David Faure
faure at kde.org
Tue May 23 20:48:16 CEST 2006
On Tuesday 23 May 2006 20:40, David Faure wrote:
> On Tuesday 23 May 2006 16:06, Brad King wrote:
> > I just created a small project, built it, renamed a header, and built
> > again and it worked. There is something else going on here.
>
> Doh. I think I know the cause. I was experimenting with -DCMAKE_SKIP_RULE_DEPENDENCY=TRUE
> to get a behavior more like the previous buildsystem, where editing build system files (CMakeLists.txt for cmake)
> doesn't necessarily trigger a recompilation (but of course when changing e.g. definitions one must
> then make clean). Since I couldn't reproduce the problem on the other machine, which doesn't
> use -DCMAKE_SKIP_RULE_DEPENDENCY=TRUE, I think it was the cause for this. My fault then, sorry.
Ah! This is too funny. 30 seconds after I send the mail, the other machine shows a compilation error.
(It simply took longer because unit tests are not enabled there, so the failure was further on in kdelibs.)
Full story:
$ svnversion
539114
$ svnurl
svn+ssh://dfaure@svn.kde.org/home/kde/branches/work/kdelibs4_snapshot
$ make
makeobj[0]: Entering directory `/devel/kde/build/4/kdelibs4_snapshot'
makeobj[0]: Leaving directory `/devel/kde/build/4/kdelibs4_snapshot'
$ svn up
Updated to revision 544137.
$ VERBOSE=1 make 2>&1 | tee log
makeobj[0]: Entering directory `/devel/kde/build/4/kdelibs4_snapshot'
/devel/other/inst/bin/cmake -H/devel/kde/src/4/kdelibs4_snapshot -B/devel/kde/build/4/kdelibs4_snapshot --check-build-system CMakeFiles/Makefile.cmake 0
Re-run cmake file: Makefile older than: /devel/kde/src/4/kdelibs4_snapshot/CMakeLists.txt
-- Found Qt-Version 4.1.3-snapshot-20060502
[...]
-- Generating done
-- Build files have been written to: /devel/kde/build/4/kdelibs4_snapshot
/usr/bin/make -f CMakeFiles/Makefile2 all
[...]
/usr/bin/make -f kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/build.make kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/depend
make[2]: Entering directory `/devel/kde/build/4/kdelibs4_snapshot'
make[2]: Nothing to be done for `kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/depend'.
make[2]: Leaving directory `/devel/kde/build/4/kdelibs4_snapshot'
/usr/bin/make -f kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/build.make kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/build
make[2]: Entering directory `/devel/kde/build/4/kdelibs4_snapshot'
make[2]: *** No rule to make target `/devel/kde/src/4/kdelibs4_snapshot/kdecore/ksortablevaluelist.h', needed by `kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/resourcefileplugin.o'. Stop.
make[2]: Leaving directory `/devel/kde/build/4/kdelibs4_snapshot'
make[1]: *** [kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/all] Error 2
make[1]: Leaving directory `/devel/kde/build/4/kdelibs4_snapshot'
make: *** [all] Error 2
makeobj[0]: Leaving directory `/devel/kde/build/4/kdelibs4_snapshot'
$ grep sortable kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/depend.*
kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/depend.internal: /devel/kde/src/4/kdelibs4_snapshot/kdecore/ksortablevaluelist.h
kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/depend.make:kabc/plugins/file/CMakeFiles/kabc_file_plugin.dir/resourcefileplugin.o: /devel/kde/src/4/kdelibs4_snapshot/kdecore/ksortablevaluelist.h
It must be an indirect dependency, there is nothing in kabc/plugins/file/ that includes any ksortable*.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the Kde-buildsystem
mailing list