Opened 21 months ago
Closed 21 months ago
#67019 closed defect (fixed)
rogue @5.4.4_3: error: incomplete definition of type 'struct term'
Reported by: | ShadSterling (Shad Sterling) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | ventura | Cc: | |
Port: | rogue |
Description
This looks like the same problem as #54171, even though the log shows patch-mdport.c.diff
is applied. The version still shows @5.4.4_3
, the same as in #54171; I would have expected it to have advanced with the fix. The only apparent difference is the line numbers
---> Computing dependencies for rogue ---> Fetching archive for rogue ---> Attempting to fetch rogue-5.4.4_3.darwin_22.x86_64.tbz2 from https://packages.macports.org/rogue ---> Attempting to fetch rogue-5.4.4_3.darwin_22.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/rogue ---> Attempting to fetch rogue-5.4.4_3.darwin_22.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/rogue ---> Fetching distfiles for rogue ---> Verifying checksums for rogue ---> Extracting rogue ---> Applying patches to rogue ---> Configuring rogue ---> Building rogue Error: Failed to build rogue: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_rogue/rogue/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port rogue failed
:info:build mdport.c:265:17: error: incomplete definition of type 'struct term' :info:build if (cur_term->type.Strings == NULL) :info:build ~~~~~~~~^ :info:build /opt/local/include/term.h:718:1: note: forward declaration of 'struct term' :info:build TERMINAL; :info:build ^ :info:build /opt/local/include/term.h:717:25: note: expanded from macro 'TERMINAL' :info:build #define TERMINAL struct term :info:build ^ :info:build 1 error generated.
Attachments (1)
Change History (4)
Changed 21 months ago by ShadSterling (Shad Sterling)
comment:1 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign removed |
---|---|
Owner: | set to ryandesign |
Status: | new → accepted |
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 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.
comment:3 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Replying to ShadSterling:
There's no reason to increase a port's revision when one is only fixing a build failure.