Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-ios failures related to cmath.h #22476

Closed
3 tasks done
tinyzero4 opened this issue Dec 2, 2018 · 2 comments
Closed
3 tasks done

run-ios failures related to cmath.h #22476

tinyzero4 opened this issue Dec 2, 2018 · 2 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@tinyzero4
Copy link

tinyzero4 commented Dec 2, 2018

Environment

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

Description

Installed latest version of react-native and Xcode on 10.14 and created new project. But whenever i run run-ios i get compilation errors related to cmath.h: no members * in the global namespace, e.g.:

In file included from ./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: error: no member named 'isinf' in the global namespace using ::isinf; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cmath:317:9: error: no member named 'isnan' in the global namespace using ::isnan;

All errors are related to ReactCommon/yoga/yoga/* but it seems the root cause lives elsewhere. I'm not an expert in cpp, what could be the problem and how to fix it? My environment:

In logs i can see the following flags to clang:

/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
@tinyzero4
Copy link
Author

brew doctor produces

Your system is ready to brew.

@orta
Copy link
Contributor

orta commented Mar 19, 2019

Interesting, this seems to be related to the ordering of imports but I'm unsure why it would be uniquely happening on your project instead of to everyone. I tried a new project from scratch and didn't get these issues.

My guess is that maybe you had:

  • A bad build cache in Xcode's derived data from an upgrade?
  • The command line tools setup in Xcode's prefs being an outdated version of Xcode

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants