Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. compile qt project error
Forum Updated to NodeBB v4.3 + New Features

compile qt project error

Scheduled Pinned Locked Moved Solved Installation and Deployment
18 Posts 4 Posters 1.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.
  • C chris_rookie

    /usr/local/Qt5.9.2/include/QtCore/qtypeinfo.h:67:26: error: invalid application of ‘sizeof’ to incomplete type ‘QSslError’
    isLarge = (sizeof(T)>sizeof(void*)),

    It's seems qt's error. I add 'config+= c++11' to .pro, but it doesn't work.

    jsulmJ Online
    jsulmJ Online
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @chris_rookie How was this Qt installed?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    C 1 Reply Last reply
    0
    • jsulmJ jsulm

      @chris_rookie How was this Qt installed?

      C Offline
      C Offline
      chris_rookie
      wrote on last edited by
      #3

      @jsulm
      I executed

      ./configure -static -prefix /usr/local/Qt5.9.2/ -nomake tests -skip qt3d -skip qtcanvas3d -skip qtspeech -nomake examples
      make -j4
      sudo make install

      jsulmJ 1 Reply Last reply
      0
      • C chris_rookie

        @jsulm
        I executed

        ./configure -static -prefix /usr/local/Qt5.9.2/ -nomake tests -skip qt3d -skip qtcanvas3d -skip qtspeech -nomake examples
        make -j4
        sudo make install

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @chris_rookie You should check the configure log to see whether network modules and SSL were activated.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply
        1
        • jsulmJ jsulm

          @chris_rookie You should check the configure log to see whether network modules and SSL were activated.

          C Offline
          C Offline
          chris_rookie
          wrote on last edited by
          #5

          @jsulm

          Trying source 0 (type makeSpec) of library network ...
          => source accepted.
          executing config test getaddrinfo

          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getaddrinfo && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getaddrinfo
          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getaddrinfo && MAKEFLAGS= /usr/bin/make

          g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
          g++ -Wl,-O1 -fuse-ld=gold -o getaddrinfo main.o
          test config.network.tests.getaddrinfo succeeded
          executing config test getifaddrs

          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getifaddrs && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getifaddrs
          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getifaddrs && MAKEFLAGS= /usr/bin/make

          g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
          g++ -Wl,-O1 -fuse-ld=gold -o getifaddrs main.o
          test config.network.tests.getifaddrs succeeded
          executing config test ipv6ifname

          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/ipv6ifname && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/ipv6ifname
          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/ipv6ifname && MAKEFLAGS= /usr/bin/make

          g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
          g++ -Wl,-O1 -fuse-ld=gold -o ipv6ifname main.o
          test config.network.tests.ipv6ifname succeeded
          looking for library openssl_headers
          Trying source 0 (type inline) of library openssl_headers ...

          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/openssl && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl
          • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/openssl && MAKEFLAGS= /usr/bin/make

          g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o openssl.o /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl/openssl.cpp
          > /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl/openssl.cpp:40:30: fatal error: openssl/opensslv.h: No such file or directory
          compilation terminated.

          I don't know what caused this faild. And, What should I do?

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

            Hi,

            Looks like you didn't install the OpenSSL development package.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            C 1 Reply Last reply
            1
            • C chris_rookie

              @jsulm

              Trying source 0 (type makeSpec) of library network ...
              => source accepted.
              executing config test getaddrinfo

              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getaddrinfo && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getaddrinfo
              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getaddrinfo && MAKEFLAGS= /usr/bin/make

              g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
              g++ -Wl,-O1 -fuse-ld=gold -o getaddrinfo main.o
              test config.network.tests.getaddrinfo succeeded
              executing config test getifaddrs

              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getifaddrs && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getifaddrs
              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/getifaddrs && MAKEFLAGS= /usr/bin/make

              g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
              g++ -Wl,-O1 -fuse-ld=gold -o getifaddrs main.o
              test config.network.tests.getifaddrs succeeded
              executing config test ipv6ifname

              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/ipv6ifname && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/ipv6ifname
              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/ipv6ifname && MAKEFLAGS= /usr/bin/make

              g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp
              g++ -Wl,-O1 -fuse-ld=gold -o ipv6ifname main.o
              test config.network.tests.ipv6ifname succeeded
              looking for library openssl_headers
              Trying source 0 (type inline) of library openssl_headers ...

              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/openssl && /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static use_gold_linker warn_off console single_arch" /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl
              • cd /home/huayu/qt-everywhere-opensource-src-5.9.2/config.tests/openssl && MAKEFLAGS= /usr/bin/make

              g++ -c -pipe -O2 -std=gnu++11 -w -fPIC -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl -I. -I/home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/mkspecs/linux-g++ -o openssl.o /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl/openssl.cpp
              > /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl/openssl.cpp:40:30: fatal error: openssl/opensslv.h: No such file or directory
              compilation terminated.

              I don't know what caused this faild. And, What should I do?

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @chris_rookie said in compile qt project error:

              atal error: openssl/opensslv.h: No such file or directory
              compilation terminated.

              This is the answer. Looks like OpenSSL dev package is not installed (it contains that header file).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              C J 2 Replies Last reply
              1
              • SGaistS SGaist

                Hi,

                Looks like you didn't install the OpenSSL development package.

                C Offline
                C Offline
                chris_rookie
                wrote on last edited by
                #8

                @SGaist

                Thanks for your answer.

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @chris_rookie said in compile qt project error:

                  atal error: openssl/opensslv.h: No such file or directory
                  compilation terminated.

                  This is the answer. Looks like OpenSSL dev package is not installed (it contains that header file).

                  C Offline
                  C Offline
                  chris_rookie
                  wrote on last edited by
                  #9

                  @jsulm
                  Thank you so much.
                  After Installing OpenSSL development package, should I install Qt again?
                  3b8db02c-7902-4ed6-9020-f5be52417103-image.png
                  .....

                  make[6]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/components/lib'
                  make[5]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/components'
                  cd designer/ && ( test -e Makefile || /home/wuyin/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake -o Makefile /home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/designer/designer.pro ) && make -f Makefile install
                  make[5]: Entering directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/designer'
                  make[5]: *** No rule to make target 'install'。 停止。
                  make[5]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/designer'
                  Makefile:160: recipe for target 'sub-designer-install_subtargets' failed
                  make[4]: *** [sub-designer-install_subtargets] Error 2
                  make[4]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src'
                  Makefile:56: recipe for target 'sub-src-install_subtargets' failed
                  make[3]: *** [sub-src-install_subtargets] Error 2
                  make[3]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer'
                  Makefile:115: recipe for target 'sub-designer-install_subtargets' failed
                  make[2]: *** [sub-designer-install_subtargets] Error 2
                  make[2]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src'
                  Makefile:58: recipe for target 'sub-src-install_subtargets' failed
                  make[1]: *** [sub-src-install_subtargets] Error 2
                  make[1]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools'
                  Makefile:665: recipe for target 'module-qttools-install_subtargets' failed
                  make: *** [module-qttools-install_subtargets] Error 2

                  This error occurred during my installation.
                  What make this faild?

                  jsulmJ 1 Reply Last reply
                  0
                  • C chris_rookie

                    @jsulm
                    Thank you so much.
                    After Installing OpenSSL development package, should I install Qt again?
                    3b8db02c-7902-4ed6-9020-f5be52417103-image.png
                    .....

                    make[6]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/components/lib'
                    make[5]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/components'
                    cd designer/ && ( test -e Makefile || /home/wuyin/qt-everywhere-opensource-src-5.9.2/qtbase/bin/qmake -o Makefile /home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/designer/designer.pro ) && make -f Makefile install
                    make[5]: Entering directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/designer'
                    make[5]: *** No rule to make target 'install'。 停止。
                    make[5]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src/designer'
                    Makefile:160: recipe for target 'sub-designer-install_subtargets' failed
                    make[4]: *** [sub-designer-install_subtargets] Error 2
                    make[4]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer/src'
                    Makefile:56: recipe for target 'sub-src-install_subtargets' failed
                    make[3]: *** [sub-src-install_subtargets] Error 2
                    make[3]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src/designer'
                    Makefile:115: recipe for target 'sub-designer-install_subtargets' failed
                    make[2]: *** [sub-designer-install_subtargets] Error 2
                    make[2]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools/src'
                    Makefile:58: recipe for target 'sub-src-install_subtargets' failed
                    make[1]: *** [sub-src-install_subtargets] Error 2
                    make[1]: Leaving directory '/home/wuyin/qt-everywhere-opensource-src-5.9.2/qttools'
                    Makefile:665: recipe for target 'module-qttools-install_subtargets' failed
                    make: *** [module-qttools-install_subtargets] Error 2

                    This error occurred during my installation.
                    What make this faild?

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @chris_rookie said in compile qt project error:

                    What make this faild?

                    You should do a clean Qt rebuild without old build artefacts.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    C 1 Reply Last reply
                    1
                    • jsulmJ jsulm

                      @chris_rookie said in compile qt project error:

                      What make this faild?

                      You should do a clean Qt rebuild without old build artefacts.

                      C Offline
                      C Offline
                      chris_rookie
                      wrote on last edited by
                      #11

                      @jsulm
                      Thank you. It works.

                      1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @chris_rookie said in compile qt project error:

                        atal error: openssl/opensslv.h: No such file or directory
                        compilation terminated.

                        This is the answer. Looks like OpenSSL dev package is not installed (it contains that header file).

                        J Offline
                        J Offline
                        Jignesh Patel
                        wrote on last edited by
                        #12

                        @chris_rookie

                        Can you help me on how you have installed the OpenSSL development package?

                        I already have installed in my desktop still i am getting error :

                        /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl/openssl.cpp:40:30: fatal error: openssl/opensslv.h: No such file or directory
                        compilation terminated.

                        Thank you,
                        Jignesh Patel

                        SGaistS 1 Reply Last reply
                        0
                        • J Jignesh Patel

                          @chris_rookie

                          Can you help me on how you have installed the OpenSSL development package?

                          I already have installed in my desktop still i am getting error :

                          /home/huayu/qt-everywhere-opensource-src-5.9.2/qtbase/config.tests/openssl/openssl.cpp:40:30: fatal error: openssl/opensslv.h: No such file or directory
                          compilation terminated.

                          Thank you,
                          Jignesh Patel

                          SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          @Jignesh-Patel hi,

                          Which version of OpenSSL did you install ?
                          Did you install the development package ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          J 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            @Jignesh-Patel hi,

                            Which version of OpenSSL did you install ?
                            Did you install the development package ?

                            J Offline
                            J Offline
                            Jignesh Patel
                            wrote on last edited by Jignesh Patel
                            #14

                            @SGaist ,

                            Thank you for reply,

                            I have installed openssl "OpenSSL 1.1.0f 25 May 2017" on ubuntu 16.04 LTS and also libssl-dev revision is 1.0.2g-1ubuntu4.20.
                            I am trying to cross compile qt 5.7.1 using following configuration:
                            "./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -openssl -make libs -device imx6 -compile-examples -device-option CROSS_COMPILE=/home/jignesh/var_mx6ul_dart_debian_stretch93/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot <rootfs> -no-gcc-sysroot -prefix <installdir>"

                            Best Regards,
                            Jignesh Patel

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

                              Then that's the issue, the Qt version you want to use is too old to support OpenSSL 1.1. Either update it or install OpenSSL 1.0. There was a huge incompatible jump between the 1.0 and 1.1 versions.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              J 1 Reply Last reply
                              1
                              • SGaistS SGaist

                                Then that's the issue, the Qt version you want to use is too old to support OpenSSL 1.1. Either update it or install OpenSSL 1.0. There was a huge incompatible jump between the 1.0 and 1.1 versions.

                                J Offline
                                J Offline
                                Jignesh Patel
                                wrote on last edited by
                                #16

                                @SGaist said in compile qt project error:

                                OpenSSL 1.0
                                Thank you for your support.

                                I have installed OpenSSL version "OpenSSL 1.0.2g 1 Mar 2016" but getting same error.
                                I have some questions about this:

                                1. As I am cross-compiling qt in my ubuntu-desktop, does it need to cross-compile openssl before cross compiling qt.
                                2. Does it required to add the path of OpenSSL in the ./config command line argument?

                                Best Regards,
                                Jignesh Patel

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

                                  You need all dependencies of the right architecture when cross-compiling.

                                  Depending on the distribution you use on your target, you can install the required development packages and sync them back to your main machine as sysroot to use when cross-compiling.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  J 1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    You need all dependencies of the right architecture when cross-compiling.

                                    Depending on the distribution you use on your target, you can install the required development packages and sync them back to your main machine as sysroot to use when cross-compiling.

                                    J Offline
                                    J Offline
                                    Jignesh Patel
                                    wrote on last edited by
                                    #18

                                    @SGaist
                                    Thank you for your reply.

                                    Successfully cross-compiled source of 5.7.1:
                                    the issue has been resolved by adding the following:
                                    After downloading the source and compiling OpenSSL 1.0.2 stable.

                                    ./config --prefix=/opt/openssl_build_stable -shared
                                    make
                                    make test
                                    sudo make install
                                    

                                    Link open ssl in qt config:

                                    -openssl -I /opt/openssl_build_stable/include -L /opt/openssl_build_stable/lib
                                    

                                    Best Regards,
                                    Jignesh Patel

                                    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