fatal error: could not build module 'Darwin'
fatal error: could not build module 'Darwin'
我是 vapor 的新手,我刚在 MacOS 上安装,在构建它时出现以下错误。有谁知道如何修理它?我已经搜索过,但提到的大多数解决方案都是针对 iOS 而不是 MacOS。
While building module 'Darwin' imported from /Users/imac1/ROOT/Vapor/Hello/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h:35:
In file included from <module-includes>:357:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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);
^
In file included from /Users/imac1/ROOT/Vapor/Hello/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/c_nio_http_parser.c:24:
/Users/imac1/ROOT/Vapor/Hello/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h:35:10: fatal error: could not build module 'Darwin'
#include <stddef.h>
~~~~~~~~^
4 errors generated.
[0/20] Compiling CNIOHTTPParser c_nio_http_parser.c
[1/20] Compiling CNIOLinux shim.c
[2/20] Compiling CNIOZlib empty.c
[3/20] Compiling CNIOLinux ifaddrs-android.c
[3/20] Compiling CNIOOpenSSL shims.c
[3/20] Compiling CNIOOpenSSL helpers.c
[3/20] Compiling CNIODarwin shim.c
[3/20] Compiling CNIOSHA1 c_nio_sha1.c
卸载 MacPorts - 它会在不应该安装的地方安装头文件,编译器使用这些头文件而不是 Xcode
捆绑的头文件
我是 vapor 的新手,我刚在 MacOS 上安装,在构建它时出现以下错误。有谁知道如何修理它?我已经搜索过,但提到的大多数解决方案都是针对 iOS 而不是 MacOS。
While building module 'Darwin' imported from /Users/imac1/ROOT/Vapor/Hello/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h:35:
In file included from <module-includes>:357:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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);
^
In file included from /Users/imac1/ROOT/Vapor/Hello/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/c_nio_http_parser.c:24:
/Users/imac1/ROOT/Vapor/Hello/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include/c_nio_http_parser.h:35:10: fatal error: could not build module 'Darwin'
#include <stddef.h>
~~~~~~~~^
4 errors generated.
[0/20] Compiling CNIOHTTPParser c_nio_http_parser.c
[1/20] Compiling CNIOLinux shim.c
[2/20] Compiling CNIOZlib empty.c
[3/20] Compiling CNIOLinux ifaddrs-android.c
[3/20] Compiling CNIOOpenSSL shims.c
[3/20] Compiling CNIOOpenSSL helpers.c
[3/20] Compiling CNIODarwin shim.c
[3/20] Compiling CNIOSHA1 c_nio_sha1.c
卸载 MacPorts - 它会在不应该安装的地方安装头文件,编译器使用这些头文件而不是 Xcode
捆绑的头文件