Bug 1474072

Summary: fontconfig-devel provides incorrect includedir in /usr/lib64/pkgconfig/fontconfig.pc
Product: [Fedora] Fedora Reporter: Alexandr Kondratev <theg4sh>
Component: fontconfigAssignee: Akira TAGOH <tagoh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: fonts-bugs, i18n-bugs, pnemade, tagoh, theg4sh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-24 03:28:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Compilation check none

Description Alexandr Kondratev 2017-07-23 15:14:36 UTC
Created attachment 1303238 [details]
Compilation check

Description of problem:
See subj.

Version-Release number of selected component (if applicable):
fontconfig-devel-2.12.1-4.fc26.x86_64


How reproducible:

Steps to Reproduce:
1. dnf install fontconfig-devel
2. # Unpack tarball from attachment. 
3. cd xfontchk
4. make

Actual results:
c99 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16   -I/usr/include/freetype2 -I/usr/include/libpng16  -DVERSION="0.7" -D_XOPEN_SOURCE=600 -O -c xfontchk.c
xfontchk.c:2:10: fatal error: fontconfig.h: No such file or directory
 #include <fontconfig.h>
          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:7: xfontchk.o] Error 1


Expected results:
c99 -I/usr/X11R6/include -I/usr/include/fontconfig -I/usr/include/freetype2 -I/usr/include/libpng16   -I/usr/include/freetype2 -I/usr/include/libpng16  -DVERSION="0.7" -D_XOPEN_SOURCE=600 -O -c xfontchk.c
c99 -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXft -lfontconfig -lfreetype  -lfreetype  -o xfontchk xfontchk.o



Additional info:
Due to fontconfig-devel provides only /usr/include/fontconfig folder, the solution is:
$ diff /usr/lib64/pkgconfig/fontconfig.pc{.orig,}
4c4
< includedir=/usr/include
---
> includedir=/usr/include/fontconfig

which give expected result.

Comment 1 Alexandr Kondratev 2017-07-23 15:52:36 UTC
Formatted patch:

--- /usr/lib64/pkgconfig/fontconfig.pc  2017-07-23 17:52:51.844365570 +0300
+++ /usr/lib64/pkgconfig/fontconfig.pc  2017-07-23 18:09:14.221529256 +0300
@@ -1,7 +1,7 @@
 prefix=/usr
 exec_prefix=/usr
 libdir=/usr/lib64
-includedir=/usr/include
+includedir=/usr/include/fontconfig
 sysconfdir=/etc
 localstatedir=/var
 PACKAGE=fontconfig

Comment 2 Akira TAGOH 2017-07-24 03:28:55 UTC
Many applications has #include <fontconfig/fontconfig.h> long time since it has been launched. I won't fix that since this affects so many.