[Qgis-developer] Cmake and the unhappy python build (was: cannot find FLEX problem ...)

Martin Dobias wonder.sk at gmail.com
Mon Apr 9 11:53:40 EDT 2007


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 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?

> According to the Wiki, it should find the qgis core libraries.  I've
> set LD_LIBRARY_PATH:
>
> mcoletti at mcolettib886:~/projects/qgis> echo $LD_LIBRARY_PATH
> /home/mcoletti/lib
>
>
> And that directory contains the qgis core library it's whining about:
>
> mcoletti at mcolettib886:~/projects/qgis> ll $LD_LIBRARY_PATH/*core.so
> -rwxr-xr-x 1 mcoletti users 15760584 2007-04-06 17:48 /home/mcoletti/lib/libqgis_core.so

Setting LD_LIBRARY_PATH won't help - it expects the library to be
directly in your build directory - the path is hardcoded in the
generated custom 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.)

Martin



More information about the Qgis-developer mailing list