ld: 1319 duplicate symbols for architecture x86_64 after upgrading to 0.60 from 0.59.9
See original GitHub issueI upgraded the react native version to 0.60 from 0.59.9. I wasn’t using any Pods when on 0.59.9. But after 0.60, I added Podfile with following content (as per rn-diff)
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'taxiApp' do
rn_maps_path = '../node_modules/react-native-maps'
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'taxiAppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
//this is for solving some issue with react-native-config and cocoapods
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'react-native-config'
phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
phase.shell_script = "cd ../../"\
" && RNC_ROOT=./node_modules/react-native-config/"\
" && export SYMROOT=$RNC_ROOT/ios/ReactNativeConfig"\
" && export BUILD_DIR=$RNC_ROOT/ios/ReactNativeConfig"\
" && ruby $RNC_ROOT/ios/ReactNativeConfig/BuildDotenvConfig.ruby"
target.build_phases << phase
target.build_phases.move(phase,0)
end
end
end
I did pod install
which installed 4 extra pods (maybe as a part of auto linking):
react-native-config (0.11.7)
react-native-geolocation (1.4.2)
react-native-maps (0.24.2)
RNGestureHandler
After that, I opened Xcode and started building the app and I got this issue with duplicate symbols. A lot of pods/libraries are being installed (duplicate). For example:
I think this is a problem
Both jsi
and React-jsi
are being installed while building the project.
React Native version:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 89.96 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.9.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Steps To Reproduce
- Upgrade to RN-0.60
- Have packages which needs installing pods
- pod install
- Build the project from XCode
Describe what you expected to happen: I expect it to not install duplicate pods/libraries and successful build.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:17 (5 by maintainers)
Top Results From Across the Web
1159 duplicate symbols for architecture x86_64
When trying to compile the app via xcode, I get the following error ... ld: 1159 duplicate symbols for architecture x86_64 clang: error: ......
Read more >39 duplicate symbols for architecture x86_64
Showing All Errors Only 39 duplicate symbols for architecture x86_64 ... symbols for architecture x86_64 after upgrading to 0.60 from 0.59.9 #25484.
Read more >1 duplicate symbol for architecture x86_64 Xcode
Hello, I downloaded xcode 12 to learn the C language at school but each time I run my code the message "Build failed"...
Read more >架构arm64的统一重复符号 - 免费编程教程
但是在0.60 之后,我在Podfile 中添加了以下ld: 1319 duplicate symbols for architecture x86_64 after upgrade ,我将react native 版本从0.59.9 升级到了0.60。
Read more >iOS : About 100 error in Xcode, Undefined symbols ... - YouTube
iOS : About 100 error in Xcode, Undefined symbols for architecture x86_64 : upgraded react-native from 0.59.1 to 0.60.5 [ Beautify Your ...
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 Free
Top 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
I actually removed all of these contents inside Link Binary With Libraries and the build was successful. But I don’t understand what’s going on in here.
I think RN shifted to Pods , all native ios stuff is now handled by pods , Therefore you don’t need those Linked Libraries. https://github.com/react-native-community/upgrade-helper/issues/47
I updated from 0.57.8 to 0.60.0 following RN Update Helper and my build still failing 😦