Skip to content

Xcode 10: Build input file double-conversion cannot be found #21168

Closed
@rodrigoelp

Description

@rodrigoelp

Environment

>> react-native info 

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
      Memory: 554.38 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 

Description

The cli is broken once you have installed xcode 10. Creating any new project will render the same issue (compilation failure) as it seems to be failing compiling double conversion as illustrated below:

react-native run-ios
Found Xcode project awesome.xcodeproj
Launching iPhone 6 (iOS 12.0)...
Building using "xcodebuild -project awesome.xcodeproj -configuration Debug -scheme awesome -destination id=F0EA48DA-E7A0-4E8F-92B3-3D4A2AA93B76 -derivedDataPath build"
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.h
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/YGEnums.h
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/YGMacros.h
▸ Compiling YGStyle.cpp
▸ Compiling YGLayout.cpp
▸ Compiling Yoga.cpp
▸ Compiling YGNode.cpp
▸ Compiling YGNodePrint.cpp
▸ Compiling YGFloatOptional.cpp
▸ Compiling YGEnums.cpp
▸ Compiling Utils.cpp
▸ Analyzing Yoga.cpp
▸ Analyzing YGStyle.cpp
▸ Analyzing YGNodePrint.cpp
▸ Analyzing YGNode.cpp
▸ Analyzing YGLayout.cpp
▸ Analyzing YGFloatOptional.cpp
▸ Analyzing YGEnums.cpp
▸ Analyzing Utils.cpp
▸ Building library libyoga.a
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/jsinspector/InspectorInterfaces.h
▸ Compiling InspectorInterfaces.cpp
▸ Analyzing InspectorInterfaces.cpp
▸ Building library libjsinspector.a
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h
▸ Compiling PrivateDataBase.cpp
▸ Analyzing PrivateDataBase.cpp
▸ Building library libprivatedata.a
▸ Running script 'Install Third Party'
▸ Compiling strtod.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc'


▸ Compiling fast-dtoa.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc'


▸ Compiling fixed-dtoa.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc'


▸ Compiling double-conversion.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc'


▸ Compiling diy-fp.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc'


▸ Compiling cached-powers.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc'


▸ Compiling bignum.cc

❌  error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc'


** BUILD FAILED **


The following build commands failed:
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(7 failures)

Installing build/Build/Products/Debug-iphonesimulator/awesome.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/awesome.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/awesome.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:602:13)
    at Object.execFileSync (child_process.js:622:13)
    at Promise.then (/Users/rod/dev/react/testing/awesome/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

Reproducible Demo

  1. Let you mac update to xcode 10 and command line tools.
  2. Create brand new project react-native init awesomeApp
  3. Once it has finished setting up, run cd awesomeApp && react-native run-ios

Workaround for new projects

Once the project has been initialised, kill facebook's team identifiers with

sed -i '' '/DevelopmentTeam = V9WTTPBFK9/d;/DEVELOPMENT_TEAM/d;/ProvisioningStyle = Automatic/d' ./node_modules/react-native/React/React.xcodeproj/project.pbxproj

Running react-native run-ios this time should work.

Activity

otaviogaiao

otaviogaiao commented on Sep 18, 2018

@otaviogaiao

I was having a similar issue, in my case, just accepting the xcode license solved all issues.

kelset

kelset commented on Sep 18, 2018

@kelset
Contributor

Support for XCode 10 is not fully tested yet - please refer to #19573 to know what's the current status. That said if accepting the license is the solution please close this issue.

omatrot

omatrot commented on Sep 18, 2018

@omatrot

I have the same errors with an existing project, building in XCode or from React Native CLI. Probably not a licence issue.

mattijsf

mattijsf commented on Sep 18, 2018

@mattijsf
Contributor

I was facing a similar issue after upgrading. To solve it I ran the following commands:

$ cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
$ cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../

Now Xcode builds fine.

kelset

kelset commented on Sep 18, 2018

@kelset
Contributor

Do you have to run those commands on new projects too @mattijsf? Or projects created after you have XCode 10 installed "just work"?

xzilja

xzilja commented on Sep 18, 2018

@xzilja
Contributor

In my case this answer helped
https://stackoverflow.com/questions/50718018/xcode-10-error-multiple-commands-produce/50721769

Had to remove info plist files from specified location, there are couple caveats in XCode 10 that are not necessarily react-native specific.

chrisbianca

chrisbianca commented on Sep 18, 2018

@chrisbianca

I'm seeing the same too. @mattijsf's solution did allow iOS to compile, however as a side effect, I then saw the following errors when trying to run the Android version:

Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
Could not list contents of '/node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'. Couldn't follow symbolic link

Clearing down node_modules and re-running npm install allowed Android to compile, but failed on iOS again.

@kelset In response to your question above - this happened both on an old project created before XCode 10 was installed and a new project created after XCode 10 was installed. It happens on both RN 0.56 and 0.57.

xzilja

xzilja commented on Sep 18, 2018

@xzilja
Contributor

@chrisbianca This happened to me on existing project, try to remove your node modules, clear watchman cache and yarn / npm cache to re-install everything (maybe even try clearing lock files if you can). After I did all that, third party issue wen't away.

This issue has more info: #14382

mattijsf

mattijsf commented on Sep 18, 2018

@mattijsf
Contributor

@kelset I have the same problem after I bootstrap a new project using react-native init and opening ios/[project].xcodeproj in Xcode 10.

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 1.84 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.3.0 - ~/.nvm/versions/node/v8.3.0/bin/node
      Yarn: 1.3.2 - ~/.nvm/versions/node/v8.3.0/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.3.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        Build Tools: 27.0.3, 28.0.2
        API Levels: 25, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7
mattijsf

mattijsf commented on Sep 18, 2018

@mattijsf
Contributor

It feels to me this issue is impacted by some parallel build / racing condition...

I can repeat the following script 10x but I get the same error every time:

rm -rf TestAppRN0570 ; react-native init TestAppRN0570 ; cd TestAppRN0570 ; react-native run-ios ; cd ..

Build input file cannot be found: '.../TestAppRN0570/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc'

However if execute react-native run-ios again for the 2nd time it builds. So basically only the initial run-ios fails.

The same thing can be said with opening the project for the first time in Xcode (without using run-ios) The first build fails, the second build succeeds.

ChrisChares

ChrisChares commented on Sep 18, 2018

@ChrisChares

Thanks @mattijsf, solution worked for me as well. Project originally created with Xcode 9, now compiles correctly with 10 after executing those two scripts.

You can execute them directly btw, no need to cd in and out of their directories

# From project root
$ node_modules/react-native/scripts/ios-install-third-party.sh
$ node_modules/react-native/third-party/glog-0.3.5/configure
mattijsf

mattijsf commented on Sep 18, 2018

@mattijsf
Contributor

@ChrisChares I discovered that running the bare configure script actually produces a faulty config.h, causing issues building on physical devices in Xcode 10. Please consider one of the following approaches:

  • Run the build again after it initially failed (only first build fails). This worked best for me.
  • cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh
hramos

hramos commented on Sep 18, 2018

@hramos
Contributor

The original issue text's workaround for new projects looks like what we already have in place in master (8103c43).

Can people make the change from 8103c43 to their project and verify if that, by itself, solves the issue?

41 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @filipepratalima@hramos@radex@rodrigoelp@mattijsf

        Issue actions

          Xcode 10: Build input file double-conversion cannot be found · Issue #21168 · facebook/react-native