On Sat, 28 Feb 2026 21:41:08 GMT, Phil Race <[email protected]> wrote:

> > Below files were present in 2.13.2 upstream but our build worked fine 
> > without them. But with FreeType 2.14.1 our build >fails without these 
> > files, so added them also:
> > src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c
> > src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h
> 
> That sounds wrong. These should only be needed if 
> FT_CONFIG_OPTION_USE_HARFBUZZ is defined. And it isn't. All uses of the code 
> in those files is protected by an ifdef .. unless upstream made a mistake 
> somewhere.

@prrace If i remove the addition of these files, we see following build error:


* For target support_native_java.desktop_libfreetype_afadjust.o:
In file included from 
src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c:20:
In file included from 
src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h:26:
In file included from 
src/java.desktop/share/native/libfreetype/src/autofit/afglobal.h:25:
src/java.desktop/share/native/libfreetype/src/autofit/afmodule.h:25:10: fatal 
error: 'ft-hb.h' file not found
#include "ft-hb.h”

This include hits multiple files and we see failure at many places.

Even if we make this import conditional using `FT_CONFIG_OPTION_USE_HARFBUZZ` 
Or `FT_CONFIG_OPTION_USE_HARFBUZZ && FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC`(as 
done in same file in this update). We continue to see errors like :


* For target support_native_java.desktop_libfreetype_afcjk.o:
src/java.desktop/share/native/libfreetype/src/autofit/afcjk.c:104:12: error: 
call to undeclared function 'ft_hb_enabled'; ISO C99 and later do not support 
implicit function declarations [-Wimplicit-function-declaration]
      if ( ft_hb_enabled( metrics->root.globals ) )


Build passes only after adding the new files 
`src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c` & 
`src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h` as-is without 
any modifications.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29954#issuecomment-3982158481

Reply via email to