Duplicate symbols after upgrading react-native
See original GitHub issue🐛 Bug Report
Today after i upgraded my react-native via react-native-git-upgrade
i’m getting duplicated symbols for libFolly.a
and libReact.a
files.
Edit: it works on android
Error Output
duplicate symbol __ZN5folly7dynamic7destroyEv in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamic4hashEv in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamic4sizeEv in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamic8typeNameEv in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorD2Ev in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorD1Ev in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorD0Ev in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeESB_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeESB_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic5eraseENSt3__111__wrap_iterIPKS0_EES5_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamicaSEOS0_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamicltERKS0_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamiceqERKS0_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamicaSERKS0_ in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZTVN5folly9TypeErrorE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZTSN5folly9TypeErrorE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZTIN5folly9TypeErrorE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIxE4typeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIdE4typeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIbE4typeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINS0_10ObjectImplEE4typeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE4typeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__16vectorIS0_NS2_9allocatorIS0_EEEEE4typeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8typeNameENS0_4TypeE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIxE4nameE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIdE4nameE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIbE4nameE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINS0_10ObjectImplEE4nameE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE4nameE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__16vectorIS0_NS2_9allocatorIS0_EEEEE4nameE in:
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/myPath/ios/build/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
ld: 32 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
To Reproduce
building the app from xcode or by running react-native run-ios
Expected Behavior
able to build and run the app as before upgrading react-native
Code Example
Podfile
target 'AverageSpeedRN' do
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
]
pod 'DoubleConversion', :podspec => "#{rn_path}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{rn_path}/third-party-podspecs/glog.podspec"
pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'react-native-location', :path => '../node_modules/react-native-location'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
end
end
Environment
React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 82.89 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.10.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.8.0 - /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
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 23.0.3, 24.0.0, 26.0.3, 27.0.3, 28.0.2, 28.0.3
System Images: android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.5 => 0.58.5
npmGlobalPackages:
react-native-git-upgrade: 0.2.7
Linked Frameworks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:19 (3 by maintainers)
Top Results From Across the Web
7 duplicate symbols for architecture x86_64 in react native
when I am trying to run my react native app on the ios simulator I am getting this error. Error: duplicate symbol '_EXCanAskAgain'...
Read more >5 duplicate symbols for architecture x86_64 react-native-blob ...
I am receiving the error "5 duplicate symbols for architecture x86_64" when attempting to launch my React Native project in Xcode. I am...
Read more >Duplicate symbols error when upgrading react-native to 0.39.0 ...
The short answer is to select your pod project, select the React target and then select Build phases and Compile Sources. In there...
Read more >iOS : duplicate symbols for architecture x86_64 ios React Native
iOS : duplicate symbols for architecture x86_64 ios React Native [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS ...
Read more >iOS Xcode 14 + MacOS X Ventura – build errors Duplicate ...
Building ReactNative Apps is always little hard when there is an Operating System Update along with that Xcode updated.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For me, delete all
Link Binary With Libraries
and runpod install
fix it;rm -rf Podfile.lock pod deintegrate pod install
works for me.