Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [Solved] Mac Qt 4.8.4 and libssl 1.0.1e ... qt loads wrong version
Forum Updated to NodeBB v4.3 + New Features

[Solved] Mac Qt 4.8.4 and libssl 1.0.1e ... qt loads wrong version

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lgraber
    wrote on last edited by
    #1

    My application uses Qt 4.8.4 (currently, we are trying to finish a port to 5.2) and we link to openssl 1.0.1e. When we built Qt, openssl was enabled but it appears that Qt uses dlopen to load the ssl library. I don't see it in the dependencies when I run otool -L on the qt binaries so this is not an install_name path issue. What appears to happen is that at runtime, qt uses libssl 0.9.8 because that is what comes with OSX (it is in /usr/lib) while my app uses 1.0.1e when we call the openssl apis. This results in a crash (BAD_MEMORY_ACCESS) because it looks like the X509_Name structure changes and I can see that some of the members are ... trash. Given this assumption, I set the DYLD_LIBRARY_PATH in my apps Info.plist (pointed to my apps Frameworks directory which contains the 1.0.1e lib) and ... no crash, which makes me feel pretty confident about my deductions. I would prefer to not do such a heavy handed. I found this post from a while ago (http://www.qtcentre.org/threads/52152-Use-openssl-1-0-0-with-Qt-4-8-3-on-Mac) but there was no useful answer. I can't force my customers to upgrade to 1.0.1e so I plan on shipping it.

    Can someone tell me how I might solve this?
    Using static linking would bloat qt binary sizes (and I am shipping the module so would be .... silly) so that is no good.
    Can someone tell me if there is a way to get Qt link to 1.0.1e without using dlopen such that I could use install_name_tool to change the path
    Can someone give me another idea?
    Surely people want to link with newer versions of opensll than what ships with the OS

    Thanks

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      IIRC you can use -openssl-linked when building Qt which should do what you want

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgraber
        wrote on last edited by
        #3

        Ahhh ... I see my confusion. I thought "linked" was doing static linking. "Linked" is simply "linking" to the openssl library instead of using dlopen. I will give that a shot.

        Thanks

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It might if you give the static libssl

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved