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

Unable to compile on (Arch-)Linux #57

Closed
christian-heusel opened this issue Aug 9, 2019 · 6 comments
Closed

Unable to compile on (Arch-)Linux #57

christian-heusel opened this issue Aug 9, 2019 · 6 comments

Comments

@christian-heusel
Copy link

As suggested in the installation manual I ran ./configure && make but the following error occured:

gcc -g -O2 -Wall -pipe -DHAVE_PANGO=1 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi-3.2.1/include -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/cairo -I/usr/include/pixman-1  -I.  -c -o subs.o subs.c
subs.c: In function ‘pg_line_output’:
subs.c:409:3: error: unknown type name ‘FT_Face’
  409 |   FT_Face face = pango_fc_font_lock_face(fc_font);
      |   ^~~~~~~

Since the test seem to run, I think this could be some platform specific issue.
Are there any dependencies which could be unmet?
Any help is appreciated! 😊

gcc --version -> gcc (GCC) 9.1.0
uname -r      -> Linux x 5.2.6-1-ARCH
@MaxPerl
Copy link

MaxPerl commented Aug 9, 2019

Just a guess: Have you installed the development files of libfreetype?

@moinejf
Copy link
Collaborator

moinejf commented Aug 9, 2019

The script 'configure' checks if the development files of freetype2 and pangocairo are installed. Normally, as done in subs.c, only the files <pango/pangocairo.h> and <pango/pangofc-font.h> have to be installed. In my distro (VoidLinux), <pango/pangofc-font.h> includes (freetype/)<ft2build.h> which includes <freetype/freetype.h> which defines FT_Face.
So, it seems that this is a bug in your distro.

@christian-heusel
Copy link
Author

christian-heusel commented Aug 9, 2019

What do you mean by "developement files"? Would (under debian) this be something like libfreetype6-dev?
I have the packages freetype2 and pango installed.

Thanks for the quick responses 😄

@MaxPerl
Copy link

MaxPerl commented Aug 9, 2019

Yes, in debian, it would be libfreetype6-dev. But if configure checks the existence, then this shouldn't be the problem?

@moinejf
Copy link
Collaborator

moinejf commented Aug 9, 2019

This problem is in the .h files themselves. You should check the inclusion chain.
Here is what I have in my system:

subs.c needs FT_Face, so, it includes <pango/pangofc-font.h>, i.e.:
/usr/include/pango-1.0/pango/pangofc-font.h
This one includes <ft2build.h>, i.e.:
/usr/include/freetype2/ft2build.h
which includes:
/usr/include/freetype2/freetype/config/ftheader.h
This file defines the name of the freetype.h file by the macro FT_FREETYPE_H
Then, back to subs.c and <pango/pangofc-font.h>
/usr/include/pango-1.0/pango/pangofc-font.h
This file includes FT_FREETYPE_H which is obviously
/usr/include/freetype2/freetype/freetype.h
and where FT_Face is defined.

@christian-heusel
Copy link
Author

GNOME/pango@5af6340

Okey, this seems to be a pango upstream issue... I will have a look if the upstream change fixes my issue ☺️
At the moment I have pango Version 1:1.44.3-1 which does not include the fix ...
So was is a mix between upstream and distro issue 😄

Thank you all for your help! 😛
Tracing down the includepath and having a look at upstream did the trick for me!

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

3 participants