Bug 273679

Summary: emulators/openmsx: Fails to build with GCC 13: error: 'uint32_t' was not declared in this scope
Product: Ports & Packages Reporter: Lorenzo Salvadore <salvadore>
Component: Individual Port(s)Assignee: Lorenzo Salvadore <salvadore>
Status: Open ---    
Severity: Affects Only Me    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Lorenzo Salvadore freebsd_committer freebsd_triage 2023-09-10 07:31:49 UTC
This bug report blocks the update of GCC_DEFAULT to 13. This webpage can help finding ta fix: https://gcc.gnu.org/gcc-13/porting_to.html

In file included from src/utils/hash_map.hh:9,
                 from src/serialize_meta.hh:4,
                 from src/serialize_core.hh:5,
                 from src/serialize.hh:4,
                 from src/EmuDuration.hh:4,
                 from src/EmuTime.hh:4,
                 from src/DynamicClock.hh:4,
                 from src/Autofire.hh:5,
                 from src/Autofire.cc:1:
src/utils/hash_set.hh: In static member function 'static unsigned int hash_set<Value, Extractor, Hasher, Equal>::nextPowerOf2(unsigned int)':
src/utils/hash_set.hh:653:58: error: 'uint32_t' was not declared in this scope
  653 |                 static_assert(sizeof(unsigned) == sizeof(uint32_t), "only works for exactly 32 bit");
      |                                                          ^~~~~~~~
src/utils/hash_set.hh:14:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   13 | #include <cstdlib>
  +++ |+#include <cstdint>
   14 | #include <functional>

Full log: https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/openmsx-18.0_1.log
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-11-18 10:29:10 UTC
I remove the block for GCC default version update: latest test on FreeBSD 13.2 did not report any issue with this port. The bug report can probably be safely closed once FreeBSD 12 goes EOL.