Important: Please read the Qt Code of Conduct -

Cross compile Qt with openssl suport?

  • Good afternoon, I'm try send mails with Qt. But i need compile Qt for support openssl. I see the link: and according to this is not possible make the cross compile because in the part Cross platform options: have not the option -openssl, otherwise in the part Qt for Windows only: there the option.

    I'm confused, First desire is clarify the idea: ¿Is possible the openssl support in Qt Linux? and ¿is possible the openssl support of Qt for linux Embeded? ... how may make?


  • You can always use plugins. Why do you need to recompile the whole Qt library???

  • Thanks, but not understand i how should use plugins? I think that i have that make a cross complie of package source of Qt to generate the new compilator with support QSslSocket. If is possible make a separate plugin whitout recompiling all the package, how i can do? where I can find documentation about it?

  • Hello, I am having troubles with ssl support too.

    I am trying to cross-compile Qt 4.8.0 with ssl support following these instructions:

    I have correctly installed openssl 0.9.8 in my host machine (through synaptic), where LIB and INCLUDE dirs are over /usr/lib/ssl and /usr/include/openssl respectively.

    My config command is:
    @OPENSSL_LIBS='-L/usr/lib/ssl -lssl -lcrypto' ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/Qt -qt-mouse-tslib -little-endian -qt-gfx-transformed -qt-sql-sqlite -system-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -openssl-linked -v@

    And I obtain these error:
    @openssl.cpp:42:30: error: openssl/opensslv.h: No such file or directory
    openssl.cpp:45:4: error: #error "OpenSSL >= 0.9.7 is required"
    make: *** [openssl.o] Error 1
    OpenSSL disabled.
    OpenSSL support cannot be enabled due to functionality tests!@

    It seems openssl is not detected at compile time.

    What am I doing wrong?

  • @aureliocano:
    I believe you need to cross-compile the openssl library first. Installing it merely on your host machine will not suffice, since your cross-compiler will need the ARM-version of it, so to speak.

    Also, I only configured with -openssl for run-time openssl support, not linked.

    You can use -openssl with Linux. (I always use the configure file itself for documentation purposes, it's more complete & accurate...)

  • Hi pierrevr,

    It works! :)

    For your info, I used openssl-1.0.1 with my previous post instructions. Only changed LIB and INCLUDE dirs, pointing now to cross-compiled openssl dirs.

    Many thanks!

  • No problem, glad I could help!

  • Hello! the cross compile of openssl sucess, but i not nknow how cross compile with support from Qt. I tried complile newly the package of Qt so:

    ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix /sdcard/Qt4.7Miniv2 -openssl -openssl-linked -qt-mouse-tslib --enable-shared -little-endian -webkit -no-qt3support -no-cups -no-largefile -optimized-qmake -nomake tools -qt-sql-sqlite -no-3dnow -system-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -no-opengl -gtkstyle -no-openvg -no-xshape -no-xsync -no-xrandr -qt-freetype -qt-gfx-linuxfb -qt-kbd-tty -qt-kbd-linuxinput -qt-mouse-tslib -qt-mouse-linuxinput -nomake examples -nomake demos

    But on step make install appears this error:
    /usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lssl
    collect2: ld returned 1 exit status
    make[1]: *** [../../lib/] Error 1
    make[1]: se sale del directorio «/usr/local/Qt4.7e/qt/src/network»
    make: *** [sub-network-make_default-ordered] Error 2

    @pierrevr -- of which files you're talking about. For platforms embedded.? many Thanks,

  • @mariagiraldo:

    The problem is that your linker (arm-none-linux-gnueabi/bin/ld) cannot find your file.
    Try defining the QMAKE_LIBS_NETWORK environment variable to /path/to/lib/directory.

    What's funny is that this happens on make install, don't you do make on its own first?

    Also, I think -openssl and -openssl-linked are redundant, but I'm not sure...

    I was talking about the "configure" script in the source directory. It's not so difficult to understand what the different switches do if you can read some bash...

  • The configure use the -openssl flag, and the error still happen
    openssl.cpp:42:30: error: openssl/opensslv.h: No such file or directory
    openssl.cpp:45:4: error: #error "OpenSSL >= 0.9.7 is required"
    make: *** [openssl.o] Error 1
    OpenSSL disabled.
    OpenSSL support cannot be enabled due to functionality tests!

    So I add the "-openssl -I /yourCrossCompilerInstallFolder/include"
    The include path behind the configuration
    Then the configure will be ok, so you can make it successfully.

  • Hi All,

    1. We are working on Qt Fancybrowser application. In that https websites are not loading
    2. Qt geeks and web search basis , they suggests that
      By default, the OpenSSL support will be disabled in the Qt SDK. So we have to build the Qt SDK with OpenSSL support and compile the fancy browser source in that SDK will solve this problem
    3. So we did the following steps
      a. Downloaded the "qt-everywhere-opensource-src-4.8.4.tar.gz"
      b. ./configure -embedded arm -xplatform qws/linux-arm-g++ -qt-kbd-linuxinput -qt-kbd-qvfb -qt-mouse-tslib -webkit -openssl -opensource -verbose -R /usr/local/tslib/lib/ -L/usr/local/ssl/lib/ -I/usr/local/ssl/include/
      c. make
      d. make install
      e. After this the Qt SDK is installed in /usr/local/Trolltech/Qt-Embedded-4.8.4/
      f. We set QT SDK path as qmake path in the above compiled and tested the bonary in our board
    4. Now also we are having the same issue

    Please let us know the root cause and is there any mistakes we are doing. Please help to resolve this problem


  • apt-get install libssl-dev

  • Lifetime Qt Champion

    @ulkuderner please avoid necro-posting. Your solution is wrong: you can't cross-compile to ARM using the x86/x86_64 version of OpenSSL.

Log in to reply