Difference between revisions of "Compiling on MacOSX using homebrew"

From GRASS-Wiki
Jump to: navigation, search
(How to install GRASS GIS 7.1 SVN Head)
(Updated GRASS GIS 7.2 LTS install)
 
(12 intermediate revisions by 5 users not shown)
Line 11: Line 11:
  
 
The formulas to install programs are called recipes and they make it possible to install several version of the same program (as well as HEAD of different Version Control Systems) at the same time which can then be symlinked.
 
The formulas to install programs are called recipes and they make it possible to install several version of the same program (as well as HEAD of different Version Control Systems) at the same time which can then be symlinked.
This makes it perfect for the purpose of in=stalling HEAD of GRASS GIS for testing purposes.
+
This makes it perfect for the purpose of installing the master branch of GRASS GIS for testing purposes.
  
== How to install GRASS GIS 7.1 SVN Head ==
+
== GRASS GIS 7.6+ ==
I assume that homebrew is installed and working.
 
  
Different recipes are organized in so called taps which need to be added to homebrew by using '''''brew tap''''' command. The GRASS GIS 7.1 recipes are in the following github repo:
+
There is an [https://github.com/OSGeo/homebrew-osgeo4mac osgeo4mac] which contains [https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/osgeo-grass.rb recipes for GRASS GIS 7.x] and other GIS tools - highly recommendable tap!
  
https://github.com/rkrug/homebrew-head-only
+
'''Installation:'''
  
In addition, GRASS GIS has dependencies which can be found in the homebrew/science tap.
+
Just run
  
To add these two to homebrew, one has to use the commands
+
      brew tap osgeo/osgeo4mac
  
      brew tap rkrug/head-only 
+
and then
      brew tap homebrew/science
 
      brew update
 
  
Finally, GRASS 7.1 SVN can be installed by
+
      brew install osgeo-grass
  
      brew install grass-71
+
Easy, isn't it?
  
This should be it.
+
You can also install via URL:
  
When using the option '''--with-liblas''', it is possible that you get the following error:
+
      brew install https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/osgeo-grass.rb
  
      checking whether to use libLAS... yes
+
'''Testing:'''
       checking for liblas-config... /usr/local/opt/liblas/bin/liblas-config
+
* by running (change '7x' to the current version)
      configure: error: *** Unable to locate libLAS library.
+
       brew test -v grass-7x
 +
you can run GRASS GIS tests but they are not implemented as they should be - work in progress.
 +
 
 +
== GRASS GIS 7.2 LTS ==
 +
 
 +
OSGEO4mac has also a formalar to install the GRASS GIS 7 LTS.
  
Thanks to Glynn Clements, there is a solution (see [http://article.gmane.org/gmane.comp.gis.grass.devel/65254 the mail on gmane]): liblas was build against a non-installed gdal version.
+
Follow the procedure as described in section '''GRASS GIS 7.6+''' but use
  
The solution is simple: force homebrew to install from source, even when a bottle exists. So:
+
    brew install grass7-lts
  
      brew reinstall --build-from-source liblas
+
== GRASS GIS 7.0.x for El Capitan without disabling SIP ==
 +
The new homebrew recipe for GRASS 7.0 does install on El Capitan with SIP enabled! This is thanks to Larry Shaffer. See
 +
https://github.com/OSGeo/homebrew-osgeo4mac/issues/118#issuecomment-200278686
  
and try to install grass-71 again. Now it should work, even with the optin '''--with-liblas'''.
+
The recipe is part of the Homebrew-osgeo4mac tap, see
  
 +
https://github.com/OSGeo/homebrew-osgeo4mac
  
If this does not work, please leave comments at [https://github.com/rkrug/homebrew-head-only/issues the issues page of the tap] or at the grass-dev mailing list.
+
for info on how to use them.
  
== From here==
 
* There is an [https://github.com/OSGeo/homebrew-osgeo4mac osgeo4mac] which contains recipes for GRASS GIS 6.4 and 7.0 and other GIS tools - highly re=commendable tap!
 
* by running
 
      brew test -v grass-71
 
you can run GRASS GIS tests but they are not implemented as they should be - work in progress.
 
  
 
[[Category:Development]]
 
[[Category:Development]]
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Installation]]
 
[[Category:Installation]]

Latest revision as of 02:12, 18 November 2019

What is homebrew and why use it

To quote from their website:

Homebrew is the missing package manager for OS X:

  • easy to install
  • does not need administrator privileges
  • installs packages to their own directory and then symlinks their files into /usr/local

For further information to install it and how to use it, see the Homebrew website and the Wiki.

The formulas to install programs are called recipes and they make it possible to install several version of the same program (as well as HEAD of different Version Control Systems) at the same time which can then be symlinked. This makes it perfect for the purpose of installing the master branch of GRASS GIS for testing purposes.

GRASS GIS 7.6+

There is an osgeo4mac which contains recipes for GRASS GIS 7.x and other GIS tools - highly recommendable tap!

Installation:

Just run

     brew tap osgeo/osgeo4mac

and then

     brew install osgeo-grass

Easy, isn't it?

You can also install via URL:

     brew install https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/osgeo-grass.rb

Testing:

  • by running (change '7x' to the current version)
     brew test -v grass-7x

you can run GRASS GIS tests but they are not implemented as they should be - work in progress.

GRASS GIS 7.2 LTS

OSGEO4mac has also a formalar to install the GRASS GIS 7 LTS.

Follow the procedure as described in section GRASS GIS 7.6+ but use

   brew install grass7-lts

GRASS GIS 7.0.x for El Capitan without disabling SIP

The new homebrew recipe for GRASS 7.0 does install on El Capitan with SIP enabled! This is thanks to Larry Shaffer. See https://github.com/OSGeo/homebrew-osgeo4mac/issues/118#issuecomment-200278686

The recipe is part of the Homebrew-osgeo4mac tap, see

https://github.com/OSGeo/homebrew-osgeo4mac

for info on how to use them.