lewdlime / abcm2ps

abcm2ps is a command line program which converts ABC to music sheet in PostScript or SVG format. It is an extension of abc2ps which may handle many voices per staff. abcm2ps is Copyright © 2014-2016 Jean-Francois Moine.
http://moinejf.free.fr/
GNU General Public License v3.0
82 stars 31 forks source link

Unable to compile on (Arch-)Linux #57

Closed christian-heusel closed 5 years ago

christian-heusel commented 5 years ago

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! :blush:

gcc --version -> gcc (GCC) 9.1.0
uname -r      -> Linux x 5.2.6-1-ARCH
MaxPerl commented 5 years ago

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

moinejf commented 5 years ago

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/) which includes <freetype/freetype.h> which defines FT_Face. So, it seems that this is a bug in your distro.

christian-heusel commented 5 years ago

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 :smile:

MaxPerl commented 5 years ago

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

moinejf commented 5 years ago

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 , 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 commented 5 years ago

https://github.com/GNOME/pango/commit/5af6340eef9833f0f8e878939e88d98b11813578

Okey, this seems to be a pango upstream issue... I will have a look if the upstream change fixes my issue :relaxed: 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 :smile:

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