Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Getting "target has transitive dependencies that include statically linked binaries" error #606

Closed
keshavamurthy1 opened this issue Oct 26, 2019 · 14 comments
Assignees
Labels

Comments

@keshavamurthy1
Copy link

Hi team, im getting below error at the end of "pod install"
I have followed instructions from : https://fbflipper.com/docs/getting-started.html#cocoapods

Kindly help me to solve it.

[!] The 'Pods-App-target' target has transitive dependencies that include statically linked binaries: (/Users/keshavgn/Desktop/Projects/halodoc-ios/Pods/CocoaLibEvent/lib/libevent.a, /Users/keshavgn/Desktop/Projects/halodoc-ios/Pods/CocoaLibEvent/lib/libevent_core.a, /Users/keshavgn/Desktop/Projects/halodoc-ios/Pods/CocoaLibEvent/lib/libevent_extra.a, /Users/keshavgn/Desktop/Projects/halodoc-ios/Pods/CocoaLibEvent/lib/libevent_pthreads.a, /Users/keshavgn/Desktop/Projects/halodoc-ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a, and /Users/keshavgn/Desktop/Projects/halodoc-ios/Pods/OpenSSL-Universal/ios/lib/libssl.a)

@priteshrnandgaonkar
Copy link
Contributor

Which cocoapods version are you using ?

@priteshrnandgaonkar
Copy link
Contributor

If you are using use_framework!. Make sure you add the following

   $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
     'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
     'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
     'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
  
   pre_install do |installer|
     Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
     installer.pod_targets.each do |pod|
         if $static_framework.include?(pod.name)
           def pod.build_type;
             Pod::Target::BuildType.static_library
           end
         end
       end
  end

@keshavamurthy1
Copy link
Author

keshavamurthy1 commented Nov 5, 2019 via email

@teodorciuraru
Copy link

teodorciuraru commented Oct 13, 2020

If you are using use_framework!. Make sure you add the following

   $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
     'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
     'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
     'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
  
   pre_install do |installer|
     Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
     installer.pod_targets.each do |pod|
         if $static_framework.include?(pod.name)
           def pod.build_type;
             Pod::Target::BuildType.static_library
           end
         end
       end
  end

Had to use Pod::BuildType.static_library instead of Pod::Target::BuildType.static_library

@sohayb
Copy link

sohayb commented Oct 13, 2021

Apparently this is closed but when I did the exact same thing with the suggested solution I had a different error:

'fmt/compile.h' file not found

This in RCT-Folly target, FmtCompile.h. I wonder if anyone had the same issue. React native version 0.65.1

    $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
        'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
        'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
        'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
     
    pre_install do |installer|
        Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
        installer.pod_targets.each do |pod|
            if $static_framework.include?(pod.name)
              def pod.build_type;
                Pod::BuildType.static_library
              end
            end
          end
    end

    # Enables Flipper.
    use_flipper!({ 'Flipper' => '0.102.0', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3', 'Flipper-DoubleConversion' => '3.1.7', 'Flipper-Glog' => '0.3.9', 'Flipper-PeerTalk' => '0.0.4' })

@sumitbalyan
Copy link

Apparently this is closed but when I did the exact same thing with the suggested solution I had a different error:

'fmt/compile.h' file not found

This in RCT-Folly target, FmtCompile.h. I wonder if anyone had the same issue. React native version 0.65.1

    $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
        'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
        'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
        'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
     
    pre_install do |installer|
        Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
        installer.pod_targets.each do |pod|
            if $static_framework.include?(pod.name)
              def pod.build_type;
                Pod::BuildType.static_library
              end
            end
          end
    end

    # Enables Flipper.
    use_flipper!({ 'Flipper' => '0.102.0', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3', 'Flipper-DoubleConversion' => '3.1.7', 'Flipper-Glog' => '0.3.9', 'Flipper-PeerTalk' => '0.0.4' })

Same for me

@batcodegen
Copy link

any solution to 'fmt/compile.h' file not found ?

@moriyuu
Copy link

moriyuu commented Jun 20, 2022

'fmt/compile.h' file not found

same problem.

@tonyvx
Copy link

tonyvx commented Jul 1, 2022

in Podfile - commenting filpper resolved it for me.

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

@Yamingue
Copy link

Yamingue commented Jul 2, 2022

tanks @tonyvx it's work for me

@hasnainbaloch
Copy link

in Podfile - commenting filpper resolved it for me.

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

Thank you

@partriv
Copy link

partriv commented Aug 10, 2022

Which cocoapods version are you using ?

i was using a very old version and this fixed it for me

@FredSoares
Copy link

In my case adding use_frameworks! :linkage => :static in Podfile resolved it for me.

@chu3kit0
Copy link

chu3kit0 commented Nov 4, 2023

In my case adding use_frameworks! :linkage => :static in Podfile resolved it for me.

Work for me! thx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests