Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
compile qt project error
-
/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.
-
@chris_rookie How was this Qt installed?
-
@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
-
@chris_rookie You should check the configure log to see whether network modules and SSL were activated.
-
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?
-
Hi,
Looks like you didn't install the OpenSSL development package.
-
@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).
-
Thanks for your answer.
-
@jsulm
Thank you so much.
After Installing OpenSSL development package, should I install Qt again?
.....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 2This error occurred during my installation.
What make this faild?
-
@chris_rookie said in compile qt project error:
What make this faild?
You should do a clean Qt rebuild without old build artefacts.
-
@jsulm
Thank you. It works.