Git Product home page Git Product logo

Comments (3)

brianpartridge avatar brianpartridge commented on May 23, 2024

Looks like this is the root cause of #54 too

from openssl.

krzyzanowskim avatar krzyzanowskim commented on May 23, 2024

Specifically, it results in -lcrypto -lssl in the generated build settings for targets that should not be linking the pod.

Does it links without -lcrypto -lssl? It may be from the "Find Implicit Dependencies", however does it works withut implicit dependencies too?

from openssl.

brianpartridge avatar brianpartridge commented on May 23, 2024

The trouble occurs when you have a configuration like this:

target 'MyApp' do
  use_frameworks!
  
  pod 'OpenSSL-Univeral'
  
  target 'MyAppTests' do
    inherit! :search_paths
  end

MyAppTests gets dynamically linked into MyApp when running tests. If MyAppTests linked in libcrypto and libssl then there would be duplicate symbols at runtime. CocoaPods provides a mechanism to work around this with inherit! :search_paths, so MyAppTests can find the OpenSSL headers if it needs them, but it wont link against the libraries.

Internally CocoaPods builds up a list of libraries to link from 3 sources in the podspec(s) vendored_frameworks, vendored_libraries and libraries. The first 2 it knows to filter out of nested targets using inherit! :search_paths. However, it does not filter out the contents of libraries because the content is assumed to by system dylibs. By adding crypto and ssl to the libraries list, even though they aren't system dylibs they get added to the linker flags, which causes a failure when trying to link them.

from openssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.