react-native-bignumber icon indicating copy to clipboard operation
react-native-bignumber copied to clipboard

Can't merge user_target_xcconfig for pod targets: ["react-native-bignumber", "react-native-quick-crypto"]

Open emenocal07 opened this issue 1 year ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project!

Today I used patch-package to patch [email protected] for the project I'm working on.

Upon running 'pod install', we encountered the following warning message: [!] Can't merge user_target_xcconfig for pod targets: ["react-native-bignumber", "react-native-quick-crypto"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

To resolve this, I patched the package and set the CLANG_CXX_LANGUAGE_STANDARD to "c++17" for the 'react-native-bignumber' pod. This adjustment successfully addressed the conflict and allowed the 'pod install' command to complete without any further issues. Here is the diff that solved my problem:

diff --git a/node_modules/react-native-bignumber/react-native-bignumber.podspec b/node_modules/react-native-bignumber/react-native-bignumber.podspec
index d9fbaea..d8e6d38 100644
--- a/node_modules/react-native-bignumber/react-native-bignumber.podspec
+++ b/node_modules/react-native-bignumber/react-native-bignumber.podspec
@@ -32,7 +32,7 @@ Pod::Spec.new do |s|
     "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\"  \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" "
   }
   s.xcconfig               = {
-    "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
+    "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
     "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\"  \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\""
   }
 

This issue body was partially generated by patch-package.

emenocal07 avatar Apr 11 '24 18:04 emenocal07

Fixed by #64 as soon as it's released and @boorad also fixed this in quick crypto

I believe modifying xcconfig files is simply the culprit here. I think these modifications are unnecessary.

So while "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" does fix the issue temporarily, ultimately removing the whole line will stop these conflicts from happening in the future.

shamilovtim avatar Apr 12 '24 17:04 shamilovtim