Bug 266191 - emulators/openmsx: Fails to build with GCC 12: error: 'time_t' does not name a type
Summary: emulators/openmsx: Fails to build with GCC 12: error: 'time_t' does not name ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Lorenzo Salvadore
URL: http://package18.nyi.freebsd.org/data...
Keywords:
Depends on:
Blocks: 265948
  Show dependency treegraph
 
Reported: 2022-09-03 09:14 UTC by Lorenzo Salvadore
Modified: 2022-09-09 11:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-03 09:14:29 UTC
Updating GCC_DEFAULT from GCC 11 to GCC 12 is blocked by the fact that building this port with GCC 12 on i386 and amd64 fails.

The error message is the following:



Compiling file/CompressedFileAdapter.cc...
In file included from src/file/CompressedFileAdapter.hh:4,
                 from src/file/CompressedFileAdapter.cc:1:
src/file/FileBase.hh:34:31: error: 'time_t' does not name a type
   34 |         [[nodiscard]] virtual time_t getModificationDate() = 0;
      |                               ^~~~~~
src/file/FileBase.hh:8:1: note: 'time_t' is defined in header '<ctime>'; did you forget to '#include <ctime>'?
    7 | #include <string>
  +++ |+#include <ctime>
    8 | 
src/file/CompressedFileAdapter.hh:34:30: error: 'time_t openmsx::CompressedFileAdapter::getModificationDate()' marked 'final', but is not virtual
   34 |         [[nodiscard]] time_t getModificationDate() final;
      |                              ^~~~~~~~~~~~~~~~~~~
src/file/CompressedFileAdapter.cc: In member function 'time_t openmsx::CompressedFileAdapter::getModificationDate()':
src/file/CompressedFileAdapter.cc:128:29: error: 'class openmsx::FileBase' has no member named 'getModificationDate'
  128 |         return file ? file->getModificationDate()
      |                             ^~~~~~~~~~~~~~~~~~~
gmake[1]: *** [build/main.mk:498: derived/x86-freebsd-i686/obj/file/CompressedFileAdapter.cc.o] Error 1




Please see also the log in the URL field. This URL might be useful to solve the issue: http://gcc.gnu.org/gcc-12/porting_to.html .
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2022-09-03 17:24:21 UTC
^Triage: Reporter is committer, assign accordingly.
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-08 23:22:18 UTC
Maintainer-feedback flag removed: the maintainer has dropped maintainership, see bug #266294.

Daniel: Since you dropped maintainership, I guess you are not interested to follow this bug any more. If this is indeed the case you might want to remove yourself from the CC list.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-09-09 11:21:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=80bb8af766f42899b48e0af552f1305ce3b17029

commit 80bb8af766f42899b48e0af552f1305ce3b17029
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2022-09-09 11:16:11 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2022-09-09 11:20:33 +0000

    emulators/openmsx: Fix build with GCC 12

    Fix build with GCC 12 which is soon to become GCC_DEFAULT version.

    PR:             266191
    Reported by:    exp-run (antoine)

 emulators/openmsx/files/patch-src_file_FileBase.hh (new) | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 4 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-09 11:23:18 UTC
Fixed.