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
363 stars 111 forks source link

make GDAL_DYNAMIC errors during OSX Yosemite install of GRASS #172

Closed SiccarPoint closed 7 years ago

SiccarPoint commented 8 years ago

Hi,

I'm trying to install GRASS on a very new machine running Yosemite. For a variety of reasons, I need the machine to run Anaconda as its primary Python, and have modified the PATH in my .zshrc file (note I run a zsh shell) fairly extensively to allow various other bits of scientific software to run. Nonetheless, I found these guidelines that appear to address a situation very like mine: https://grasswiki.osgeo.org/wiki/Compiling_on_MacOSX_using_homebrew (Penultimate section). I've tweaked the ENV variables as that shows (removing my fancy PATH modifications for now), and appear to have been successful in running all of the brew install steps listed, apart from the last. The call to brew install grass-70 --with-netcdf --with-gdal-1 gives me:

==> Installing grass-70 from osgeo/osgeo4mac
==> Downloading https://grass.osgeo.org/grass70/source/grass-7.0.4.tar.gz
Already downloaded: /Users/daniel/Library/Caches/Homebrew/grass-70-7.0.4.tar.gz
==> Patching
patching file include/Make/Install.make
Hunk #1 succeeded at 116 (offset 2 lines).
==> ./configure --prefix=/usr/local/Cellar/grass-70/7.0.4 --enable-shared --with
==> make GDAL_DYNAMIC=
Last 15 lines from /Users/daniel/Library/Logs/Homebrew/grass-70/02.make:
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.select
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.vect.export
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.vect.extract
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.vect.import
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.vect.univar
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.vect.observe.strds
/private/tmp/grass-70-20161006-33138-1wldk1d/grass-7.0.4/temporal/t.vect.what.strds
--
In case of errors please change into the directory with error and run 'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Thu  6 Oct 2016 16:55:27 BST
make: *** [default] Error 1

The full error log is here: https://gist.github.com/SiccarPoint/d7b5feb3359136eab8654568dd185693

Any help very gratefully received. I'm unclear as to which directory the first error might be happening in, so can't try the recommended call to make. Regular .dmg installs clearly fail, due I think to the old issue of 32vs64 bit wxpython problems, but I was hoping the workaround provided on that site might give me some joy.

dakcarto commented 8 years ago

Hi @SiccarPoint, thanks for reporting.

If you open your log file (and view full file), then search for Error: you will see 4,395 results that indicate your compiling it using the 10.12 (macOS Sierra) SDK, which is not suitable for your Yosemite build, e.g.:

Error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk ...

Not sure how you ended up with Xcode 8 or the MacOSX10.12.sdk on Yosemite (unless you are mistaken about your OS):

Xcode 8 requires a Mac running macOS Sierra 10.12 or OS X El Capitan 10.11.5 or later.

from: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html

Also, please provide Troubleshooting logs.

mankoff commented 7 years ago

I'm the author of that "penultimate section" referenced above, and now myself cannot install the latest grass on OS X. My OS is 10.11.6 (El Capitan, upgraded by 0.0.1 from when I wrote the instructions above). I can't even get to the install step, because brew install gdal --with-complete crashes. I can install gdal without the --with-complete, but then grass fails as reported above.

mankoff commented 7 years ago

brew gist-logs gdal --with-complete output is here: https://gist.github.com/mankoff/f0edd2b6e3e5092836660ec74ea97570

mankoff commented 7 years ago

Hmph. Nevermind. I can install gdal (just not --with-complete and therefore NetCDF support) now. I think I needed to install brew python and then reinstall numpy and wxpython and wxmac. Order matters... After installing gdal, brew install grass --with-gdal-1 does work.

SiccarPoint commented 7 years ago

Hi all - as @dakcarto notes, I am indeed running El Cap, not Yosemite. My bad. Also, I have now beaten my system into submission and have Grass running apparently cleanly. The key step may (??) have been needing to disable system integrity protection, as described here: http://grassmac.wikidot.com, and I think I just ended up installing the kyngchaos binaries instead of fighting my way through this troublesome brew. But thanks for your input guys. I'll close this if no-one has any objections.

jctull commented 7 years ago

I ran into some problems with gdal yesterday following the update of Jasper, and that appears to be the problem for you as well. I could not figure out how to make gdal work with the jasper2 library that newer jasper installed. GDAL appears to expect jasper1. I ended up editing the gdal formula and moving jasper from the supported backends section to the unsupported backends. Hope that helps until a better fix is implemented.

On Nov 15, 2016, at 7:33 AM, Ken Mankoff notifications@github.com wrote:

brew gist-logs gdal --with-complete output is here: https://gist.github.com/mankoff/f0edd2b6e3e5092836660ec74ea97570 https://gist.github.com/mankoff/f0edd2b6e3e5092836660ec74ea97570 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OSGeo/homebrew-osgeo4mac/issues/172#issuecomment-260673703, or mute the thread https://github.com/notifications/unsubscribe-auth/ABU0o0ROvu4cbeoNecBMwlXCSpUfwVqdks5q-dDhgaJpZM4KQHxK.

dakcarto commented 7 years ago

@jctull hi, was this jasper issue with gdal2 (in this tap) or gdal (core tap)?

dakcarto commented 7 years ago

@jctull I've updated gdal2 with a fix. I have not tested whether JPEG2000 (per jasper driver) still works the same however.

jctull commented 7 years ago

Sorry, Larry. I missed your question the other day. It was with gdal2. I modified my core gdal to parrot gdal2, effectively. So in my case, it was both.

I will test your update and report back.

jctull commented 7 years ago

This worked well, thanks!