8.1.1 fails to build on arm64 Mac OS
I am trying to build version 8.1.1 on a Macbook M1 using the gtk-osx and jhbuild scripts.
I get the following error when trying to generate the gir file:
[98/102] Generating src/HarfBuzz-0.0.typelib with a custom command
FAILED: src/HarfBuzz-0.0.typelib
/Users/user/gtk/inst/bin/g-ir-compiler src/HarfBuzz-0.0.gir --output src/HarfBuzz-0.0.typelib --includedir=/Users/user/gtk/inst/share/gir-1.0
src/HarfBuzz-0.0.gir:38:38: error: Line 38, character 38: The attribute 'name' on the element 'type' must be specified
error parsing file src/HarfBuzz-0.0.gir: Line 38, character 38: The attribute 'name' on the element 'type' must be specified
[99/102] Compiling C++ object src/libharfbuzz-subset.0.dylib.p/hb-subset.cc.o
ninja: build stopped: subcommand failed.
*** Error during phase build of harfbuzz: ########## Error running ninja *** [18/26]
That's really weird. What version of gobject-introspection do you have installed? Can you attach the HarfBuzz-0.0.gir file?
@khaledhosny do we ship the gir file in the tarball? All I can assume is that the gir was generated with a different version of gobject-introspection..
I have gobject-introspection-1.76.1.
I just built on Mac brew with the same version and it built fine.
Which build system are you using? meson, cmake, or autotools?
I am using jhbuild to build everything. It is trying to use meson.
error parsing file src/HarfBuzz-0.0.gir: Line 38, character 38: The attribute 'name' on the element 'type' must be specified
@ebassi did something like this change in gobject-introspection?
@khaledhosny do we ship the gir file in the tarball? All I can assume is that the gir was generated with a different version of gobject-introspection..
Does not look like we ship it.
@behdad Nothing has changed in the attribute checks at least since 2010.
The warning seems to be coming from:
<constant name="CODEPOINT_INVALID"
value="-1"
c:type="HB_CODEPOINT_INVALID">
<source-position filename="../../Source/harfbuzz-8.1.1/src/hb-common.h"
line="115"/>
<type c:type="hb_codepoint_t"/>
</constant>
i.e.
/**
* HB_CODEPOINT_INVALID:
*
* Unused #hb_codepoint_t value.
*
* Since: 8.0.0
*/
#define HB_CODEPOINT_INVALID ((hb_codepoint_t) -1)
Building with gobject-introspection 1.76.1 yields:
<constant name="CODEPOINT_INVALID"
value="4294967295"
c:type="HB_CODEPOINT_INVALID"
version="8.0.0">
<doc xml:space="preserve"
filename="src/hb-common.h"
line="108">Unused #hb_codepoint_t value.</doc>
<source-position filename="src/hb-common.h" line="115"/>
<type name="codepoint_t" c:type="hb_codepoint_t"/>
</constant>
The fact that the XML is so different is puzzling; @line72 are you trying to regenerate the GIR from the typelib and then compiling it back?
I am just using jhbuild, so I am running jhbuild build harfbuzz. Attached is the build log:
This looks suspicious:
[97/102] Generating src/HarfBuzz-0.0.gir with a custom command (wrapped by meson to set env)
This looks suspicious:
[97/102] Generating src/HarfBuzz-0.0.gir with a custom command (wrapped by meson to set env)
That's a normal part of our build.