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. libssl not found on MacOS

libssl not found on MacOS

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 2.5k 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.
  • J Offline
    J Offline
    JP Larson
    wrote on last edited by
    #1

    This was a build that had been working in the past. Here's output from the link stage. I've included linker output and the relevant portions from the .pro file.

    Linking is reporting ld: library not found for -lssl

    I added -L/usr/lib to the .pro.

    $ ll /usr/lib/libssl*
    -rwxr-xr-x 1 root wheel 212288 May 27 19:24 /usr/lib/libssl.0.9.7.dylib
    -rwxr-xr-x 1 root wheel 335888 May 27 19:24 /usr/lib/libssl.0.9.8.dylib
    -rwxr-xr-x 1 root wheel 330576 May 27 19:24 /usr/lib/libssl.35.dylib
    -rwxr-xr-x 1 root wheel 313984 May 27 19:24 /usr/lib/libssl.43.dylib
    -rwxr-xr-x 1 root wheel 300480 May 27 19:24 /usr/lib/libssl.44.dylib
    -rwxr-xr-x 1 root wheel 294016 May 27 19:24 /usr/lib/libssl.46.dylib
    -rwxr-xr-x 1 root wheel 32928 May 27 19:24 /usr/lib/libssl.dylib

    Running the build manually (cut & paste) produces the same error.

    14:56:58: Running steps for project MacControlTower...
    14:56:58: Configuration unchanged, skipping qmake step.
    14:56:58: Starting: "/usr/bin/make" -j8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Applications/Qt/5.12.3/clang_64/lib -o MacControlTower.app/Contents/MacOS/MacControlTower BaseREST.o CaptionEncoder.o CaptionLayout.o CaptionMessage.o ConfigSelectorWindow.o DialForm.o DirectSocket.o EndToEndForm.o MainWindow.o SetupDevicesModel.o SetupForm.o ModemBanksForm.o ControlTowerCommunications.o ModemBankCommunications.o Configuration.o Main.o SubWindow.o qrc_Icons.o moc_ConfigSelectorWindow.o moc_DialForm.o moc_DirectSocket.o moc_EndToEndForm.o moc_MainWindow.o moc_SetupForm.o moc_ModemBanksForm.o moc_SubWindow.o -F/Applications/Qt/5.12.3/clang_64/lib -L/usr/lib -L/usr/local/lib -L../../CT-StandardLibrary/lib -L../../ModemBank -lvitac-mac -lmodembank-mac -lhiredis -framework CoreFoundation -lz -llog4cplus -lpthread -lcurl -lcrossguid -lboost_system -lboost_thread-mt -lboost_filesystem -levent -lssl -lcrypto -framework QtWidgets -framework QtGui -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
    ld: library not found for -lssl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [MacControlTower.app/Contents/MacOS/MacControlTower] Error 1
    14:56:58: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project MacControlTower (kit: Desktop Qt 5.12.3 clang 64bit)
    When executing step "Make"
    14:56:58: Elapsed time: 00:01.

    And the relevant parts from the .pro

    ICON = Icon.icns

    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
    CONFIG+=sdk_no_version_check

    QT += core gui network widgets

    TARGET = MacControlTower
    TEMPLATE = app

    INCLUDEPATH += /usr/local/include
    INCLUDEPATH += ../../CT-StandardLibrary/src
    INCLUDEPATH += ../../CT-StandardLibrary/src/includes
    INCLUDEPATH += ../../ModemBank/src

    LIBS += -L/usr/lib -L/usr/local/lib
    LIBS += -L../../CT-StandardLibrary/lib -L../../ModemBank -lvitac-mac -lmodembank-mac -lhiredis
    LIBS += -framework CoreFoundation
    LIBS += -lz -llog4

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

      Hi,

      Why do you need OpenSSL ?

      On macOS, it has been replaced by a framework named Secure Transport.

      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
      • J Offline
        J Offline
        JP Larson
        wrote on last edited by
        #3

        I'm using a library that is compiled for both Mac and Linux. It uses boost IO for a network client. I tried removing -lssl and -lcrypto and boy, did that leave a lot of unresolved references.

        I don't understand how I can specify -L/usr/lib, then look in /usr/lib and see a bunch of libssl dylibs, but the linker says -lssl not found.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JP Larson
          wrote on last edited by
          #4

          Resolved.

          I changed to point to the brew installed version of openssl with this:

          LIBS += -L/usr/local/opt/openssl/lib -L/usr/local/lib

          The problem magically went away. So I still don't know why it didn't like the Mac OS version of openssl, but I'm happier with this, anyway.

          Just wish brew were willing to install openssl into /usr/local/lib instead of fooling around this much.

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

            The version of macOS is a leftover for backward compatibility but it's more than outdated. The official framework for cryptographic related operations is SecureTransport.

            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