RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1645218 - Build failures when using freetype: 'FT_ENCODING_PRC' undeclared
Summary: Build failures when using freetype: 'FT_ENCODING_PRC' undeclared
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: freetype
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Marek Kašík
QA Contact: Desktop QE
URL:
Whiteboard:
: 1651788 1657101 (view as bug list)
Depends On:
Blocks: 1633602 1652187
TreeView+ depends on / blocked
 
Reported: 2018-11-01 16:24 UTC by Jan Horak
Modified: 2022-03-13 15:56 UTC (History)
12 users (show)

Fixed In Version: freetype-2.8-13.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1652187 (view as bug list)
Environment:
Last Closed: 2019-08-06 12:02:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2021 0 None None None 2019-08-06 12:02:49 UTC

Description Jan Horak 2018-11-01 16:24:14 UTC
I'm trying to rebuild ImageMagick package which requires freetype and I'm getting following error:
In file included from magick/annotate.c:85:0:
magick/annotate.c: In function 'RenderFreetype':
/usr/include/freetype2/freetype/freetype.h:801:37: error: 'FT_ENCODING_PRC' undeclared (first use in this function)
 #define ft_encoding_gb2312          FT_ENCODING_PRC
                                     ^
magick/annotate.c:1148:23: note: in expansion of macro 'ft_encoding_gb2312'
         encoding_type=ft_encoding_gb2312;
                       ^
/usr/include/freetype2/freetype/freetype.h:801:37: note: each undeclared identifier is reported only once for each function it appears in
 #define ft_encoding_gb2312          FT_ENCODING_PRC
                                     ^
magick/annotate.c:1148:23: note: in expansion of macro 'ft_encoding_gb2312'
         encoding_type=ft_encoding_gb2312;
                       ^
Brew task: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19026074
(I'm getting the same error with scratch build to 7.6-z)

Comment 2 Marek Kašík 2018-11-09 12:22:34 UTC
Thank you for reporting this. I've prepared a simple fix which fixes the definition of the constant "ft_encoding_gb2312".

Comment 6 Marek Kašík 2018-11-21 08:56:04 UTC
*** Bug 1651788 has been marked as a duplicate of this bug. ***

Comment 8 Marek Kašík 2018-12-07 10:13:17 UTC
*** Bug 1657101 has been marked as a duplicate of this bug. ***

Comment 9 Peter Schaefer 2018-12-07 18:46:53 UTC
When will freetype-2.8-13.el7 become available? Thank you.

Comment 10 Marek Kašík 2018-12-07 19:01:11 UTC
(In reply to Peter Schaefer from comment #9)
> When will freetype-2.8-13.el7 become available? Thank you.

I'm sorry, I can not comment on when something will be available.

Comment 11 Michael Peters 2018-12-07 20:17:00 UTC
For those needing a quick fix, you can likely patch the source of what you are trying to build to work with existing freetype header, e.g.

--- ImageMagick-7.0.8-15.orig/MagickCore/annotate.c     2018-12-01 18:23:03.000000000 -0800
+++ ImageMagick-7.0.8-15/MagickCore/annotate.c  2018-12-06 21:51:45.846325573 -0800
@@ -1406,7 +1406,7 @@
       if (LocaleCompare(encoding,"BIG5") == 0)
         encoding_type=ft_encoding_big5;
       if (LocaleCompare(encoding,"GB2312") == 0)
-        encoding_type=ft_encoding_gb2312;
+        encoding_type=FT_ENCODING_GB2312;
       if (LocaleCompare(encoding,"Johab") == 0)
         encoding_type=ft_encoding_johab;
 #if defined(ft_encoding_latin_1)

Comment 12 Peter Schaefer 2018-12-07 20:18:25 UTC
(In reply to Michael Peters from comment #11)
> For those needing a quick fix, you can likely patch the source of what you
> are trying to build to work with existing freetype header, e.g.
> 
> --- ImageMagick-7.0.8-15.orig/MagickCore/annotate.c     2018-12-01
> 18:23:03.000000000 -0800
> +++ ImageMagick-7.0.8-15/MagickCore/annotate.c  2018-12-06
> 21:51:45.846325573 -0800
> @@ -1406,7 +1406,7 @@
>        if (LocaleCompare(encoding,"BIG5") == 0)
>          encoding_type=ft_encoding_big5;
>        if (LocaleCompare(encoding,"GB2312") == 0)
> -        encoding_type=ft_encoding_gb2312;
> +        encoding_type=FT_ENCODING_GB2312;
>        if (LocaleCompare(encoding,"Johab") == 0)
>          encoding_type=ft_encoding_johab;
>  #if defined(ft_encoding_latin_1)

Thank you! Exactly what we needed.

Comment 13 post 2018-12-10 18:25:31 UTC
Thank you for the patch, it was a life saver for me when I needed to compile ImageMagick 7.0.8-15 only a few hours ago.

Then a few hours later when I needed to compile ImageMagick on some more servers, ImageMagick 7.0.8-16 was released, and the bug is no longer present in that latest version.

I just wanted to let you know the patch is no longer needed in 7.0.8-16. Thanks.

Comment 14 unclexiao 2018-12-13 07:17:47 UTC
I have the same problem...

CentOS Linux release 7.5.1804 (Core)

Comment 17 errata-xmlrpc 2019-08-06 12:02:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2021


Note You need to log in before you can comment on or make changes to this bug.