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 112 forks source link

Brew tap fails due to syntax errors in various osgeo4mac Homebrew formulae #1407

Closed BaconRanch closed 3 years ago

BaconRanch commented 3 years ago

I've...

Describe the bug

Homebrew as of version 2.6.0 has deprecated use of the depends_on :java syntax. You can see this deprecation listed here in the Homebrew blog.

Several formulae in osgeo4mac still use this syntax, and upon a brew tap of osgeo4mac, Homebrew reports errors and refuses to add the tap.

To Reproduce

Steps to reproduce the behavior:

  1. Run brew tap osgeo/osgeo4mac on MacOS (Catalina was used on the machine that encountered this issue).
  2. Observe the errors listed below in the Logs section.

Expected behavior

The brew tap should succeed with no issues.

Logs

Here is the STDOUT of a brew tap osgeo/osgeo4mac command:

==> Tapping osgeo/osgeo4mac
Cloning into '/usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac'...
remote: Enumerating objects: 12952, done.
remote: Total 12952 (delta 0), reused 0 (delta 0), pack-reused 12952
Receiving objects: 100% (12952/12952), 10.16 MiB | 1.99 MiB/s, done.
Resolving deltas: 100% (9456/9456), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-vtk.rb
osgeo-vtk: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-vtk.rb:148
Warning: Calling depends_on :x11 is deprecated! Use depends_on specific X11 formula(e) instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-openscenegraph.rb:87
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-insighttoolkit@4.rb
osgeo-insighttoolkit@4: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-insighttoolkit@4.rb:42
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-insighttoolkit.rb
osgeo-insighttoolkit: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-insighttoolkit.rb:40
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-gmt.rb
osgeo-gmt: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-gmt.rb:39
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/mapserver6.rb
mapserver6: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/mapserver6.rb:63
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-pcl.rb
osgeo-pcl: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-pcl.rb:45
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-ossim.rb
osgeo-ossim: Calling depends_on :java is disabled! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
 /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-ossim.rb:66
Error: Cannot tap osgeo/osgeo4mac: invalid syntax in tap!
BerginJay commented 3 years ago

I got similar java deprecated hint, but it is warning instead of error.

Cloning into '/usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac'...
remote: Enumerating objects: 12952, done.
remote: Total 12952 (delta 0), reused 0 (delta 0), pack-reused 12952
Receiving objects: 100% (12952/12952), 10.16 MiB | 1.69 MiB/s, done.
Resolving deltas: 100% (9456/9456), done.
Warning: Calling depends_on :java is deprecated! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-vtk.rb:148

Warning: Calling depends_on :java is deprecated! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-insighttoolkit@4.rb:42

Warning: Calling depends_on :java is deprecated! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-insighttoolkit.rb:40

Warning: Calling depends_on :java is deprecated! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-gmt.rb:39

Warning: Calling depends_on :java is deprecated! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/mapserver6.rb:63

Warning: Calling depends_on :java is deprecated! Use "depends_on "openjdk@11", "depends_on "openjdk@8" or "depends_on "openjdk" instead.
Please report this issue to the osgeo/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/osgeo/homebrew-osgeo4mac/Formula/osgeo-pcl.rb:45

Tapped 94 formulae (354 files, 14.0MB).
alazarolop commented 3 years ago

Thank you. Yes, it's not an error, but I understand it's annoying. Should be fixed by changing java dependency in those formulas.

hawkaa commented 3 years ago

PR opened as #1409 . Until then, you can use my tap at hawkaa/osgeo4mac .

juanjsebgarcia commented 3 years ago

Thanks @hawkaa, I tried your fork which got me closer, but unfortunately encountering the following

Error: Invalid formula: /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-openscenegraph.rb
osgeo-openscenegraph: Calling depends_on :x11 is disabled! Use depends_on specific X11 formula(e) instead.
Please report this issue to the hawkaa/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-openscenegraph.rb:87

Error: Invalid formula: /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-grass.rb
osgeo-grass: Calling depends_on :x11 is disabled! Use depends_on specific X11 formula(e) instead.
Please report this issue to the hawkaa/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-grass.rb:111

Error: Invalid formula: /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-osgearth.rb
osgeo-osgearth: Calling depends_on :x11 is disabled! Use depends_on specific X11 formula(e) instead.
Please report this issue to the hawkaa/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-osgearth.rb:46

Is this also related? A weird X11 dependency which also needs to be fixed?

pat-s commented 3 years ago

Also hitting this error right now. So this tap is unsuable for new users since early January? :(

alazarolop commented 3 years ago

Yes, the tap is not up-to-date: there are issues with dependencies, formulas outside QGIS and PostGIS haven't been upgraded in the last year and bottling hasn't been poked recently. That's why I can't recommend the tap for new users.

beedawg1985 commented 3 years ago

Thanks @hawkaa, I tried your fork which got me closer, but unfortunately encountering the following

Error: Invalid formula: /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-openscenegraph.rb
osgeo-openscenegraph: Calling depends_on :x11 is disabled! Use depends_on specific X11 formula(e) instead.
Please report this issue to the hawkaa/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-openscenegraph.rb:87

Error: Invalid formula: /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-grass.rb
osgeo-grass: Calling depends_on :x11 is disabled! Use depends_on specific X11 formula(e) instead.
Please report this issue to the hawkaa/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-grass.rb:111

Error: Invalid formula: /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-osgearth.rb
osgeo-osgearth: Calling depends_on :x11 is disabled! Use depends_on specific X11 formula(e) instead.
Please report this issue to the hawkaa/osgeo4mac tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /Users/rumble/homebrew/Library/Taps/hawkaa/homebrew-osgeo4mac/Formula/osgeo-osgearth.rb:46

Is this also related? A weird X11 dependency which also needs to be fixed?

Is there a tap where this error does not occurr? I'm attempting to install on Big Sur 11.1, 2020 M1.

alazarolop commented 3 years ago

@beedawg1985 The most important formulas are available in core as proj, gdal or postgis. Others more specific as osgeo-osgearth weren't updated in the tap.

beedawg1985 commented 3 years ago

Thank you. I was trying to install GRASS specifically but ended up using the .dmg

hawkaa commented 3 years ago

The PR was merged, but I didn't have time to try to fix my tap yet. I'm assuming we should gather forces and try to fix the build errors in this repository instead.

alazarolop commented 3 years ago

Honestly, the main problem of the tap is that relies on Homebrew core formulas which are constantly updated to the latest version and they are inter-related at multiple levels. As a consequence the bottles of the tap got out-of-date very often and tap formulas used to break for a while until the latest version of dependencies were supported. You might not be able to install new programs using Homebrew with similar dependencies in order to avoid breaking your installation. Moreover, I remained as the main committer and I don't know how to tune the system to build the bottles.

Originally QGIS and, to some extent, GRASS were the goals of the tap and later also the transition of Proj (>6) and GDAL (>3). Now they both are available from .dmg files or using the QGIS builder for dev version. Besides, Proj, GDAL and PostGIS formulas from core have gained new dependencies and its formulas are checked against new core upgrades, so the bottles are always up-to-date. I'm not sure about the rest of tap formulas. They haven't been upgraded in a while (>6 months) and issues haven't been raised, so I reckoned they might not be in use.

I think the tap needs a new goal and I would be glad to gather forces or help others to do it. E.g. I understand it would be nice to have a more stable / functional tap compared to core and to maintain a wider set of formulas in collaboration, but I also understand that job should be shared too.