OSGeo / homebrew-osgeo4mac

Mac homebrew tap for maintaining a stable work environment for the OSGeo.org geospatial toolset
https://git.io/fhh3X
BSD 3-Clause "New" or "Revised" License
364 stars 111 forks source link

QGIS fails to load in Mojave #1244

Closed jd-lara closed 4 years ago

jd-lara commented 5 years ago

Please answers the following

I've...

Describe the bug

I can successfully build QGIS 3.8 and also did all the steps in the troubleshooting to manage the PyQT5 dependencies. Please see the brew info qgis output.

image

Also, see the version of PyQT linked

image

However, I can't get QGIS to load properly, gives me this error and doesn't load any of the vector tools from gdal.

image

This is my install output

brew install osgeo-qgis
==> Installing osgeo-qgis from osgeo/osgeo4mac

==> Downloading https://bottle.download.osgeo.org/osgeo-qgis-3.8.0_1.mojave.bott
Already downloaded: /Users/jdlara/Library/Caches/Homebrew/downloads/0c14701255bc8fe05727ccc5a90a091ab44feea33144b1f9bd231453716fe4a5--osgeo-qgis-3.8.0_1.mojave.bottle.tar.gz
==> Pouring osgeo-qgis-3.8.0_1.mojave.bottle.tar.gz
Warning: osgeo/osgeo4mac/osgeo-qgis dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
GRASS 7 GrassUtils.py already updated
Whitebox Tools whiteboxProvider.py already updated
TauDEM taudemProvider.py already updated
LAStools LAStoolsProvider.py already updated
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall osgeo/osgeo4mac/osgeo-qgis`
==> Caveats

QGIS is built as an application bundle. Environment variables for the
Homebrew prefix are embedded in QGIS.app:

  /usr/local/opt/osgeo-qgis/QGIS.app

You may also symlink QGIS.app into /Applications or ~/Applications:

  ln -Fs `find $(brew --prefix) -name "QGIS.app"` /Applications/QGIS.app

To directly run the `QGIS.app/Contents/MacOS/QGIS` binary use the wrapper
script pre-defined with Homebrew prefix environment variables:

  /usr/local/opt/osgeo-qgis/bin/osgeo-qgis

If you need QGIS to appear in Spotlight, create and run the following script:

  #!/usr/bin/env bash

  qgis_location=$(find $(brew --prefix)/Cellar/osgeo-qgis/ -name "3.*" -print -quit)/QGIS.app
  osascript -e 'tell application "Finder"' -e 'make new alias to file (posix file "'$qgis_location'") at (posix file "/Applications")' -e 'end tell'

  https://github.com/OSGeo/homebrew-osgeo4mac/issues/607#issuecomment-455905926

NOTE: Your current PATH and PYTHONPATH environment variables are honored
      when launching via the wrapper script, while launching QGIS.app
      bundle they are not.

For standalone Python 3 development, set the following environment variable:

  export PYTHONPATH=/usr/local/opt/lib/python3.7/site-packages:/usr/local/opt/osgeo-qgis/lib/python3.7/site-packages:/usr/local/opt/osgeo-qgis/QGIS.app/Contents/Resources/python:/usr/local/opt/osgeo-gdal-python/lib/python3.7/site-packages:$PYTHONPATH

You installed LAStools!

If you will use Wine to have more features:

1 - Download http://lastools.org/download/LAStools.zip and unzip LASTools.
    Remember where you unzipped it.

2 - Start QGIS. Select Processing/Options.
    In the Providers section scroll to “LASTools”

    LASTools folder: LASTools directory (unzipped)
    Wine Folder: /usr/local/opt/wine/bin

If you have built GRASS 7 for the Processing plugin set the following in QGIS

  Processing -> Options: Providers -> GRASS GIS 7 commands -> GRASS 7 folder

  to /usr/local/opt/osgeo-grass/grass-base

QGIS plugins may need extra Python modules to function. Most can be installed
with pip in a Terminal:

    pip3 install modulename

If you want to upgrade modules, add the -U option:

    pip3 install -U modulename

Activate plugins

  Manage and Install Plugins -> Installed ->  Plugin name (click its checkbox)

brew doctor output:

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libcoinhsl.0.dylib
  /usr/local/lib/libpardiso600-MACOS-X86-64.dylib
  /usr/local/lib/libtcl8.6.dylib
  /usr/local/lib/libtk8.6.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/CoinHslConfig.h
  /usr/local/include/fakemysql.h
  /usr/local/include/fakepq.h
  /usr/local/include/fakesql.h
  /usr/local/include/hsl_ma77d.h
  /usr/local/include/hsl_ma86d.h
  /usr/local/include/hsl_ma97d.h
  /usr/local/include/hsl_mc68i.h
  /usr/local/include/itcl.h
  /usr/local/include/itcl2TclOO.h
  /usr/local/include/itclDecls.h
  /usr/local/include/itclInt.h
  /usr/local/include/itclIntDecls.h
  /usr/local/include/itclMigrate2TclCore.h
  /usr/local/include/itclTclIntStubsFcn.h
  /usr/local/include/mysqlStubs.h
  /usr/local/include/odbcStubs.h
  /usr/local/include/pqStubs.h
  /usr/local/include/tcl.h
  /usr/local/include/tclDecls.h
  /usr/local/include/tclOO.h
  /usr/local/include/tclOODecls.h
  /usr/local/include/tclPlatDecls.h
  /usr/local/include/tclThread.h
  /usr/local/include/tclTomMath.h
  /usr/local/include/tclTomMathDecls.h
  /usr/local/include/tdbc.h
  /usr/local/include/tdbcDecls.h
  /usr/local/include/tdbcInt.h
  /usr/local/include/tk.h
  /usr/local/include/tkDecls.h
  /usr/local/include/tkPlatDecls.h

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
  /usr/local/lib/libcoinhsl.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
  /usr/local/lib/pkgconfig/coinhsl.pc
  /usr/local/lib/pkgconfig/tcl.pc
  /usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libcoinhsl.a
  /usr/local/lib/libtclstub8.6.a
  /usr/local/lib/libtkstub8.6.a

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  proj
  pyqt-qt4
  ghostscript
  gtk+3
  libgeotiff
  ipython
  r
  libspatialite
  osgeo-six
  emacs
  qscintilla2
  hicolor-icon-theme
  netcdf
  sip
  pyqt

Finally, my python it is capable of loading PyQt5.QtCore

image
jd-lara commented 5 years ago

@fjperini I tried again to reinstall and followed every step in detail. Still the same behavior.

alazarolop commented 5 years ago

@jd-lara maybe you can try the workaround explained in the other issue in the mean time. I hope it works.

jd-lara commented 5 years ago

@alazarolop I am getting this error. The set-up is the same as above. I am pretty confident all my configuration and dependencies are ok.

Last 15 lines from /Users/jdlara/Library/Logs/Homebrew/osgeo-qgis-res/47.python3:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
    ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
    ^
In file included from src/ft2font_wrapper.cpp:4:
In file included from src/py_converters.h:18:
In file included from src/_backend_agg_basic_types.h:11:
src/path_converters.h:235:47: error: expected unqualified-id
                if (std::isfinite(*x) && std::isfinite(*y)) {
                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
    ( sizeof(x) == sizeof(float)  ? __inline_isfinitef((float)(x))       \
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/osgeo/homebrew-osgeo4mac/issues
fjperini commented 5 years ago

@jd-lara I started updating everything. Wait for it to end the process.

stale[bot] commented 4 years ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want to keep the issue open, please comment or update the info here. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue or pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.