React-собственные ошибки компиляции run-ios, связанные с cmath.h - PullRequest
0 голосов
/ 02 декабря 2018

Установил последнюю версию act-native и Xcode на 10.14 и создал новый проект.Но всякий раз, когда я запускаю run-ios , я получаю ошибки компиляции, связанные с cmath.h : нет членов * в глобальном пространстве имен , например:

В файле, включенном в ./node_modules/react-native/ReactCommon/yoga/yoga/Yoga-internal.h:11: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain / usr / include / c ++ / v1 / cmath: 316: 9: ошибка: в глобальном пространстве имен нет члена с именем isinf с использованием :: isinf;~~ ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath:317:9: error: ни один член с именем 'isnan' в глобальном пространстве имен с использованием :: isnan;

Я не специалист по cpp, в чем может быть проблема?

react-native info

  React Native Environment Info:
    System:
      OS: macOS 10.14.1
      CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 2.65 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.3.0 - /usr/local/bin/node
      Yarn: 1.3.2 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1 
      react-native: 0.57.7 => 0.57.7 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Аргументы компиляции из журналов:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 
    -x c++ 
    -arch x86_64 
    -fmessage-length=0 
    -fdiagnostics-show-note-include-stack 
    -fmacro-backtrace-limit=0 
    -std=c++14 
    -stdlib=libc++ 
    -fmodules 
    -fmodules-cache-path=/Users/breedish/projects/react-native/abz/ios/build/ModuleCache.noindex 
    -fmodules-prune-interval=86400 
    -fmodules-prune-after=345600 
    -fbuild-session-file=/Users/breedish/projects/react-native/abz/ios/build/ModuleCache.noindex/Session.modulevalidation 
    -fmodules-validate-once-per-build-session 
    -Wnon-modular-include-in-framework-module 
    -Werror=non-modular-include-in-framework-module 
    -Wno-trigraphs 
    -fpascal-strings 
    -O0 
    -fno-common 
    -Wno-missing-field-initializers 
    -Wmissing-prototypes 
    -Werror=return-type 
    -Wunreachable-code 
    -Werror=deprecated-objc-isa-usage 
    -Werror=objc-root-class 
    -Wno-non-virtual-dtor 
    -Wno-overloaded-virtual 
    -Wno-exit-time-destructors 
    -Wmissing-braces 
    -Wparentheses 
    -Wswitch 
    -Wunused-function 
    -Wno-unused-label 
    -Wno-unused-parameter 
    -Wunused-variable 
    -Wunused-value 
    -Wempty-body 
    -Wuninitialized 
    -Wconditional-uninitialized 
    -Wno-unknown-pragmas 
    -Wshadow 
    -Wno-four-char-constants 
    -Wno-conversion 
    -Wconstant-conversion 
    -Wint-conversion 
    -Wbool-conversion 
    -Wenum-conversion 
    -Wno-float-conversion 
    -Wnon-literal-null-conversion 
    -Wobjc-literal-conversion 
    -Wshorten-64-to-32 
    -Wnewline-eof 
    -Wno-c++11-extensions 
    -DDEBUG=1 
    -DRCT_DEBUG=1 
    -DRCT_DEV=1 
    -DRCT_NSASSERT=1 
    -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk 
    -fasm-blocks 
    -fstrict-aliasing 
    -Wdeprecated-declarations 
    -Winvalid-offsetof 
    -mios-simulator-version-min=9.0 
    -g 
    -Wno-sign-conversion 
    -Winfinite-recursion 
    -Wmove 
    -Wcomma 
    -Wblock-capture-autoreleasing 
    -Wstrict-prototypes 
    -Wrange-loop-analysis 
    -Wno-semicolon-before-method-body 
    -D__clang_analyzer__ 
    -Xclang 
    -analyzer-output=plist-multi-file 
    -Xclang 
    -analyzer-config 
    -Xclang path-diagnostics-alternate=true 
    -Xclang 
    -analyzer-config 
    -Xclang report-in-main-source-file=true 
    -Xclang 
    -analyzer-config 
    -Xclang nullability:NoDiagnoseCallsToSystemHeaders=true 
    -Xclang 
    -analyzer-checker 
    -Xclang security.insecureAPI.UncheckedReturn 
    -Xclang 
    -analyzer-checker 
    -Xclang security.insecureAPI.getpw 
    -Xclang 
    -analyzer-checker 
    -Xclang security.insecureAPI.gets 
    -Xclang 
    -analyzer-checker 
    -Xclang security.insecureAPI.mkstemp 
    -Xclang 
    -analyzer-checker 
    -Xclang security.insecureAPI.mktemp 
    -Xclang 
    -analyzer-disable-checker 
    -Xclang security.insecureAPI.rand 
    -Xclang 
    -analyzer-disable-checker 
    -Xclang security.insecureAPI.strcpy 
    -Xclang 
    -analyzer-checker 
    -Xclang security.insecureAPI.vfork 
    -iquote /Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/yoga-generated-files.hmap 
    -I/Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/yoga-own-target-headers.hmap 
    -I/Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/yoga-all-target-headers.hmap 
    -iquote /Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/yoga-project-headers.hmap 
    -I/Users/breedish/projects/react-native/abz/ios/build/Build/Products/Debug-iphonesimulator/include 
    -I/Users/breedish/projects/react-native/abz
    /ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/DerivedSources/x86_64 
    -I/Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/DerivedSources 
    -Wextra 
    -Wall 
    -Wno-semicolon-before-method-body 
    -F/Users/breedish/projects/react-native/abz/ios/build/Build/Products/Debug-iphonesimulator 
    -MMD 
    -MT dependencies 
    -MF /Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/StaticAnalyzer/React/yoga/normal/x86_64/YGNode.d 
    --analyze /Users/breedish/projects/react-native/abz/node_modules/react-native/ReactCommon/yoga/yoga/YGNode.cpp 
    -o /Users/breedish/projects/react-native/abz/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/yoga.build/StaticAnalyzer/React/yoga/normal/x86_64/YGNode.plist
...