CMake: target inkscape_version fails to rebuild with out-of-tree build

Bug #1543304 reported by su_v on 2016-02-08
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Mc

Bug Description

Building with cmake outside of the checkout / branch directory fails to regenerate the version information (used in src/main.cpp and src/ui/dialog/aboutbox.cpp).

Touching the two files in the source tree before triggering a rebuild after pulling a new revision is not sufficient - it is necessary to manually remove the generated src/inkscape-version.cpp* files in the build directory to enforce up-to-date rev no for the current build.

Reproduced with rev 14640 on OS X 10.7.5 (CMake 3.4.1).

su_v (suv-lp) on 2016-02-08
description: updated
Mc (mc...) wrote :

fixed in r14785

Changed in inkscape:
status: New → Fix Committed
assignee: nobody → Mc (mc...)
su_v (suv-lp) wrote :

Not fixed - clean build completely outside of the inkscape branch (r14791):

$ pwd
/path/to/inkscape-repo
$ bzr branch lp:inkscape cmake-test
$ mkdir cmake-build
$ cd cmake-build
$ cmake ../cmake-test -DCMAKE_INSTALL_PREFIX=/path/to/inkscape-repo/cmake-install
<...>
------------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/inkscape-repo/cmake-build
$ make -j 4
<...>
[ 19%] Building CXX object src/CMakeFiles/inkscape_base.dir/display/canvas-grid.cpp.o
[ 19%] Building CXX object src/libnrtype/CMakeFiles/nrtype_LIB.dir/nr-type-primitives.cpp.o
[ 19%] Building CXX object src/2geom/CMakeFiles/2geom_LIB.dir/sbasis-poly.cpp.o
[ 19%] Building CXX object src/libnrtype/CMakeFiles/nrtype_LIB.dir/TextWrapper.cpp.o
Scanning dependencies of target inkscape_version
[ 19%] Building CXX object src/2geom/CMakeFiles/2geom_LIB.dir/sbasis-roots.cpp.o
revision is 14791
CMake Error: File /path/to/inkscape-repo/cmake-build/src/inkscape-version.cpp.in does not exist.
CMake Error at /path/to/inkscape-repo/cmake-test/CMakeScripts/inkscape-version.cmake:20 (configure_file):
  configure_file Problem configuring file

make[2]: *** [src/CMakeFiles/inkscape_version] Error 1
make[1]: *** [src/CMakeFiles/inkscape_version.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 19%] Building CXX object src/CMakeFiles/inkscape_base.dir/display/canvas-temporary-item-list.cpp.o
[ 19%] Building CXX object src/2geom/CMakeFiles/2geom_LIB.dir/sbasis-to-bezier.cpp.o
[ 19%] Linking CXX static library ../../lib/libnrtype_LIB.a
[ 19%] Built target nrtype_LIB
[ 19%] Building CXX object src/2geom/CMakeFiles/2geom_LIB.dir/sbasis.cpp.o
<...>
[ 80%] Building CXX object src/CMakeFiles/inkscape_base.dir/uri-references.cpp.o
[ 80%] Building CXX object src/CMakeFiles/inkscape_base.dir/uri.cpp.o
[ 80%] Building CXX object src/CMakeFiles/inkscape_base.dir/vanishing-point.cpp.o
[ 81%] Building CXX object src/CMakeFiles/inkscape_base.dir/verbs.cpp.o
make[2]: *** No rule to make target `src/inkscape-version.cpp', needed by `src/CMakeFiles/inkscape_base.dir/inkscape-version.cpp.o'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 81%] Building CXX object src/CMakeFiles/inkscape_base.dir/version.cpp.o
make[1]: *** [src/CMakeFiles/inkscape_base.dir/all] Error 2
make: *** [all] Error 2

real 14m24.769s
user 46m17.971s
sys 3m5.849s
$

Mc (mc...) on 2016-04-12
Changed in inkscape:
status: Fix Committed → In Progress
Mc (mc...) wrote :

Should be ok in r14811

Changed in inkscape:
status: In Progress → Fix Committed
Jabiertxof (jabiertxof) wrote :

This bug afect me on r14864:

make[2]: *** No hay ninguna regla para construir el objetivo 'src/inkscape-version.cpp', necesario para 'src/CMakeFiles/inkscape_base.dir/inkscape-version.cpp.o'. Alto.
CMakeFiles/Makefile2:629: fallo en las instrucciones para el objetivo 'src/CMakeFiles/inkscape_base.dir/all'
make[1]: *** [src/CMakeFiles/inkscape_base.dir/all] Error 2
Makefile:127: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 2

Jabiertxof (jabiertxof) wrote :

In english:

[ 21%] Built target nrtype_LIB
make[2]: *** No rule to make target 'src/inkscape-version.cpp', needed by 'src/CMakeFiles/inkscape_base.dir/inkscape-version.cpp.o'. Stop.
CMakeFiles/Makefile2:629: recipe for target 'src/CMakeFiles/inkscape_base.dir/all' failed
make[1]: *** [src/CMakeFiles/inkscape_base.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Jabiertxof (jabiertxof) wrote :

Trying again with a clean source compile ok.
Not sure why this second attemp compile ok. diferences I made directly a make install -without -j and without first make-
And the others is the custom prefix Im using is not created.

Thanks Shlomi.

Changed in inkscape:
milestone: none → 0.92
importance: Undecided → High
Bryce Harrington (bryce) on 2017-01-10
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers