Bug 2336258

Summary: R-systemfonts fails to compile with GCC 15 ("ft_cache.h:154:18: error: 'uint32_t' has not been declared")
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: R-systemfontsAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: quantum.analyst, r-maint-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: R-systemfonts-1.1.0-2.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-12 08:48:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2333037    

Description Dave Malcolm 2025-01-07 22:24:29 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476049/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8477603/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476049-R-systemfonts/builder-live.log.gz

I see:

In file included from ft_cache.cpp:1:
ft_cache.h:154:18: error: 'uint32_t' has not been declared
  154 |   bool has_glyph(uint32_t index);
      |                  ^~~~~~~~
ft_cache.h:155:19: error: 'uint32_t' has not been declared
  155 |   bool load_glyph(uint32_t index);
      |                   ^~~~~~~~
ft_cache.h:157:31: error: 'uint32_t' has not been declared
  157 |   GlyphInfo cached_glyph_info(uint32_t index, int& error);
      |                               ^~~~~~~~
ft_cache.h:158:23: error: 'uint32_t' has not been declared
  158 |   double string_width(uint32_t* string, int length, bool add_kern);
      |                       ^~~~~~~~
ft_cache.h:162:20: error: 'uint32_t' has not been declared
  162 |   bool get_kerning(uint32_t left, uint32_t right, long &x, long &y);
      |                    ^~~~~~~~
ft_cache.h:162:35: error: 'uint32_t' has not been declared
  162 |   bool get_kerning(uint32_t left, uint32_t right, long &x, long &y);
      |                                   ^~~~~~~~
ft_cache.h:163:22: error: 'uint32_t' has not been declared
  163 |   bool apply_kerning(uint32_t left, uint32_t right, long &x, long &y);
      |                      ^~~~~~~~
ft_cache.h:163:37: error: 'uint32_t' has not been declared
  163 |   bool apply_kerning(uint32_t left, uint32_t right, long &x, long &y);
      |                                     ^~~~~~~~
ft_cache.h:174:12: error: 'uint32_t' was not declared in this scope
  174 |   std::map<uint32_t, GlyphInfo> glyphstore;
      |            ^~~~~~~~
ft_cache.h:15:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   14 | #include "cache_lru.h"
  +++ |+#include <cstdint>
   15 | 

Looks like this header should have been explicitly included, but old versions of the C++ stdlib happened to do it for you so it happened to work before.  Hopefully the fix is to simply add that #include.

Reproducible: Always

Comment 1 Elliott Sales de Andrade 2025-01-12 08:48:14 UTC
Backported a fix from upstream.