使用 Xcode 8.3.2 编译 cocoa 伐木工人会导致 DDOSLogger.m 中的错误



尝试通过可可豆荚构建可可伐木工/雨燕。编译最新的标签 3.2.0 最终会在 DDOSLogger.m 中出现错误下面是一个示例:

        .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:68:17: error: static_assert failed "formatters/labels/descriptions must be a constant string"
                os_log_debug(OS_LOG_DEFAULT, msg);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'os' imported from .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:18:
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/log.h:271:9: note: expanded from macro 'os_log_debug'
        os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/log.h:175:9: note: expanded from macro 'os_log_with_type'
        OS_LOG_CALL_WITH_FORMAT(_os_log_impl, 
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'os' imported from .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:18:
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/trace_base.h:59:28: note: expanded from macro 'OS_LOG_CALL_WITH_FORMAT'
        OS_LOG_PRAGMA_PUSH OS_LOG_STRING(LOG, _os_fmt_str, fmt); 
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/trace_base.h:50:9: note: expanded from macro 'OS_LOG_STRING'
        _Static_assert(__builtin_constant_p(_str), 
        ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~
.../Pods/CocoaLumberjack/Classes/DDOSLogger.m:68:17: error: array initializer must be an initializer list or string literal
In module 'os' imported from .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:18:
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/log.h:271:9: note: expanded from macro 'os_log_debug'
        os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__)
        ^
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/log.h:175:9: note: expanded from macro 'os_log_with_type'
        OS_LOG_CALL_WITH_FORMAT(_os_log_impl, 
        ^
In module 'os' imported from .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:18:
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/trace_base.h:59:47: note: expanded from macro 'OS_LOG_CALL_WITH_FORMAT'
        OS_LOG_PRAGMA_PUSH OS_LOG_STRING(LOG, _os_fmt_str, fmt); 
                                              ^
.../Pods/CocoaLumberjack/Classes/DDOSLogger.m:68:46: error: os_log() format argument is not a string constant
                os_log_debug(OS_LOG_DEFAULT, msg);
                                             ^~~
In module 'os' imported from .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:18:
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/log.h:271:50: note: expanded from macro 'os_log_debug'
        os_log_with_type(log, OS_LOG_TYPE_DEBUG, format, ##__VA_ARGS__)
                                                 ^~~~~~
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/log.h:176:55: note: expanded from macro 'os_log_with_type'
                (&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); 
                                                      ^~~~~~
In module 'os' imported from .../Pods/CocoaLumberjack/Classes/DDOSLogger.m:18:
/Applications/Xcode 8.3.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/include/os/trace_base.h:60:65: note: expanded from macro 'OS_LOG_CALL_WITH_FORMAT'
        uint8_t _os_fmt_buf[__builtin_os_log_format_buffer_size(fmt, ##__VA_ARGS__)]; 
                                                                ^~~

我已经更新了可可豆荚,用最后一个Xcode 8.3.1尝试了这个,清理了所有东西,等等......没有运气。令我惊讶的是,我找不到任何关于此的讨论......显然我没有收到消息,因为其他人要么可以工作,要么正在使用较旧的标签。

使用标签 3.1.0 工作正常,我相信它没有包含 DDOSLogger。

我不确定您是否设法解决此问题,但此处描述了类似的问题 - https://github.com/CocoaLumberjack/CocoaLumberjack/issues/883

从本质上讲,这是CocoaLumberjack中的一个错误,该错误出现在新版本的Xcode中,并且已经得到修复。

相关内容

  • 没有找到相关文章

最新更新