xcodebuild archive fails when running on Xcode 15.2 and mcOS version 14.3.1

Build fails on apple store connect pipline, with following error:

Run command: 'xcodebuild archive -workspace /Volumes/workspace/repository/ios/ISCDigitalConsignmentApp.xcworkspace -scheme 'eNVD Uat' -destination generic/platform=iOS -archivePath /Volumes/workspace/build.xcarchive -derivedDataPath /Volumes/workspace/DerivedData -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /Volumes/workspace/tmp/resultBundleStreama0a6fce1-622b-430a-aa34-16997d4e4d56.json -IDEPostProgressNotifications=YES CODE_SIGN_IDENTITY=- AD_HOC_CODE_SIGNING_ALLOWED=YES CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=3C3JGD7M6T COMPILER_INDEX_STORE_ENABLE=NO -hideShellScriptEnvironment'

When i looked in detail for error i found this as well: **No template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?

hash.hpp:131**

Note: the interesting thing note here is that it is working fine with xcode 14.3.1

Please help me out with this. Thanks

xcodebuild archive fails when running on Xcode 15.2 and mcOS version 14.3.1
 
 
Q