[MacPorts] #59992: ncurses at 6.1 : /opt/local/include/unctrl.h:60:63: error: unknown type name 'SCREEN'

MacPorts noreply at macports.org
Mon Jan 20 19:20:45 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:
 Keywords:          |       Port:  ncurses
--------------------+----------------------
 our `ncurses` port is 6.1, and appears to include some new functionality
 with respect to screen pointers that can cause build errors with software
 not expecting this.

 Most MacOS systems are using ncurses < 6.0, and this can generate errors
 like this, when building software that calls in the SDK's headers, eg
 #53155:

 {{{
 In file included from
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/ncurses.h:141:
 /opt/local/include/unctrl.h:60:63: error: unknown type name 'SCREEN'
 NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*,
 chtype);
                                                               ^
 /opt/local/include/unctrl.h:60:53: error: function cannot return function
 type 'char *(int *, chtype)' (aka 'char *(int *, unsigned int)')
 NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*,
 chtype);
                                                     ^
 /opt/local/include/unctrl.h:60:54: error: a parameter list without types
 is only allowed in a function definition
 NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*,
 chtype);
                                                      ^
 3 errors generated.
 }}}

 I recently ran into this trying to enable the LLVM test suite for libtapi
 on Darwin, which errors out with that error.

 There are many reports of this issue on Google, and they all say to
 "uninstall MacPorts" or "get rid of that" etc. Google this :
 {{{
 "error: unknown type name 'SCREEN'"
 }}}
 for a number of examples.

 It looks like this new SCREEN functionality is optional
 {{{
 Extensions:
   --disable-ext-funcs     disable function-extensions
   --enable-sp-funcs       enable SCREEN-extensions
 }}}

 however, when I tried this in ncurses:
 {{{
 configure.args-append --disable-sp-funcs
 }}}
 it failed due to :
 {{{
 ../ncurses/./base/new_pair.c:280:25: error: use of undeclared identifier
 'sp'
 /usr/bin/clang -DHAVE_CONFIG_H -I../ncurses -I. -I../include
 -D_DARWIN_C_SOURCE -DNDEBUG -pipe -Os -arch x86_64 -arch i386 -no-cpp-
 precomp --param max-inline-insns-single=1200 -dynamic -c
 ../ncurses/./base/resizeterm.c -o ../obj_s/resizeterm.o
                 if (_nc_reserve_pairs(sp, pair) == 0) {
                                       ^
 1 error generated.
 make[1]: *** [../obj_s/new_pair.o] Error 1
 make[1]: *** Waiting for unfinished jobs....
 }}}

 On a case-by-case basis, you can sometimes block the troublesome MacPorts
 header like this:
 {{{
 configure.cppflags-append -DNCURSES_UNCTRL_H_incl
 }}}
 but of course that is less than ideal.

 I'm not sure if we are finding the new SCREEN functionality useful, but
 perhaps if not, disabling it for now until all the various software
 catches up might be useful.

-- 
Ticket URL: <https://trac.macports.org/ticket/59992>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list