Re: [gtk-osx-users] Pango error implicit declaration of function is invalid in C99.





On Sep 3, 2020, at 5:12 PM, John Ralls <jralls ceridwen us> wrote:



On Sep 2, 2020, at 8:57 AM, Pascal <p p14 orange fr> wrote:


Le 2 sept. 2020 à 16:30, John Ralls <jralls ceridwen us> a écrit :

On Sep 2, 2020, at 3:24 AM, Pascal <p p14 orange fr> wrote:

Hello John,

Le 25 août 2020 à 17:21, John Ralls <jralls ceridwen us> a écrit :

On Aug 25, 2020, at 3:47 AM, Pascal <p p14 orange fr> wrote:

Le 22 août 2020 à 12:11, Pascal <p p14 orange fr> a écrit :

Le 22 août 2020 à 10:39, Pascal <p p14 orange fr> a écrit :

Hello,
I've a compiling error with Pango:

% jhbuild build meta-gtk-osx-gtk3
...

*** Error during phase build of pango: ########## Error running ninja   *** [19/29]

[1] Rerun phase build
[2] Ignore error and continue to install
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase "wipe directory and start over"
[7] Go to phase "configure"
[8] Go to phase "clean"
choice: 

Digging in the error, the define CAIRO_HAS_FC_FONT is not set.
It seems that fontconfig should have been built before cairo.

Fontconfig is in the "after" section of Cairo, so it should be ok:

<autotools id="cairo"
       autogenargs="--enable-pdf --enable-quartz --disable-xlib --without-x">
<branch repo="freedesktop" module="cairo" revision="1.16"/>
<dependencies>
<dep package="pixman"/>
<dep package="meta-gtk-osx-bootstrap"/>
<dep package="freetype-no-harfbuzz"/>
</dependencies>
<after>
<dep package="fontconfig"/>
</after>
</autotools>

Is it thus correct with the following fix?

diff --git a/modulesets/gtk-osx.modules b/modulesets/gtk-osx.modules
index 297b4fe..ed49555 100644
--- a/modulesets/gtk-osx.modules
+++ b/modulesets/gtk-osx.modules
@@ -107,10 +107,8 @@
 <dep package="pixman"/>
 <dep package="meta-gtk-osx-bootstrap"/>
 <dep package="freetype-no-harfbuzz"/>
-    </dependencies>
-    <after>
 <dep package="fontconfig"/>
-    </after>
+    </dependencies>
</autotools>

Should I then push it to github?

You mean make a PR? You can't push directly to the repo and in any case the canonical repo is 
https://gitlab.gnome.org/GNOME/gtk-osx.

However, FC is supposed to be optional in Pango, see the last line of meson_options.txt

Yes I got the same, indeed pango doesn't directly depend on fontconfig but expect that CAIRO_HAS_FC_FONT 
is defined in cairo include files. It is defined when fontconfig is seen when building cairo thus 
fontconfig should be built before cairo.
So I was wondering if the present cairo attributs in gtk-osx.modules should be changed.

I'm able to build meta-gtk-osx-gtk3 without FontConfig so I wonder how you got into a situation where 
Pango thinks it should use it but Cairo does not.

Cairo configuration:
cairo (version 1.16.0 [release]) will be compiled with:
The following surface backends:
Image:         yes (always builtin)
<...>
The following font backends:
User:          yes (always builtin)
FreeType:      yes
Fontconfig:    no (requires fontconfig >= 2.2.95)
Win32:         no (requires a Win32 platform)
Quartz:        yes

Pango configuration:
*** Configuring pango *** [19/29]
<...>
Project name: pango
Project version: 1.44.7
<...>
Dependency fontconfig found: NO unknown version, but need: ['>= 2.11.91']
Run-time dependency fontconfig found: YES
Message: fontconfig has FcWeightFromOpenTypeDouble: NO

Would you get my full logs to your private e-mail?

Not particularly. 

I'd rather not require building fontconfig if it's not necessary and while I don't have a recent stable 
build without fc, I do have a recent unstable one without it so I suspect that they've fixed the 
dependency. There's a new release, 1.46.1. Can you test that today?

I've got the same errors:
pango-1.46.1/pango/pangocairo-fcfont.c:71:10: error: implicit declaration of function 
'cairo_ft_font_face_create_for_pattern' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return cairo_ft_font_face_create_for_pattern (fcfont->font_pattern);
       ^
pango-1.46.1/pango/pangocairo-fcfont.c:71:10: note: did you mean 'cairo_ft_font_face_create_for_ft_face'?
/opt/xnadalib-2020/include/cairo/cairo-ft.h:56:1: note: 'cairo_ft_font_face_create_for_ft_face' declared 
here
cairo_ft_font_face_create_for_ft_face (FT_Face         face,
^
1 error generated.
pango-1.46.1/pango/pangocairo-fcfontmap.c:109:5: error: implicit declaration of function 
'cairo_ft_font_options_substitute' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  cairo_ft_font_options_substitute (pango_fc_fontset_key_get_context_key (fontkey),
  ^
pango-1.46.1/pango/pangocairo-fcfontmap.c:109:5: note: did you mean 'cairo_font_options_status'?
/opt/xnadalib-2020/include/cairo/cairo.h:1397:1: note: 'cairo_font_options_status' declared here
cairo_font_options_status (cairo_font_options_t *options);
^
1 error generated.

HTH, Pascal.

Indeed it does. What's happening is that Pango's meson.build insists that it must have either both or 
neither of freetype and fontconfig. So by building freetype-no-harfbuzz to get a more complete harfbuzz I'm 
tripping up pango. Unfortunately gitlab.gnome.org seems to be broken ATM so I can't open an issue about it, 
but I'll try rearranging things a bit to work around the problem.

OK, I surrender. It's basically not possible to handle both cases without manual intervention so I've made 
fontconfig mandatory.

Regards,
John Ralls





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]