[OpenJDK 2D-Dev] RFR : 8193515 : AIX : new Harfbuzz 1.7.1 version fails to compile

Baesken, Matthias matthias.baesken at sap.com
Thu Dec 14 15:10:56 UTC 2017


Hello, after upgrading to new   Harfbuzz 1.7.1  the openjdk build fails on AIX.

I created the following bug :
https://bugs.openjdk.java.net/browse/JDK-8193515

The compile  error we get on AIX  (using XLC 12.1) is :

=== Output from failing command(s) repeated here ===
* For target support_native_java.desktop_libfontmanager_hb-ot-shape-complex-arabic.o:
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh", line 80.3: 1540-0218 (S) The call does not match any parameter list for "hb_stable_sort".
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-private.hh", line 723.1: 1540-1283 (I) "template <class T, class T2> hb_stable_sort(T *, unsigned int, int (*)(const T *, const T *), T2 *)" is not a viable candidate.
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh", line 80.43: 1540-0298 (I) Template argument deduction cannot be performed using the function "template int cmp(Type2) const".
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-private.hh", line 748.1: 1540-1283 (I) "template <class T> hb_stable_sort(T *, unsigned int, int (*)(const T *, const T *))" is not a viable candidate.
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh", line 80.3: 1540-0215 (I) The wrong number of arguments has been specified for "template <class T> hb_stable_sort(T *, unsigned int, int (*)(const T *, const T *))".

"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh", line 129.3: 1540-0218 (S) The call does not match any parameter list for "hb_stable_sort".
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-private.hh", line 723.1: 1540-1283 (I) "template <class T, class T2> hb_stable_sort(T *, unsigned int, int (*)(const T *, const T *), T2 *)" is not a viable candidate.
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh", line 129.55: 1540-0298 (I) Template argument deduction cannot be performed using the function "template int cmp(Type2) const".
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-private.hh", line 748.1: 1540-1283 (I) "template <class T> hb_stable_sort(T *, unsigned int, int (*)(const T *, const T *))" is not a viable candidate.
"        /jdk/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh", line 129.3: 1540-0215 (I) The wrong number of arguments has been specified for "template <class T> hb_stable_sort(T *, unsigned int, int (*)(const T *, const T *))".

The compilation "complains"  about the hb_stable_sort template used in hb-ot-shape-complex-arabic-fallback.hh .  After looking a bit into this , the third parameter
      OT::GlyphID::cmp
of
     hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]);

seems to trigger this XLC 12 issue .
XLC 12 does not like the fact that  we have two cmp functions (one a template)  in

hb-open-type-private.hh  :

610 template <typename Type, unsigned int Size>
611 struct IntType
612 {
....
617   static inline int cmp (const IntType<Type,Size> *a, const IntType<Type,Size> *b) { return b->cmp (*a); }
622
 623   template <typename Type2>
624   inline int cmp (Type2 a) const
625   {

( GlyphID is an IntType )
This looks like an  XLC bug, however it is pretty easy to workaround it by using  a helper compare-function with a unique name (issue with cmp is that it is not unique, that confuses XLC ).
See this webrev :

http://cr.openjdk.java.net/~mbaesken/webrevs/8193515/

Please review it.


Thanks, Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20171214/976aa2c3/attachment-0001.html>


More information about the 2d-dev mailing list