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

Multiple commands produce ...ReactCommon.framework/Headers/CallbackWrapper.h' #36370

Closed
tapz opened this issue Mar 4, 2023 · 2 comments
Closed

Comments

@tapz
Copy link

tapz commented Mar 4, 2023

Description

When building for iOS:

Showing Recent Issues
Multiple commands produce '.../Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ReactCommon.framework/Headers/CallbackWrapper.h'
Target 'ReactCommon' (project 'Pods') has copy command from '.../node_modules/react-native/ReactCommon/react/bridging/CallbackWrapper.h' to '.../Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ReactCommon.framework/Headers/CallbackWrapper.h'
Target 'ReactCommon' (project 'Pods') has copy command from '.../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h' to '.../Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ReactCommon.framework/Headers/CallbackWrapper.h'

React Native Version

0.71.3

Output of npx react-native info

System:
OS: macOS 13.2.1
CPU: (12) arm64 Apple M2 Max
Memory: 925.88 MB / 96.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.14.2/bin/yarn
npm: 9.6.0 - ~/.nvm/versions/node/v18.14.2/bin/npm
Watchman: 2023.02.27.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.0 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 27, 28, 29, 30, 31, 33
Build Tools: 33.0.0
Android NDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 19.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: ^10.2.0 => 10.2.0
react: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Xcode: Product - Archive

Snack, code example, screenshot, or link to a repository

x

@tapz tapz changed the title Multiple commands produce Multiple commands produce ...ReactCommon.framework/Headers/CallbackWrapper.h' Mar 4, 2023
@tapz tapz closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2023
@abid-2362
Copy link

abid-2362 commented Apr 1, 2023

What happened to this issue?
is this issue solved?
it is including 2 files with same name, but different locations

error: Multiple commands produce '/Users/<user-name>/Library/Developer/Xcode/DerivedData/<project-name>-cfbrjipmdeowwegzsseekwvyxmsv/Build/Products/Debug-iphonesimulator/ReactCommon-framework/ReactCommon.framework/Headers/CallbackWrapper.h'
    note: Target 'ReactCommon-framework' (project 'Pods') has copy command from '<Project-Folder>/node_modules/react-native/ReactCommon/react/bridging/CallbackWrapper.h' to '/Users/<user-name>/Library/Developer/Xcode/DerivedData/<project-name>-cfbrjipmdeowwegzsseekwvyxmsv/Build/Products/Debug-iphonesimulator/ReactCommon-framework/ReactCommon.framework/Headers/CallbackWrapper.h'
    note: Target 'ReactCommon-framework' (project 'Pods') has copy command from '<Project-Folder>/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h' to '/Users/<user-name>/Library/Developer/Xcode/DerivedData/<project-name>-cfbrjipmdeowwegzsseekwvyxmsv/Build/Products/Debug-iphonesimulator/ReactCommon-framework/ReactCommon.framework/Headers/CallbackWrapper.h'

and if I remove any one of them, I get Fatal Error of missing file when building for iOS

@dseipp
Copy link

dseipp commented Apr 24, 2023

I was able to resolve the issue by moving:

use_frameworks! :linkage => :static

before:

use_react_native!( ... )

credit: https://bytemeta.vip/repo/facebook/react-native/issues/36120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants