Command finished with error code 65: xcodebuild

Hi All,

I have update my xcode version from 10 to 11.8 and also removed old platform and added it again as a fresh one. I am getting fallowing error whie building the project.

ionic version is - 5.4.16
angular 6.14.5
cordova-ios - 5.5

roducts/Debug-iphonesimulator/GoogleToolboxForMac’
ld: warning: directory not found for option ‘-L/var/root/Library/Developer/Xcode/DerivedData/xsxsxs-cihmbapvkqqhpfbshjikazuqyxko/Build/Products/Debug-iphonesimulator/Protobuf’
ld: warning: directory not found for option ‘-L/var/root/Library/Developer/Xcode/DerivedData/xxx-cihmbapvkqqhpfbshjikazuqyxko/Build/Products/Debug-iphonesimulator/nanopb’
duplicate symbol ‘_diagnostic’ in:
/var/root/Library/Developer/Xcode/DerivedData/xxzzx-cihmbapvkqqhpfbshjikazuqyxko/Build/Intermediates.noindex/xxxxzzz.build/Debug-iphonesimulator/xxxzzz.build/Objects-normal/x86_64/Diagnostic_Location.o
/var/root/Library/Developer/Xcode/DerivedData/xxxzzz-cihmbapvkqqhpfbshjikazuqyxko/Build/Intermediates.noindex/xxxzzz.build/Debug-iphonesimulator/xxxzzz.build/Objects-normal/x86_64/Diagnostic_Camera.o
ld: 1 duplicate symbol for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocat
**ns is 8.0 to 13.6.99. (in target ‘nanopb’ from project ‘Pods’) **
**** BUILD FAILED ** **
**The following build commands failed: **
**Ld /Users/sds/Applications/customerportal_v3/platforms/ios/build/emulator/xxx.app/avbd normal x86_64 **
**(1 failure) **
**Command finished with error code 65: xcodebuild -workspace,xxx.xcworkspace,-scheme,xxxx,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone SE (2nd generation),build,CONFIGURATION_BUILD_DIR=/Users/wer/Applications/customerportal_v3/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/dsds/Applications/customerportal_v3/platforms/ios/build/sharedpch **
**xcodebuild: Command failed with exit code 65 **
**Error: xcodebuild: Command failed with exit code 65 **
**at ChildProcess.whenDone (/Users/asass/Applications/customerportal_v3/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:168:23) **
at ChildProcess.emit (events.js:315:20)