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

Rebuild bottles when dependencies are outdated #1381

Closed kiendang closed 3 years ago

kiendang commented 4 years ago

Is your feature request related to a problem? Please describe.

The osgeo-gdal 3.1.0 bottle is currently broken since it was built against cfitsio 3.470 and cfitsio has been upgraded to 3.480. I discovered this when compiling the R package rgdal linking against the bottled osgeo-gdal 3.1.0. Building osgeo-gdal from source works fine.

Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/kien/.R/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
  dlopen(/Users/kien/.R/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so, 6): Library not loaded: /usr/local/opt/cfitsio/lib/libcfitsio.8.dylib
  Referenced from: /usr/local/opt/osgeo-gdal/lib/libgdal.27.dylib
  Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/kien/.R/library/rgdal’
* restoring previous ‘/Users/kien/.R/library/rgdal’

Describe the solution you'd like

The bottles in homebrew-core are rebuilt whenever a dependency is upgraded. Maybe we should do this here as well? I'm not sure this is a feasible solution but willing to help out.

Describe alternatives you've considered

Additional context

alazarolop commented 4 years ago

Hi @kiendang , thank you for letting us know about this issue. Bottles are being rebuilt now.

I'm not sure neither about an automated process, e.g. at this moment building queue is manually set within the tap. It would be great if anyone could put some light in this topic and we would be glad to add it.

kiendang commented 4 years ago

I'm pretty sure for the formulae in homebrew-core, bottles are rebuilt whenever a dependency is upgraded

https://jonathanchang.org/blog/maintain-your-own-homebrew-repository-with-binary-bottles/

You’ll need to update your bottles in a few situations. If you release a new version of your software, update the url and sha256 in your formula and, if needed, the version field. See brew bump-formula-pr for a quick way to do this. When a library your formula depends_on has breaking changes (e.g., Boost), you’ll need to increment the revision number; if this isn’t already present in your formula, just add revision 1. You can remove this when your software gets a new version.

I'm not sure if this is done manually or automated but if it's the later I'll look into how they set up their CI for this.

alazarolop commented 4 years ago

GDAL bottles have been rebuilt a10672813a9e48e2464cb83df9db89196d90eeb2

alazarolop commented 4 years ago

@kiendang Exactly, at this moment we manually trigger the process by incrementing the revision number and then use CI to build bottles and update links and SHA in the formula.

It makes sense there is an automated way and it would be great to use within the tap. It's out of my scope, but maybe asking in core repo would shed some light on?

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.

stale[bot] commented 3 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 3 years ago

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