Bug #7193
closed4.1.0 won't compile
0%
Description
harfbuzz and pango issues ahead. I'm building against pango 1.44.3 and harfbuzz 2.5.3 on Arch Linux. These issues occurred while packaging the offical Arch Linux wt package.
The first problem with 4.1.0 is that it doesn't explicitly search and include the header dirs for harfbuzz. This results in:
In file included from /usr/include/pango-1.0/pango/pango-font.h:25,
from /usr/include/pango-1.0/pango/pango-attributes.h:25,
from /usr/include/pango-1.0/pango/pango.h:25,
from /home/svenstaro/src/wt/src/Wt/FontSupport.h:21,
from /home/svenstaro/src/wt/src/Wt/FontSupportPango.C:12:
/usr/include/pango-1.0/pango/pango-coverage.h:28:10: fatal error: hb.h: No such file or directory
28 | #include <hb.h>
| ~
compilation terminated.
make[2]: * [src/CMakeFiles/wt.dir/build.make:4557: src/CMakeFiles/wt.dir/Wt/FontSupportPango.C.o] Error 1
make[2]: * Waiting for unfinished jobs....
In file included from /usr/include/pango-1.0/pango/pango-font.h:25,
from /usr/include/pango-1.0/pango/pango-attributes.h:25,
from /usr/include/pango-1.0/pango/pango.h:25,
from /home/svenstaro/src/wt/src/Wt/FontSupport.h:21,
from /home/svenstaro/src/wt/src/Wt/WPdfImage.C:17:
/usr/include/pango-1.0/pango/pango-coverage.h:28:10: fatal error: hb.h: No such file or directory
28 | #include <hb.h>
| ~
By manually including those headers, I can progress a little bit further but it seems to be using deprecated APIs which are gone or changed in my version of pango:
/home/svenstaro/src/wt/src/Wt/FontSupportPango.C: In static member function 'static std::string Wt::FontSupport::fontPath(PangoFont*)':
/home/svenstaro/src/wt/src/Wt/FontSupportPango.C:245:43: warning: 'void* pango_fc_font_lock_face(PangoFcFont*)' is deprecated: Use 'pango_font_get_hb_font' instead [-Wdeprecated-declarations]
245 | FT_Face face = pango_fc_font_lock_face(f);
| ^
In file included from /usr/include/pango-1.0/pango/pangoft2.h:32,
from /home/svenstaro/src/wt/src/Wt/FontSupportPango.C:23:
/usr/include/pango-1.0/pango/pangofc-font.h:67:12: note: declared here
67 | gpointer pango_fc_font_lock_face (PangoFcFont *font);
| ^
/home/svenstaro/src/wt/src/Wt/FontSupportPango.C:245:43: warning: 'void* pango_fc_font_lock_face(PangoFcFont*)' is deprecated: Use 'pango_font_get_hb_font' instead [-Wdeprecated-declarations]
245 | FT_Face face = pango_fc_font_lock_face(f);
| ^
In file included from /usr/include/pango-1.0/pango/pangoft2.h:32,
from /home/svenstaro/src/wt/src/Wt/FontSupportPango.C:23:
/usr/include/pango-1.0/pango/pangofc-font.h:67:12: note: declared here
67 | gpointer pango_fc_font_lock_face (PangoFcFont *font);
| ^
/home/svenstaro/src/wt/src/Wt/FontSupportPango.C:245:41: error: invalid conversion from 'gpointer' {aka 'void*'} to 'FT_Face' {aka 'FT_FaceRec_*'} [-fpermissive]
245 | FT_Face face = pango_fc_font_lock_face(f);
| ~
| |
| gpointer {aka void*}
/home/svenstaro/src/wt/src/Wt/FontSupportPango.C:251:30: warning: 'void pango_fc_font_unlock_face(PangoFcFont*)' is deprecated: Use 'pango_font_get_hb_font' instead [-Wdeprecated-declarations]
251 | pango_fc_font_unlock_face(f);
| ^
In file included from /usr/include/pango-1.0/pango/pangoft2.h:32,
from /home/svenstaro/src/wt/src/Wt/FontSupportPango.C:23:
/usr/include/pango-1.0/pango/pangofc-font.h:69:12: note: declared here
69 | void pango_fc_font_unlock_face (PangoFcFont *font);
| ^
/home/svenstaro/src/wt/src/Wt/FontSupportPango.C:251:30: warning: 'void pango_fc_font_unlock_face(PangoFcFont*)' is deprecated: Use 'pango_font_get_hb_font' instead [-Wdeprecated-declarations]
251 | pango_fc_font_unlock_face(f);
| ^
In file included from /usr/include/pango-1.0/pango/pangoft2.h:32,
from /home/svenstaro/src/wt/src/Wt/FontSupportPango.C:23:
/usr/include/pango-1.0/pango/pangofc-font.h:69:12: note: declared here
69 | void pango_fc_font_unlock_face (PangoFcFont *font);
| ^
Updated by Roel Standaert over 5 years ago
- Status changed from New to Resolved
I pushed a change that makes CMake add the Harfbuzz include dir: https://github.com/emweb/wt/commit/5611d045c3e279c1101afdc07ab7ee1bdd5203e3
Looks like Pango 1.44.4 was just released, including this: https://github.com/GNOME/pango/commit/5af6340eef9833f0f8e878939e88d98b11813578
So updating to Pango 1.44.4 should fix the remaining error, but not the deprecation warnings.
I opened issue #7196 for the remaining deprecation warnings.
Updated by Roel Standaert about 5 years ago
The harfbuzz change in CMakeLists.txt is now in 4.1.1
Updated by Roel Standaert about 5 years ago
- Status changed from Resolved to Closed