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

MacPorts noreply at macports.org
Thu Mar 26 05:10:19 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 MarcusCalhoun-Lopez):

 Most of my research on this issue has focused on
 [https://trac.macports.org/ticket/60150 cargo] since that ticket was
 assigned to me.\\
 I hope the ideas are generally applicable.

 Minimal reproducible error is
 {{{
 echo "#import <Foundation/Foundation.h>" | env CPATH=/opt/local/include
 clang -xobjective-c -c -fmodules -v -
 }}}
 The odd part is that this is **not** an error
 {{{
 echo "#import <Foundation/Foundation.h>" | clang -xobjective-c -c
 -fmodules -v -
 echo "#import <Foundation/Foundation.h>" | env CPATH=/opt/local/include
 clang -xobjective-c -c -fmodules -v -
 }}}
 The reason seems to be the flag `-fmodules-cache-path=...`.\\
 {{{
 echo "#import <Foundation/Foundation.h>" | clang -xobjective-c -c
 -fmodules -v -
 }}}
 generates a bunch of precompiled header files.\\
 Once generated,
 {{{
 echo "#import <Foundation/Foundation.h>" | env CPATH=/opt/local/include
 clang -xobjective-c -c -fmodules -v -
 }}}
 uses them with no issues.

 If the cache files are deleted,
 {{{
 echo "#import <Foundation/Foundation.h>" | env CPATH=/opt/local/include
 clang -xobjective-c -c -fmodules -v -
 }}}
 goes back to generating an error.

 It seems that the problem is fundamentally that `CPATH=${prefix}/include`
 prevents the proper generation of precompiled header files.

 The new port in #60150 actually seems to build with the simple addition of
 {{{
 compiler.cpath
 }}}
 Removing `-fmodules` also prevents the error
 {{{
 echo "#import <Foundation/Foundation.h>" | env CPATH=/opt/local/include
 clang -xobjective-c -c -v -
 }}}

 I have not yet experimented with C++20 modules to see if similar issues
 arise.

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


More information about the macports-tickets mailing list