homebrew-osgeo4mac: qgis-214 fails to install on 10.11, looking for Qt 4.x

just upgraded to El Capitan. QGIS was working on 10.9 before. Trying to reinstall after if wouldn’t open after the upgrade. It fails with an error saying that it is looking for Qt4. I have both the qt and qt5 formulae installed. I tried uninstalling qt5 and then installing qgis-214, but it installed qt5 as a dependency. Tried to build from source by issuing command --without-grass also gave same error.

`Warning: Calling Formula.path is deprecated!
Use Formulary.core_path instead.
/usr/local/Library/Taps/osgeo/homebrew-osgeo4mac/Requirements/qgis_requirements.rb:25:in `block in no_linked_qgis'
Please report this to the osgeo/osgeo4mac tap!

==> cmake .. -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG
Last 15 lines from /Users/bluebird/Library/Logs/Homebrew/qgis-214/01.cmake:
-- Looking for gaiaDropTable in /usr/local/lib/libspatialite.dylib
-- Looking for gaiaDropTable in /usr/local/lib/libspatialite.dylib - found
-- Looking for gaiaStatisticsInvalidate in /usr/local/lib/libspatialite.dylib
-- Looking for gaiaStatisticsInvalidate in /usr/local/lib/libspatialite.dylib - found
-- Looking for spatialite_init_ex in /usr/local/lib/libspatialite.dylib
-- Looking for spatialite_init_ex in /usr/local/lib/libspatialite.dylib - found
CMake Error at /usr/local/Cellar/cmake/3.6.1/share/cmake/Modules/FindQt4.cmake:1328 (message):
  Found unsuitable Qt version "5.6.1" from /usr/local/opt/qt5/bin/qmake, this
  code requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:272 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/tmp/qgis-214-20160822-55008-x1uhv0/QGIS-final-2_14_3/build/CMakeFiles/CMakeOutput.log".`

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 28 (9 by maintainers)

Most upvoted comments

I solved it on my end by editing the qgis-214.rb Formula to depends_on a specific URL instead of qscintilla2:

diff --git a/Formula/qgis-214.rb b/Formula/qgis-214.rb
index a1898c6..2b4edfe 100644
--- a/Formula/qgis-214.rb
+++ b/Formula/qgis-214.rb
@@ -70,7 +70,7 @@ class Qgis214 < Formula
   depends_on SipBinary
   depends_on PyQtConfig
   depends_on "qca"
-  depends_on "qscintilla2" # will probably be a C++ lib deps in near future
+  depends_on "https://raw.githubusercontent.com/Homebrew/homebrew-core/c630d7bdd17530799fc5fce69a92312da6e2bf08/Formula/qscintilla2.rb" # will probably be a C++ lib deps in near future
   depends_on "qwt"
   depends_on "qwtpolar"
   depends_on "gsl"

After that, brew install qgis-214 seems to be progressing without a problem.

@christianbraun what is the error that brew audit --strict qgis-214 is throwing? Nothing here on 10.11.6. Have you done a brew update?

@ecerrillo and @christianbraun you are receiving those errors because your tap repo is in an incomplete merging state, e.g.:

<<<<<<< Updated upstream
...
>>>>>>> Stashed changes

are indications that either Homebrew has failed at auto-updating your brew install or you have custom changes in your working tree (like edits to qgis-214) that could not be auto-merged.

With latest Homebrew go to $(brew --prefix)/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac then issue git status and git diff to see what state your tap repo is in. (NOTE: latest Homebrew adds Homebrew subdirectory to that path before Library now.)

Try building with latest commits (tested on 10.11.6), which introduce a qscintilla2-qt4 formula to fix this, since upstream at Homebrew seems to not be interested in maintaining Qt4 support once macOS 10.12 lands (a reasonable point to fully deprecate Qt4).

Running brew switch qscintilla2 2.9.3 seems to have done the business for me.