{"action":"closed","issue":{"url":"https://api.github.com/repos/OSGeo/homebrew-osgeo4mac/issues/396","repository_url":"https://api.github.com/repos/OSGeo/homebrew-osgeo4mac","labels_url":"https://api.github.com/repos/OSGeo/homebrew-osgeo4mac/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/OSGeo/homebrew-osgeo4mac/issues/396/comments","events_url":"https://api.github.com/repos/OSGeo/homebrew-osgeo4mac/issues/396/events","html_url":"https://github.com/OSGeo/homebrew-osgeo4mac/issues/396","id":335219286,"node_id":"MDU6SXNzdWUzMzUyMTkyODY=","number":396,"title":"Install QGIS 3.2 Bonn","user":{"login":"fjperini","id":21315242,"node_id":"MDQ6VXNlcjIxMzE1MjQy","avatar_url":"https://avatars0.githubusercontent.com/u/21315242?v=4","gravatar_id":"","url":"https://api.github.com/users/fjperini","html_url":"https://github.com/fjperini","followers_url":"https://api.github.com/users/fjperini/followers","following_url":"https://api.github.com/users/fjperini/following{/other_user}","gists_url":"https://api.github.com/users/fjperini/gists{/gist_id}","starred_url":"https://api.github.com/users/fjperini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjperini/subscriptions","organizations_url":"https://api.github.com/users/fjperini/orgs","repos_url":"https://api.github.com/users/fjperini/repos","events_url":"https://api.github.com/users/fjperini/events{/privacy}","received_events_url":"https://api.github.com/users/fjperini/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-06-24T22:45:56Z","updated_at":"2018-08-02T11:35:21Z","closed_at":"2018-08-02T11:35:21Z","author_association":"NONE","body":"**QGIS 3.2 Bonn on macOS with Homebrew**\r\n\r\n`$ brew tap qgis/qgisdev`\r\n\r\nOr install via URL (which will not receive updates):\r\n\r\n`brew install https://raw.githubusercontent.com/qgis/homebrew-qgisdev/master/Formula/qgis3-dev.rb`\r\n\r\nAnother solution is to copy all the content directly to: `../Taps/qgis/homebrew-qgisdev`\r\n\r\n`$ cd /usr/local/Homebrew/Library/Taps/qgis/homebrew-qgisdev`\r\n\r\n`$ git checkout -b matplotlib-fix+python`\r\n\r\n`$ brew edit qgis3-dev`\r\n\r\nFix for matplotlib and python. Change to:\r\n\r\n```\r\nurl \"https://github.com/qgis/QGIS.git\", :branch => \"release-3_2\"\r\nversion “3.2.0\"\r\n```\r\n\r\n```\r\ndepends_on “python\"`\r\n```\r\n\r\n```\r\n# depends_on \"homebrew/science/matplotlib\" # deprecated\r\ndepends_on \"brewsci/bio/matplotlib\"\r\n```\r\n\r\n`$ git add Formula/qgis3-dev.rb`\r\n\r\n`$ git commit -m \"fix for matplotlib and python”`\r\n\r\n\r\nSee [changes](https://github.com/fjperini/homebrew-qgisdev/blob/matplotlib-fix%2Bpython/Formula/qgis3-dev.rb). You can copy the entire file to make sure.\r\n\r\nFor, `ImportError: No module named site`\r\n\r\n`$ brew install pyqt`\r\n\r\n`$ brew install bison`\r\n\r\n```\r\n> $ python --version\r\nPython 3.6.5\r\n```\r\n\r\n```\r\n> $ python3 --version\r\nPython 3.6.5\r\n```\r\n\r\n```\r\n> $ python2 --version\r\nPython 2.7.15\r\n```\r\n\r\nModify the file `/usr/local/bin/pyrcc5` and change `pythonw2.7` to `python3`: \r\n\r\n```\r\n#!/bin/sh\r\nexec python3 -m PyQt5.pyrcc_main ${1+\"$@\"}\r\n```\r\n\r\nBuild and install\r\n\r\n`$ brew install proj` # `--build-from-source`\r\n\r\nProj v5.1.0 # With Proj v4: Library not loaded: libproj.13.dylib\r\n\r\n`$ brew install libspatialite` # `--build-from-source`\r\n\r\n`$ brew install libgeotiff` # `--build-from-source`\r\n\r\n`$ brew install osgeo/osgeo4mac/gdal2` # recommended. Other: `gdal`\r\n\r\nYou can use the options:\r\n\r\n `--with-complete` `--with-unsupported` `--with-armadillo` `--with-libkml` `--with-opencl`\r\n`--with-postgresql` `--with-java` `--with-swig-java`\r\n\r\nIt is necessary to uninstall `ccache` if you have `llvm`.\r\n\r\n`$ brew install -v --no-sandbox qgis3-dev --with-grass  --with-saga-gis-lts`  # other:  `--with-r` `--with-3d`\r\n\r\nIt can stop at the end of the `gdal2` installation, for that reason we installed it before. If it stops, just rerun the above command to continue with the installation of QGIS.\r\n\r\nThe same thing happens in Travis CI [(PR)](https://github.com/qgis/homebrew-qgisdev/pull/69) when doing a pull request.\r\n\r\n```console\r\n==> Installing qgis/qgisdev/qgis3-dev dependency: osgeo/osgeo4mac/gdal2\r\n==> Downloading https://dl.bintray.com/homebrew-osgeo/osgeo-bottles/gdal2-2.3.0.\r\n==> Pouring gdal2-2.3.0.sierra.bottle.tar.gz\r\n==> Caveats\r\nPlugins for this version of GDAL/OGR, generated by other formulae, should\r\nbe symlinked to the following directory:\r\n  /usr/local/lib/gdalplugins/2.3\r\nYou may need to set the following enviroment variable:\r\n  export GDAL_DRIVER_PATH=/usr/local/lib/gdalplugins\r\nPYTHON BINDINGS are now built in a separate formula: gdal2-python\r\nThis formula is keg-only, which means it was not symlinked into /usr/local,\r\nbecause older version of gdal is in main tap and installs similar components.\r\nIf you need to have this software first in your PATH run:\r\n  echo 'export PATH=\"/usr/local/opt/gdal2/bin:$PATH\"' >> ~/.bash_profile\r\nFor compilers to find this software you may need to set:\r\n    LDFLAGS:  -L/usr/local/opt/gdal2/lib\r\n    CPPFLAGS: -I/usr/local/opt/gdal2/include\r\nFor pkg-config to find this software you may need to set:\r\n    PKG_CONFIG_PATH: /usr/local/opt/gdal2/lib/pkgconfig\r\n==> Summary\r\n🍺  /usr/local/Cellar/gdal2/2.3.0: 231 files, 45.9MB\r\nThe command \"./travis/install.sh\" failed and exited with 1 during .\r\nYour build has been stopped.\r\n/Users/travis/.travis/job_stages: line 187: shell_session_update: command not found\r\n```\r\nSuggestions to correct it?\r\n\r\nIf `v2` is installed, change the name of `QGIS.app` to `QGIS 2.app`\r\n\r\nAfter finish building QGIS, move the app from the Homebrew Cellar to the `/Applications` folder.\r\n\r\n`$ mv /usr/local/opt/qgis3-dev/QGIS.app /Applications/QGIS.app`\r\n\r\n`$ ln -s /Applications/QGIS.app /usr/local/opt/qgis3-dev/QGIS.app`\r\n\r\nTo run\r\n\r\nGRASS: `$ grass74` # in the installation: `ln -s ../Cellar/grass7/7.4.0/bin/grass74 /usr/local/bin/grass74`\r\n\r\nSAGA:  `$ saga_gui` # create a direct link : `ln -s ../Cellar/saga-gis-lts/2.3.2/bin/saga_gui /usr/local/bin/saga_gui`\r\n\r\nIf you intend to create the `SAGA.app` package, using `saga-gis-lts --with-app` will fail:\r\n\r\n```console\r\n/bin/sh ../../../libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H -I. -I../../..    -fPIC -Wall `wx-config --unicode=yes --cxxflags base` -D_SAGA_LINUX -D_SAGA_UNICODE -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_API_EXPORTS     -g -O2 -c -o table_io.lo table_io.cpp\r\nlibtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../.. -fPIC -Wall -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DwxUSE_GUI=0 -D_SAGA_LINUX -D_SAGA_UNICODE -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_API_EXPORTS -g -O2 -c shapes_polygons.cpp -o shapes_polygons.o >/dev/null 2>&1\r\ntable.cpp:904:16: error: ordered comparison between pointer and zero ('CSG_Table_Record **' and 'int')\r\n        if( m_Records > 0 )\r\n            ~~~~~~~~~ ^ ~\r\n1 error generated.\r\nmake[3]: *** [table.lo] Error 1\r\nmake[3]: *** Waiting for unfinished jobs....\r\nlibtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../.. -fPIC -Wall -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DwxUSE_GUI=0 -D_SAGA_LINUX -D_SAGA_UNICODE -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_API_EXPORTS -g -O2 -c table_dbase.cpp  -fno-common -DPIC -o .libs/table_dbase.o\r\nlibtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../.. -fPIC -Wall -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DwxUSE_GUI=0 -D_SAGA_LINUX -D_SAGA_UNICODE -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_API_EXPORTS -g -O2 -c table_io.cpp  -fno-common -DPIC -o .libs/table_io.o\r\nlibtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../.. -fPIC -Wall -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DwxUSE_GUI=0 -D_SAGA_LINUX -D_SAGA_UNICODE -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_API_EXPORTS -g -O2 -c table_dbase.cpp -o table_dbase.o >/dev/null 2>&1\r\nlibtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../.. -fPIC -Wall -I/usr/local/lib/wx/include/osx_cocoa-unicode-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -DwxUSE_GUI=0 -D_SAGA_LINUX -D_SAGA_UNICODE -D_TYPEDEF_BYTE -D_TYPEDEF_WORD -D_SAGA_API_EXPORTS -g -O2 -c table_io.cpp -o table_io.o >/dev/null 2>&1\r\nmake[2]: *** [install-recursive] Error 1\r\nmake[1]: *** [install-recursive] Error 1\r\nmake: *** [install-recursive] Error 1\r\n```\r\nThat formula no longer compiles on High Sierra due to its age and recent updates to the MacOS compiler. Build it without --with-app, isn't needed for QGIS integration. [[Commented here]](https://github.com/OSGeo/homebrew-osgeo4mac/issues/396#issuecomment-400054815)\r\n\r\nThere is also the package `saga-gis` where it is reported:\r\n\r\n`\r\nkeg_only \"QGIS fails to load the correct SAGA version, if the latest version is in the path\"\r\n`\r\n\r\nFor `GRASS.app`, it is not available in `grass7`.\r\n\r\nThe `grass7` package can also be installed with `--with-netcdf`.\r\n\r\nTo solve the integration problem of `R in QGIS` see this [post](https://gis.stackexchange.com/questions/200793/integrating-r-in-qgis-with-mac-os-el-captain-missing-dependencies). Suggestions for this?\r\n\r\nReferences:\r\n\r\n[http://luisspuerto.net/2018/03/qgis-on-macos-with-homebrew/](http://luisspuerto.net/2018/03/qgis-on-macos-with-homebrew/)\r\n\r\n[https://grasswiki.osgeo.org/wiki/Compiling_on_MacOSX_using_homebrew](https://grasswiki.osgeo.org/wiki/Compiling_on_MacOSX_using_homebrew)\r\n\r\n[https://sourceforge.net/p/saga-gis/wiki/Compiling%20SAGA%20on%20Mac%20OS%20X/](https://sourceforge.net/p/saga-gis/wiki/Compiling%20SAGA%20on%20Mac%20OS%20X/)\r\n\r\n[https://github.com/qgis/homebrew-qgisdev/issues/62](https://github.com/qgis/homebrew-qgisdev/issues/62) / [https://github.com/qgis/homebrew-qgisdev/issues/64](https://github.com/qgis/homebrew-qgisdev/issues/64) / [https://github.com/qgis/homebrew-qgisdev/issues/66](https://github.com/qgis/homebrew-qgisdev/issues/66)\r\n"}}
{"actor":{"display_login":"fjperini"}}