qgis212 build failure (2.12.2) SOLVED

qgis212-py27 build fails.

fatal: Not a git repository (or any of the parent directories): .git
make[2]: *** [qgsversion.h] Error 128
make[1]: *** [CMakeFiles/version.dir/all] Error 2



  • https://hub.qgis.org/issues/13680

  • https://trac.macports.org/ticket/49769

  • and its Portfile (https://trac.macports.org/browser/trunk/dports/gis/qgis/Portfile)



-D GIT_MARKER=GIT_MARKER-NOTFOUND


or

echo '#define QGSVERSION "exported"' >qgsversion.h


helps. GIS solution may prevent other potential issues.