$ brew install liblwgeom
$ export LDFLAGS="-L/usr/local/opt/liblwgeom/lib"
$ export CPPFLAGS="-I/usr/local/opt/liblwgeom/include"
$ brew edit libspatialite
(add --enable-lwgeom to configure)
$ brew reinstall -s libspatialite
$ brew install -s gdal
          Created
          March 28, 2019 19:29 
        
      - 
      
- 
        Save openfirmware/26fa9ae413af626ed16d1dd09b614b42 to your computer and use it in GitHub Desktop. 
    ST_MakeValid and other functions on libspatialite/GDAL on MacOS with Homebrew
  
        The export variables didn't work for me. Had to add the following to the libspatialite brew recipe:
    lwgeom = Formula["liblwgeom"]
    ENV.append "LDFLAGS", "-L#{lwgeom.opt_lib}"
    ENV.append "CFLAGS", "-I#{lwgeom.opt_include}"thank you!
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Hmm, I am having issues with PostGIS now. Maybe the FLAGS need to refer to
postgisinstead ofliblwgeom.