Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Library not loaded: /usr/local/Cellar/openssl/1.0.2k/lib/libcrypto.1.0.0.dylib
Forum Updated to NodeBB v4.3 + New Features

Library not loaded: /usr/local/Cellar/openssl/1.0.2k/lib/libcrypto.1.0.0.dylib

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 4 Posters 6.4k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    How are you packaging your application ?

    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
    • IshMI IshM

      I just upgrade from Qt 5.4.2 to 5.7.1. When I try to package run the application, I get the following message error message:

      Termination Reason:    DYLD, [0x1] Library missing
      
      Application Specific Information:
      dyld: launch, loading dependent libraries
      
      Dyld Error Message:
        Library not loaded: /usr/local/Cellar/openssl/1.0.2k/lib/libcrypto.1.0.0.dylib
        Referenced from: /Applications/MyApp/MyApp.app/Contents/Frameworks/libssl.1.0.0.dylib
        Reason: image not found
      

      Do I need to add some libraries with 5.7.1 which was not the case in 5.4.2?

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #3

      @IshM From what I see you don't have openssl installed. Your app is looking for it in /usr/local/Cellar which is a homebrew thing.

      You can try brew install openssl but you should probably deal with the fact that your application is using external libs. Especially ones that need homebrew to install.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

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

        @ambershark The correct way in this case would be to bundle the dependencies correctly as well as fix their search paths.

        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
        1
        • IshMI Offline
          IshMI Offline
          IshM
          wrote on last edited by IshM
          #5

          @SGaist @ambershark What's the best way to bundle those ssl (-lssl and -lcrypto) libraries with my packaged application?

          A 1 Reply Last reply
          0
          • IshMI IshM

            @SGaist @ambershark What's the best way to bundle those ssl (-lssl and -lcrypto) libraries with my packaged application?

            A Offline
            A Offline
            ambershark
            wrote on last edited by
            #6

            @IshM Well putting them in your bundle library section and setting the paths with otool would work and is how it's normally done.

            However, the licensing of openssl needs to be reviewed. You may not be allowed to distribute binaries like that.

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

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

              To add to @ambershark, macdeployqt is the tool to help deployment of macOS applications.

              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
              1
              • IshMI Offline
                IshMI Offline
                IshM
                wrote on last edited by
                #8

                @SGaist @ambershark This is what I added to my project file and it seems to work now
                mac: LIBS += -framework AppKit /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a -framework IOKit -framework CoreAudio -framework Carbon
                (the libcrypto and libssl part).

                Is this way correct?

                A 1 Reply Last reply
                0
                • IshMI IshM

                  @SGaist @ambershark This is what I added to my project file and it seems to work now
                  mac: LIBS += -framework AppKit /usr/local/opt/openssl/lib/libssl.a /usr/local/opt/openssl/lib/libcrypto.a -framework IOKit -framework CoreAudio -framework Carbon
                  (the libcrypto and libssl part).

                  Is this way correct?

                  A Offline
                  A Offline
                  ambershark
                  wrote on last edited by
                  #9

                  @IshM Well yes, that will work since you are linking them statically so you don't need to distribute the libraries any more.

                  However, be warned that you have the same licensing issues. If your app is not open source you will need to check into the license requirements for linking to a binary openssl like that or it could cost you a lot of money.

                  My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                  1 Reply Last reply
                  2
                  • IshMI Offline
                    IshMI Offline
                    IshM
                    wrote on last edited by
                    #10

                    @ambershark Is this the license that I'll have to satisfy https://www.openssl.org/source/license.html or are there some other conditions as well?

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

                      AFAIK, that's the reference.

                      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
                      • IshMI IshM

                        @ambershark Is this the license that I'll have to satisfy https://www.openssl.org/source/license.html or are there some other conditions as well?

                        A Offline
                        A Offline
                        ambershark
                        wrote on last edited by
                        #12

                        @IshM That looks easy to satisfy. It's not under any GPL/LGPL which are not easy to satisfy.

                        Just follow that license and you should be fine. :)

                        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                        1 Reply Last reply
                        0
                        • IshMI Offline
                          IshMI Offline
                          IshM
                          wrote on last edited by
                          #13

                          @SGaist @ambershark Thanks guys. It's a lot of help.

                          1 Reply Last reply
                          1
                          • M Offline
                            M Offline
                            Make.
                            wrote on last edited by
                            #14

                            Hi, guys!
                            I seem to have found a solution.

                            I try to:

                            $ cd MyApp.app/Contents/Frameworks
                            $ otool -L libssl.1.0.0.dylib
                            
                            libssl.1.0.0.dylib:
                            	@executable_path/../Frameworks/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
                            	/usr/local/Cellar/openssl/1.0.2n/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
                            	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
                            
                            $ install_name_tool -change /usr/local/Cellar/openssl/1.0.2n/lib/libcrypto.1.0.0.dylib @executable_path/../Frameworks/libcrypto.1.0.0.dylib libssl.1.0.0.dylib
                            

                            It worked.

                            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