Bug 104622 - fontconfig.pc introduces hardcoded -I/usr/include/glib-2.0
Summary: fontconfig.pc introduces hardcoded -I/usr/include/glib-2.0
Status: RESOLVED FIXED
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: fontconfig-bugs
QA Contact: Behdad Esfahbod
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 09:59 UTC by Mohan R
Modified: 2018-01-14 10:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mohan R 2018-01-14 09:59:42 UTC
fontconfig.pc.in contains "Cflags: -I${includedir} @EXPAT_CFLAGS@ @FREETYPE_CFLAGS@ @ICONV_CFLAGS@ @LIBXML2_CFLAGS@" which hardcodes -I/usr/include/glib-2.0 into fontconfig.pc after compilation.

when pkg-config used with PKG_CONFIG_PATH=<custompath>/usr/lib/pkgconfig:/usr/lib/pkgconfig, pkg-config puts -I/usr/include/glib-2.0 instead of -I<custompath>/usr/include/glib-2.0

I think its better to use Requires: instead of using Cflags: to include dependency libraries
Comment 1 Akira TAGOH 2018-01-14 10:11:01 UTC
No dependencies in fontconfig to glib. you might get confused with  other library.
Comment 2 Mohan R 2018-01-14 10:24:18 UTC
$ pkg-config --cflags libxml-2.0
-I/usr/include/glib-2.0

this gets into @LIBXML2_CFLAGS@ and used in fontconfig.pc.in
Comment 3 Mohan R 2018-01-14 10:32:24 UTC
apologies, not libxml2, its freetype2 which depends on harfbuzz which depends on glib2 introduces -I/usr/include/glib-2.0

$ pkg-config -cflags freetype2
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

this whole line gets into @FREETYPE_CFLAGS@ and gets hardcoded into fontconfig.pc
Comment 4 Akira TAGOH 2018-01-14 10:49:58 UTC
Fixed in git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.