[Qgis-developer] Cmake and the unhappy python build

Mark Coletti mcoletti at lychnobite.org
Tue Apr 10 16:13:11 EDT 2007

On Mon, Apr 09, 2007 at 05:53:40PM +0200, Martin Dobias wrote:
> On 4/7/07, Mark Coletti <mcoletti at lychnobite.org> wrote:
> >
> >mcoletti at mcolettib886:~/projects/qgis> make
> >[  0%] Built target svnversion
> >[  9%] Built target ui
> >[ 27%] Built target qgis_core
> >[ 33%] Built target qgis_gui
> >[ 65%] Built target qgis
> >[ 69%] Built target translations
> >make[2]: *** No rule to make target `src/core/libqgis_core.so', needed by 
> >`python/core/Makefile'.  Stop.
> >make[1]: *** [python/CMakeFiles/python.dir/all] Error 2
> >make: *** [all] Error 2
> Hi Mark,
> let's explain a bit how does process of building python bindings work:
> 1. wrapper source files are generated from *.sip files (using sip utility)
> 2. custom makefiles are created for building the python modules (using
> sip utility)
> 3. makefiles are run from cmake build system <-- here it comes to your 
> problem

  I'm curious to know whether the sip generated Makefiles will be
  clobbered by cmake.

  In any case, this is the only Makefile in the entire 'qgis/python'

mcoletti at mcolettib886:~/projects/qgis> find python/ -name "Makefile"

  And it appears to be created via CMake:

mcoletti at mcolettib886:~/projects/qgis> head python/Makefile
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.4

  So there does not exist in that hierarchy any make files generated
  via sip.

> I'm wondering why it complains that src/core/libqgis_core.so library
> is missing - what's the name of the output file which is built in
> qgis_core target?

  Target from which Makefile?  Certainly not from the aforementioned
  CMake generated Makefile found in 'qgis/python':

mcoletti at mcolettib886:~/projects/qgis> grep qgis_core python/Makefile
mcoletti at mcolettib886:~/projects/qgis>

  I.e., ain't no such target in that Makefile.


> Btw. preferred way how to build QGIS with cmake is to use out of
> source builds. There should be no difference but it doesn't pollute
> sources with any generated files and it's simpler to do a complete
> clean or have more builds at once (Debug/Release, with/without GRASS
> etc.)

  I'm confused by your phrase "out of source builds."  I'm using
  subversion to check out the latest source from HEAD and am building
  from that and not from source from a distribution tarball or from a
  non-HEAD subversion branch.  Is that to what you're referring?



More information about the Qgis-developer mailing list