Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cross compile Qt with openssl suport?
Forum Updated to NodeBB v4.3 + New Features

Cross compile Qt with openssl suport?

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 8 Posters 20.6k 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.
  • A Offline
    A Offline
    aureliocano
    wrote on last edited by
    #4

    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:

    http://developer.qt.nokia.com/doc/qt-4.8/ssl.html

    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?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pierrevr
      wrote on last edited by
      #5

      @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.

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aureliocano
        wrote on last edited by
        #6

        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!

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pierrevr
          wrote on last edited by
          #7

          No problem, glad I could help!

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mariagiraldo
            wrote on last edited by
            #8

            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/libQtNetwork.so.4.7.4] 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,

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pierrevr
              wrote on last edited by
              #9

              @mariagiraldo:

              The problem is that your linker (arm-none-linux-gnueabi/bin/ld) cannot find your libssl.so 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...

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jackyang
                wrote on last edited by
                #10

                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.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Vignesh
                  wrote on last edited by
                  #11

                  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

                  Regards,
                  Vignesh

                  1 Reply Last reply
                  0
                  • U Offline
                    U Offline
                    ulkuderner
                    wrote on last edited by
                    #12

                    apt-get install libssl-dev

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

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

                      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