NOAA-PMEL / PyFerret

The PyFerret program and Python module from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
58 stars 22 forks source link

pango / harfbuzz issues when building #101

Closed ngam closed 2 years ago

ngam commented 2 years ago

Hi there, we have encountered this problem over at conda-forge recently. You have this fix for macos

https://github.com/NOAA-PMEL/PyFerret/blob/3be2f302120f9a536fb1542dc52c17c8d6f44628/platform_specific.mk.intel-mac#L39-L53

and we found that a similar patch/fix is needed for linux (attached is the patch we used).

diff --git a/platform_specific.mk.x86_64-linux b/platform_specific.mk.x86_64-linux
index d85bd75..0f2f439 100644
--- a/platform_specific.mk.x86_64-linux
+++ b/platform_specific.mk.x86_64-linux
@@ -39,7 +39,7 @@ endif
 ifeq ($(strip $(PANGO_LIBDIR)),)
    PANGO_INCLUDE   = -I/usr/include/pango-1.0
 else
-   PANGO_INCLUDE   = -I$(PANGO_LIBDIR)/../include/pango-1.0
+   PANGO_INCLUDE   = -I$(PANGO_LIBDIR)/../include/pango-1.0 -I$(PANGO_LIBDIR)/../include/harfbuzz
 endif

 ifeq ($(strip $(GLIB2_LIBDIR)),)

Otherwise the build fails with something like:

.../lib/../include/pango-1.0/pango/pango-coverage.h:28:10: fatal error: hb.h: No such file or directory
2021-09-02T18:22:19.9360265Z    28 | #include <hb.h>
2021-09-02T18:22:19.9360704Z       |          ^~~~~~

We believe this started with pango 1.48 (https://github.com/conda-forge/pyferret-feedstock/pull/82) and our fix is documented in https://github.com/conda-forge/pyferret-feedstock/pull/86. It is a minor patch, I am happy to submit a PR with it, and probably @josborne-noaa can also do it/address it. Perhaps look into this and constrain the pango versions or supplement a conditional patch? Let us know if you need anything from us downstream, thanks!