Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.1.1 fails to build on arm64 Mac OS #4377

Open
line72 opened this issue Aug 16, 2023 · 13 comments
Open

8.1.1 fails to build on arm64 Mac OS #4377

line72 opened this issue Aug 16, 2023 · 13 comments

Comments

@line72
Copy link

line72 commented Aug 16, 2023

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]
@behdad
Copy link
Member

behdad commented Aug 16, 2023

That's really weird. What version of gobject-introspection do you have installed? Can you attach the HarfBuzz-0.0.gir file?

@line72
Copy link
Author

line72 commented Aug 16, 2023

I have gobject-introspection-1.76.1.

HarfBuzz-0.0.gir.zip

@behdad
Copy link
Member

behdad commented Aug 16, 2023

@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..

@behdad
Copy link
Member

behdad commented Aug 16, 2023

I have gobject-introspection-1.76.1.

I just built on Mac brew with the same version and it built fine.

@behdad
Copy link
Member

behdad commented Aug 16, 2023

Which build system are you using? meson, cmake, or autotools?

@line72
Copy link
Author

line72 commented Aug 16, 2023

I am using jhbuild to build everything. It is trying to use meson.

@behdad
Copy link
Member

behdad commented Aug 16, 2023

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
Copy link
Collaborator

@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.

@ebassi
Copy link

ebassi commented Aug 17, 2023

@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>

@ebassi
Copy link

ebassi commented Aug 17, 2023

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?

@line72
Copy link
Author

line72 commented Aug 17, 2023

I am just using jhbuild, so I am running jhbuild build harfbuzz. Attached is the build log:

harfbuzz.log

@line72
Copy link
Author

line72 commented Aug 17, 2023

This looks suspicious:
[97/102] Generating src/HarfBuzz-0.0.gir with a custom command (wrapped by meson to set env)

@behdad
Copy link
Member

behdad commented Aug 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants