'Multiple commands produce' error when building with new Xcode build system
See original GitHub issueHello,
Environment:
React Native Environment Info:
System OS: macOS High Sierra 10.13.6
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
IDEs:
Xcode: 10 Beta 3
npmPackages:
react: 16.4.1
react-native: 0.56.0
Error:
I got the following error when I try to build the simple RN 0.56 application:
warning: Skipping duplicate build file in Compile Sources build phase: <PATH_TO_PROJECT>/node_modules/react-native/React/Modules/RCTRedBoxExtraDataViewController.m (in target 'React-tvOS')
...
warning: duplicate output file '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTResizeMode.h' on task: PBXCp <PATH_TO_PROJECT>/node_modules/react-native/Libraries/Image/RCTResizeMode.h <HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTResizeMode.h (in target 'React')
...
error: Multiple commands produce '<PbxCp <HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTScrollableProtocol.h>':
1) Target 'React-tvOS' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/React/Views/ScrollView/RCTScrollableProtocol.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTScrollableProtocol.h'
2) Target 'React' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/React/Views/ScrollView/RCTScrollableProtocol.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/React/RCTScrollableProtocol.h'
error: Multiple commands produce '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/double-conversion/fast-dtoa.h':
1) Target 'double-conversion-tvOS' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/double-conversion/fast-dtoa.h'
2) Target 'double-conversion' has copy command from '<PATH_TO_PROJECT>/node_modules/react-native/third-party/double-conversion-1.1.5/src/fast-dtoa.h' to '<HOME>/Library/Developer/Xcode/DerivedData/ReactNativeSimple-dpupkkuvhsslwxgngxzqgwsrazap/Build/Intermediates.noindex/ArchiveIntermediates/ReactNativeSimple/BuildProductsPath/Release-iphoneos/include/double-conversion/fast-dtoa.h'
...
Repro steps:
- react-native init
xcodebuild -project <PATH_TO_PROJECT>/ios/ReactNativeSimple.xcodeproj -scheme ReactNativeSimple archive -sdk iphoneos -archivePath <PATH_TO_PROJECT>/output/build/archive/ReactNativeSimple CODE_SIGN_STYLE=Automatic
Details:
I tested it on the simple RN application that was created by “react-native init” command. When I try to build the app using Xcode 10 GUI - it builds successfully. But I try to build it using xcodebuild command - it failed with the error above.
When we use the same command on the same application (RN 0.56) in Xcode 9.4.1 - it builds successfully
If I don’t specify -sdk param in xcodebuild command it builds successfully.
Note: Errors may be different for the different Xcode 10 Beta versions.
Questions:
Does RN 0.56 support Xcode 10 Beta? How I can fix it? Is there workaround to build it using Xcode 10 Beta?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:24
- Comments:69 (11 by maintainers)
Top Results From Across the Web
Xcode 12.5 Multiple commands produ… - Apple Developer
Hi, I'm from the App Center SDKs team. After updating Xcode from 12.4 to 12.5 our team faced build issues similar to this:...
Read more >Xcode 10 Error: Multiple commands produce - Stack Overflow
this error may happen when you choose a name for your project that is the same as one of the dependencies that you...
Read more >[Xcode 11] 'Multiple commands produce' error when building ...
It looks like a bug or some new issue with new Xcode version. Error response is: Failed to build iOS project. We ran...
Read more >Xcode Error: Multiple commands produce - Handy Opinion
"Multiple commands produce" is a common Error in Xcode when we build our App. Changing Build system to Legacy Build System is a...
Read more >xcode 12 New Build System warns multiple commands ...
xcode 12 New Build System warns multiple commands produce Assets. car. In this case, one explanation is that your Copy Resources build phase...
Read more >
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
You can try to change the build system to Legacy, File > Workspace Settings > Build System > Legacy Build System.
I also had the
Multiple commands produceerror withlibReact.a&libyoga.a. I’m using:0.57.0To overcome this, I have added this to my
Podfile:Then rebuild your Pods project with:
Full environment details: