[MacPorts] #67019: rogue @5.4.4_3: error: incomplete definition of type 'struct term'

MacPorts noreply at macports.org
Tue Feb 28 22:59:49 UTC 2023


#67019: rogue @5.4.4_3: error: incomplete definition of type 'struct term'
---------------------------+------------------------
  Reporter:  ShadSterling  |      Owner:  ryandesign
      Type:  defect        |     Status:  accepted
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.1
Resolution:                |   Keywords:  ventura
      Port:  rogue         |
---------------------------+------------------------
Changes (by ryandesign):

 * status:  new => accepted
 * owner:  (none) => ryandesign
 * cc: ryandesign (removed)


Comment:

 rogue is an ancient game having been first developed in the 1980s. Version
 5.4.4 was released in 2007.

 The problem in #54171 was that the ncurses port was updated from version
 6.0 (with which rogue worked) to a 2017 snapshot of a development version
 of ncurses (with which rogue didn't work anymore). The ncurses developers
 decided to make a structure private which had previously been
 (inadvertently?) public and which rogue was using:

 Quoting https://invisible-island.net/ncurses/NEWS.html#index-t20170318:

 > change `TERMINAL` structure in term.h to make it opaque

 The way we fixed it at the time was to `#define NCURSES_INTERNALS` which
 told ncurses to reveal the fields of this structure again, but that was
 bound to be a fragile fix. There's a long discussion about this (and
 another method that rewrote the code to avoid using the internal struct)
 here: https://forums.gentoo.org/viewtopic-t-1100154-start-0.html

 Today, we have ncurses 6.4 in MacPorts, with which you've discovered rogue
 again doesn't work. We also show build failures of rogue on our buildbot
 machines back to November 2021 at which time we had ncurses 6.3. It
 appears that now, defining `NCURSES_INTERNALS` is what causes the problem;
 removing the previously-added patch so that `NCURSES_INTERNALS` is no
 longer defined allows the build to succeed. It looks like the developers
 of ncurses now consider the first field of the struct (which is what rogue
 is using) to be public and the other fields to be private.

 I suspect it was caused by https://invisible-
 island.net/ncurses/NEWS.html#t20210821:

 > move internals of `TERMINAL` structure to new header term.priv.h

 In
 [https://github.com/mirror/ncurses/commit/493e2f7b3fc309879f561a094fdfc15e5304b3d6
 that commit], this comment was added to (the script that generates) the
 term.h header:

 > {{{
 > * The first field in TERMINAL is used in macros.
 > * The remaining fields are private.
 > }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/67019#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list