Seeking clarity on opeenssl-linked (OSX)
-
My read of the documentation is that when configured with openssl-linked, Qt will statically link to a version of OpenSSL that I provide. However, the discussion in this topic:
https://forum.qt.io/topic/15227/statically-linking-the-openssl-libraries/5
suggests that is not the case.
What I'm trying to accomplish here is to build Qt 5.6.1-1 on OSX (default build type; framework) and provide to it a specific version of OpenSSL. My configuration looks like this:
#!/bin/bash PRECOMPILED_INC=~/work/precompiled/mac/x86_64/include PRECOMPILED_LIB=~/work/precompiled/mac/x86_64/lib ICU=/usr/local/Cellar/icu4c/57.1 _CONFIGROOT=$PWD _ROOT=$PWD PATH=$PATH:$_ROOT:$_ROOT/qtbase:$ROOT/qtbase/bin:$_ROOT/qtrepotools/bin OPENSSL_LIBS='-L ~/work/precompiled/mac/x86_64/lib -lssl -lcrypto' ./configure -prefix /usr/local/GkQt/macosx-clang-5.6.1-1 \ -debug-and-release -opensource -confirm-license \ -ltcg \ -nomake tests -nomake examples -nomake tools\ -qt-zlib -qt-libpng -qt-libjpeg -qt-zlib \ -icu -openssl-linked \ -I $PRECOMPILED_INC -L $PRECOMPILED_LIB -I $ICU/include -L $ICU/lib
The OpenSSL libs and headers are under Precompiled.
Because the build time on my Macbook is extraordinary I want to be sure this configuration is correct before I start the build. The configuration tests say openssl yes (linked to the libraries) so I'm inclined to think it will work.
Thanks.
-
Hi,
Do you really OpenSSL ? Current versions of Qt make use of OS X encryption framework thus don't need OpenSSL anymore.
-
Even if not Mac specific the question still holds. Do you need any special feature of OpenSSL that are not covered by the use of macOS cryptographic framework ?
In any case, the configure summary will give you the information needed.
Also, if your build time is so high. You can also only built the modules you actually need. You can disable them from the configure call.
-
I'm not asking whether should use openssl -- we're using it. The question is about the Qt config option openssl-linked.
"the configure summary will give you the information needed"
The configure summary does not address the question. The configure summary says openssl yes(linked to libraries) but that does nothing other than tell me that I used the openssl-linked configure option. The question is what does that actually mean. Does openssl-linked mean that the OpenSSL version we provide will be statically linked to a framework build of Qt 5.6.1 on mac-clang: yes or no.
-
The answer is neither.
Whether it's static or dynamic is for you to know since you provide the OpenSSL library. The linker doesn't decide which one it is, it links with whatever your provide him be it a dynamic or static version of the library.