<div dir="ltr">Hi Tim,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 5:57 AM, Tim Sutton <span dir="ltr"><<a href="mailto:lists@linfiniti.com" target="_blank">lists@linfiniti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Larry<div><br></div><div>I finally have the time to sit down and try to get your recipe for building / debugging QGIS under QtCreator a try, but I cant seem to find your notes on this. I have two screenies showing some of the settings but not quite enough info to get it working. Currently I am getting this (see [2] below) output when trying to run cmake in QtCreator. I am building using options in [1].</div>
<div><br></div><div>I also made this dirty hack so that some python libs could be found [3].</div><div><br></div><div>Can you point me in the right direction of any notes etc you have?</div></div></blockquote><div><br></div>
<div>I will add documentation about this to the site [0]. I have been debugging this setup and now having it working smoothly on Mac 10.7.5 and 10.9.2. You can use the following notes for now and we can work on making the online docs better, eventually including it in INSTALL somehow.<br>
<br></div><div>Basic instructions:<br><br></div><div>1) Ensure deps are installed:<br><br>Install required build Python modules (use pip on system or Homebrew's pip when using its Python). You can also tap homebrew/python for some more complex modules [1]:<br>
</div><div><br>* numpy <-- this is used by gdal.rb install, if building with python option, which is the default<br><br></div><div>$ brew tap homebrew/science<br></div><div>$ brew tap dakcarto/osgeo4mac<br></div><div>
$ brew install qgis-22 --only-dependencies --with-grass --with-globe [--with-oracle]<br><br></div><div>Install required run-time Python modules : <br><br>* psycopg2 matplotlib pyparsing<br></div><div><br></div><div>2) Copy the following directory elsewhere and use it from there: HOMEBREW_PREFIX/Library/Taps/dakcarto-osgeo4mac/scripts<br>
<br>Note: it's important to not edit the scripts where they are located, in
the tap, because it is a git repo. You should keep that working tree
clean so that `brew update` always works.<br><br>Open and review scripts:<br><br>* qgis-cmake-options.py - for generating CMake option string for use in Qt Creator when built off dependencies from homebrew-osgeo4mac tap. Edit CMake options to suit your build needs. Note, the current script usually has CMake options for building
QGIS with *all* options that the current Homebrew formula, e.g. qgis-22, supports, which can include things like Oracle support, etc. You will probably want to edit it and comment out such lines for an initial build. I add this as an external tool in Qt Creator [2].<br>
<br>* qgis-set-app-env.py - for setting env vars in dev build and installed QGIS.app, to ensure they are available on double-click run. Needs to stay in the same directory as the next scripts.<br></div><div><br>* qgis-creator-build.sh - sets up the build environ and ensures the QGIS.app in the build directory can find resources, so it can run from there.<br>
<br>* qgis-creator-install.sh - installs the app and ensures QGIS.app has proper env variables, so it can be moved around on the filesystem. Currently QGIS.app bundling beyond QGIS_MACAPP_BUNDLE=0 is not supported.<br></div>
<div><br></div><div>3) Configure a Creator Qt version and kit [3, 4].<br><br></div><div>4) Configure Creator project with prepended environment variables and to use the build and install scripts [5].<br></div><div><br></div>
<div>This whole setup supports builds where the OSGeo4Mac deps are in a non-standard Homebrew location, e.g. /usr/local/osgeo4mac or /opt/osgeo4mac, instead of /usr/local. This allows for multiple build scenarios, including placing the deps on an external drive, though that requires building all deps with special 'bottle' parameters.<br>
</div><div><br></div><div>I've tried to make the setup as simple and flexible as possible, though I'm sure it can use some work.<br><br>Let me know how it goes! :-)<br></div><div><br>[0] <a href="https://github.com/dakcarto/homebrew-osgeo4mac">https://github.com/dakcarto/homebrew-osgeo4mac</a><br>
[1] <a href="https://github.com/Homebrew/homebrew-python">https://github.com/Homebrew/homebrew-python</a><br><br>In screen snaps, substitute the appropriate directories for your setup, as per notes above:<br>[2] <a href="http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_QGIS-CMakeOptions.png">http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_QGIS-CMakeOptions.png</a><br>
[3] <a href="http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_Kits.png">http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_Kits.png</a><br>[4] <a href="http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_QtVersions.png">http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_QtVersions.png</a><br>
[5] <a href="http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_QGIS-Project.png">http://drive.dakotacarto.com/osgeo4mac/QtCreator_osgeo4mac_QGIS-Project.png</a><br><br><br></div><div>Regards,<br><br></div><div>Larry<br>
<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Regards</div>
<div><br></div><div>Tim</div><div><br></div><div>[1]</div><div><br></div><div>-DCMAKE_INSTALL_PREFIX="/Users/timlinux/Applications/" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DWITH_ASTYLE=FALSE -DENABLE_TESTS=TRUE -DWITH_INTERNAL_SPATIALITE=FALSE -DWITH_PYSPATIALITE=FALSE -DSPATIALINDEX_INCLUDE_DIR=/usr/local/include/spatialindex -DSPATIALINDEX_LIBRARY=/usr/local/Cellar/libspatialite/4.1.1/libspatialindex.dylib -DQWT_LIBRARY=/usr/local/Cellar/qwt/6.1.0/lib/qwt.framework/Versions/Current/qwt -DQWT_INCLUDE_DIR=/usr/local/Cellar/qwt/6.1.0/lib/qwt.framework/Versions/Current/Headers/ -DBISON_EXECUTABLE=/usr/local/Cellar/bison/3.0.2/bin/bison -DWITH_MAPSERVER=TRUE -DWITH_APIDOC=FALSE -DQGIS_MACAPP_BUNDLE=2 -DSIP_BINARY_PATH=/usr/local/bin -DPYTHON_LIBRARIES=/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -DWITH_MAPSERVER=False<br>
</div><div><br></div><div>[2]</div><div><br></div><div>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)">CMake Error: The following variables are used in this project, but they are set to NOTFOUND.</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)">Please set them or make sure they are set and tested correctly in the CMake files:</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)">QWTPOLAR_INCLUDE_DIR</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"> used as include directory in directory /Users/timlinux/dev/cpp/QGIS/src/app</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"> used as include directory in directory /Users/timlinux/dev/cpp/QGIS/src/app</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"> used as include directory in directory /Users/timlinux/dev/cpp/QGIS/src/app</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)">QWTPOLAR_LIBRARY</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"> linked by target "QGIS" in directory /Users/timlinux/dev/cpp/QGIS/src/app</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"> linked by target "qgis_app" in directory /Users/timlinux/dev/cpp/QGIS/src/app</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"> linked by target "qgis_qgisappclipboard" in directory /Users/timlinux/dev/cpp/QGIS/tests/src/app</span></p>
<p style="margin:0px;font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)"><br></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)">/usr/bin/python: can't open file '_find_qsci_py-NOTFOUND': [Errno 2] No such file or directory</span></p>
<p style="margin:0px"><span style="font-family:Monaco;font-size:13pt;font-weight:600;color:rgb(170,0,0)">/usr/bin/python: can't open file '_find_pyqt_py-NOTFOUND': [Errno 2] No such file or directory</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- QGIS version: 2.3.0 Master (20300)</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Could not find GRASS</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Proj: /usr/local/lib/libproj.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found GEOS: /usr/local/Cellar/geos/3.4.2/lib/libgeos_c.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found GDAL: /usr/local/Cellar/gdal/1.10.1/lib/libgdal.dylib (1.10.1)</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Expat: /usr/local/lib/libexpat.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Spatialindex: /usr/local/Cellar/libspatialite/4.1.1/libspatialindex.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Qwt: /usr/local/Cellar/qwt/6.1.0/lib/qwt.framework/Versions/Current/qwt (6.1.0)</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Sqlite3: /usr/lib/libsqlite3.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found PostgreSQL: /usr/local/Cellar/postgresql/9.3.2/lib/libpq.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found SpatiaLite: /usr/local/lib/libspatialite.dylib</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Qt version: 4.8.6</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Touch support disabled</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found QScintilla2: /usr/local/lib/libqscintilla2.dylib (2.8)</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Pedantic compiler settings enabled</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Debug output enabled</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Python executable: /usr/bin/python</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Python version: 2.7.5</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found Python library: -framework Python</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found SIP version: 4.15.4</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Found GSL: -L/usr/local/Cellar/gsl/1.16/lib -lgsl -lgslcblas</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- txt2tags not found - disabled</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Ctest Binary Directory set to: /Users/timlinux/dev/cpp/QGIS/build-osx/output/bin</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">-- Configuring incomplete, errors occurred!</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">See also "/Users/timlinux/dev/cpp/QGIS/build-osx/CMakeFiles/CMakeOutput.log".</span></p>
<p style="margin:0px"><span style="font-size:13pt;font-family:Monaco">See also "/Users/timlinux/dev/cpp/QGIS/build-osx/CMakeFiles/CMakeError.log".</span></p>
<p style="font-size:13pt;font-family:Monaco;margin:0px"><br></p><div>[3]</div><div><br></div><div>
<p>Tims-MacBook-Pro:QGIS timlinux$ git diff</p>
<p>diff --git a/cmake/FindPyQt.py b/cmake/FindPyQt.py</p>
<p>index 256c4a6..b658cde 100644</p>
<p>--- a/cmake/FindPyQt.py</p>
<p>+++ b/cmake/FindPyQt.py</p>
<p>@@ -29,6 +29,7 @@</p>
<p> # Copyright (c) 2007, Simon Edwards <<a href="mailto:simon@simonzone.com" target="_blank">simon@simonzone.com</a>></p>
<p> # Redistribution and use is allowed according to the terms of the BSD license.</p>
<p> # For details see the accompanying COPYING-CMAKE-SCRIPTS file.</p>
<p>+import sys</p>
<p> </p>
<p> import PyQt4.pyqtconfig</p>
<p> </p>
<p>diff --git a/cmake/FindSIP.py b/cmake/FindSIP.py</p>
<p>index e291baa..7eb8d68 100644</p>
<p>--- a/cmake/FindSIP.py</p>
<p>+++ b/cmake/FindSIP.py</p>
<p>@@ -31,6 +31,8 @@</p>
<p> # For details see the accompanying COPYING-CMAKE-SCRIPTS file.</p>
<p> </p>
<p> import sys</p>
<p>+sys.path.append('/usr/local/lib/python2.7/site-packages/')</p>
<p>+print sys.path</p>
<p> import sipconfig</p>
<p> </p>
<p> sipcfg = sipconfig.Configuration()</p><span class=""><font color="#888888"><p><br></p><p><br></p><p><br></p></font></span></div><span class=""><font color="#888888"><div><br></div><div><br></div>-- <br><div dir="ltr">
Tim Sutton - QGIS Project Steering Committee Member<br>
==============================================<br>Please do not email me off-list with technical<br>support questions. Using the lists will gain<br>more exposure for your issues and the knowledge<br>surrounding your issue will be shared with all.<br>
<br>Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>==============================================</div>
</font></span></div></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br></div></div>