[MacPorts] #59992: ncurses at 6.1 : /opt/local/include/unctrl.h:60:63: error: unknown type name 'SCREEN'
MacPorts
noreply at macports.org
Thu Feb 20 20:42:13 UTC 2020
#59992: ncurses at 6.1 : /opt/local/include/unctrl.h:60:63: error: unknown type name
'SCREEN'
----------------------+----------------------
Reporter: kencu | Owner: jmroot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: ncurses |
----------------------+----------------------
Comment (by kencu):
OK -- so is there any fix or workaround to our `ncurses` port that would
be considered acceptable?
I don't think it's realistic to ask Apple to fix their `modules`
implementation, whatever is wrong with it that causes it to pull in our
`unctl.h` header instead of the one in the SDK. Leaving this broken can't
really be a great plan.
in `uncntl.h` there is
{{{
#include <curses.h>
#undef unctrl
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
#if 1
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*,
chtype);
#endif
}}}
I could patch in an extra guard in there to exclude Apple's curses 5.x
curses.h from pulling in the SCREEN definition, like this:
{{{
#include <curses.h>
#undef unctrl
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
#if NCURSES_VERSION_MAJOR > 5
#if 1
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*,
chtype);
#endif
#endif
}}}
And then I think we'd change nothing in our port, but we'd no longer be
broken with Apple's modules. I have confirmed on my systems here that
fixes the problem with modules by blocking our header from defining
SCREEN.
Otherwise I guess we get Jeremy or some similar Apple engineer in here to
tell us how to make MacPorts' `ncurses` port play nice with Apple's clang
modules implementation.
As mentioned above, the general fix on the internet / stack exchange, etc
is to just "uninstall MacPorts".
--
Ticket URL: <https://trac.macports.org/ticket/59992#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list