Can't merge user_target_xcconfig for pod targets

See original GitHub issue

Version

LibTorch-Lite (1.12.0), react-native-pytorch-core (0.2.2)

Problem Area

react-native-pytorch-core (core package)

Steps to Reproduce

Environment:

  • MacBook Air m1 Ventura 13.0
  • Darwin MacBook-Air.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64
  • npx --version 8.3.1
  • packaage.json
{
  "name": "myapp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "18.1.0",
    "react-native": "0.70.5",
    "react-native-pytorch-core": "^0.2.2"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "0.72.3",
    "react-test-renderer": "18.1.0"
  },
  "jest": {
    "preset": "react-native"
  }
}
  1. npx react-native init myapp
  2. cd myapp/ios && pod install
  3. cd …
  4. npm install react-native-pytorch-core
  5. cd ios && pod install

Integrating client project Pod installation complete! There are 60 dependencies from the Podfile and 51 total pods installed.

[!] Can’t merge user_target_xcconfig for pod targets: [“LibTorch-Lite”, “Core”, “Torch”, “hermes-engine”]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

[!] Can’t merge user_target_xcconfig for pod targets: [“LibTorch-Lite”, “Core”, “Torch”, “hermes-engine”]. Singular build setting CLANG_CXX_LIBRARY has different values.

[!] Can’t merge user_target_xcconfig for pod targets: [“LibTorch-Lite”, “Core”, “Torch”, “hermes-engine”]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

[!] Can’t merge user_target_xcconfig for pod targets: [“LibTorch-Lite”, “Core”, “Torch”, “hermes-engine”]. Singular build setting CLANG_CXX_LIBRARY has different values.

[!] Can’t merge user_target_xcconfig for pod targets: [“LibTorch-Lite”, “Core”, “Torch”, “hermes-engine”]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.

[!] Can’t merge user_target_xcconfig for pod targets: [“LibTorch-Lite”, “Core”, “Torch”, “hermes-engine”]. Singular build setting CLANG_CXX_LIBRARY has different values.

Expected Results

Dont expect to see the “Can’t merge user_target_xcconfig for pod targets” messagesDon’t

Code example, screenshot, or link to repository

No response

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
shahidjabbarcommented, Nov 16, 2022

Here is my Podfile. There are some options that you might want to turn on or off:

platform :ios, '12.1'

target 'app_test' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'app_testTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h`

    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          # config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
          # config.build_settings['ENABLE_BITCODE'] = 'NO'
        end
      end
  end
end
0reactions
thomaskwancommented, Nov 16, 2022

@shahidjabbar thanks for the idea. I tried Rosetta mode and cleaning the derived data directory and that did not help. I wonder if the problem is related to user_target_xcconfig being used in https://github.com/pytorch/pytorch/blob/master/ios/LibTorch.podspec#L25

I read from another project (https://code.videolan.org/videolan/VLCKit/-/issues/498) that user_target_xcconfig has been deprecated and should be avoided.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode12.4 Can't merge user_target_xcconfig for pod targets
In the short term, working around it in your podspec can work. Try this: post_install do |installer| installer.generated_projects.each do ...
Read more >
Can't merge user_target_xcconfig when using ` ...
The reason is that EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values between other podspecs. ref:
Read more >
Issues with Pod Install related to EXCLUDED_ARCHS
When I run pod install I get the following error: [!] Can't merge user_target_xcconfig for pod targets: ["Intercom", "NewRelicAgent"].
Read more >
Xcode12.4 Can't merge user_target_xcconfig for pod ...
Tried to remove VALID_ARCHS from the Target, however, it's not removable. Also, replace them with blank. Nothing changes. Curious. This is a screenshot...
Read more >
CocoaPods user_target_xcconfig conflict with ...
Fixed the CocoaPods install error "Can't merge user_target_xcconfig" that occurred when using multiple pods with different user_target_xcconfig settings.Note: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found