Unsolved qtopcua 5.14 openssl errors after uptate
-
Hello,
I'm currently using module "qtopcua" in version 5.12. After update to version 5.14 there is a lot of openssl errors when I'm trying to build module. Could somebody, please give a hint what's happening?
In file included from C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\openssl_symbols_p.h:248:0, from C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest.cpp:38: C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:89:40: error: 'OPENSSL_STACK' was not declared in this scope Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a); ^~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:89:40: note: suggested alternative: 'OPENSSL_BLOCK' Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:89:55: error: 'a' was not declared in this scope Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a); ^ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:90:46: error: variable or field 'q_OPENSSL_sk_pop_free' declared void Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *)); ^~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:90:46: error: 'OPENSSL_STACK' was not declared in this scope C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:90:46: note: suggested alternative: 'OPENSSL_BLOCK' Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *)); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:90:61: error: 'a' was not declared in this scope Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *)); ^ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:90:71: error: 'b' was not declared in this scope Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *)); ^ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:90:74: error: expected primary-expression before 'void' Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *)); ^~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:91:19: error: 'OPENSSL_STACK' does not name a type; did you mean 'OPENSSL_BLOCK'? Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null(); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:92:42: error: variable or field 'q_OPENSSL_sk_push' declared void Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data); ^~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:92:42: error: 'OPENSSL_STACK' was not declared in this scope C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:92:42: note: suggested alternative: 'OPENSSL_BLOCK' Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:92:57: error: 'st' was not declared in this scope Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data); ^~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:92:61: error: expected primary-expression before 'void' Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data); ^~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:93:42: error: variable or field 'q_OPENSSL_sk_free' declared void Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a); ^~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:93:42: error: 'OPENSSL_STACK' was not declared in this scope C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:93:42: note: suggested alternative: 'OPENSSL_BLOCK' Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:93:57: error: 'a' was not declared in this scope Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a); ^ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:94:45: error: 'OPENSSL_STACK' was not declared in this scope Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b); ^~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:94:45: note: suggested alternative: 'OPENSSL_BLOCK' Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:94:60: error: 'a' was not declared in this scope Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b); ^ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:94:63: error: expected primary-expression before 'int' Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b); ^~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:94:68: error: expression list treated as compound expression in initializer [-fpermissive] Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b); ^ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:97:45: error: 'OPENSSL_INIT_SETTINGS' does not name a type; did you mean 'OPENSSL_CSTRING'? int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); ^~~~~~~~~~~~~~~~~~~~~ OPENSSL_CSTRING In file included from C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\openssl_symbols_p.h:248:0, from C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest.cpp:38: C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:110:50: error: 'X509_STORE_CTX_verify_cb' has not been declared void q_X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb); ^~~~~~~~~~~~~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:129:1: error: 'OPENSSL_STACK' does not name a type; did you mean 'OPENSSL_BLOCK'? OPENSSL_STACK *q_sk_new_null(); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:134:16: error: variable or field 'q_sk_push' declared void void q_sk_push(OPENSSL_STACK *st, void *data); ^~~~~~~~~~~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:134:16: error: 'OPENSSL_STACK' was not declared in this scope C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:134:16: note: suggested alternative: 'OPENSSL_BLOCK' void q_sk_push(OPENSSL_STACK *st, void *data); ^~~~~~~~~~~~~ OPENSSL_BLOCK C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:134:31: error: 'st' was not declared in this scope void q_sk_push(OPENSSL_STACK *st, void *data); ^~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:134:35: error: expected primary-expression before 'void' void q_sk_push(OPENSSL_STACK *st, void *data); ^~~~ C:\Qt\5.14.1\msvc2017_64\qtopcua\src\opcua\x509\qsslsocket_openssl11_symbols_p.h:142:48: error: 'OPENSSL_INIT_SETTINGS' does not name a type; did you mean 'OPENSSL_CSTRING'? int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); ^~~~~~~~~~~~~~~~~~~~~ OPENSSL_CSTRING mingw32-make[3]: *** [Makefile.Release:6378: .obj/release/qopcuax509certificatesigningrequest.o] Error 1 mingw32-make[3]: Leaving directory 'C:/Qt/5.14.1/msvc2017_64/qtopcua/build/src/opcua' mingw32-make[2]: *** [Makefile:45: release] Error 2 mingw32-make[2]: Leaving directory 'C:/Qt/5.14.1/msvc2017_64/qtopcua/build/src/opcua' mingw32-make[1]: *** [Makefile:52: sub-opcua-make_first] Error 2 mingw32-make[1]: Leaving directory 'C:/Qt/5.14.1/msvc2017_64/qtopcua/build/src' mingw32-make: *** [Makefile:53: sub-src-make_first] Error 2
-
Hi and welcome to devnet,
Do you have OpenSSL available on your machine ?
If so, which version ?
How are you building that module ? -
Hello
I am going through the same issue while building the module offline. I downloaded the commercial sources and using qmake and make. i get the following errors hereIn file included from x509/openssl_symbols_p.h:248:0, from x509/qopcuax509certificatesigningrequest.cpp:38: x509/qsslsocket_openssl11_symbols_p.h:89:40: error: ‘OPENSSL_STACK’ was not declared in this scope Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a); ^ x509/qsslsocket_openssl11_symbols_p.h:89:55: error: ‘a’ was not declared in this scope Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a); ^ x509/qsslsocket_openssl11_symbols_p.h:90:46: error: variable or field ‘q_OPENSSL_sk_pop_free’ declared void Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
i have an open ssl verison as OpenSSL 1.0.2g 1 Mar 2016. Let me know if someone can help me to resolve the build
-
Hi
An update
I overcame an OPENSSL error by installing openssl from the Qt Tools. Now i get the following errorqopen62541backend.cpp: In member function ‘void Open62541AsyncBackend::readAttributes(quint64, UA_NodeId, QOpcUa::NodeAttributes, QString)’: qopen62541backend.cpp:104:32: error: ‘class QList<UA_ReadValueId>’ has no member named ‘data’ req.nodesToRead = valueIds.data(); ^ qopen62541backend.cpp: In member function ‘UA_UInt32* Open62541AsyncBackend::copyArrayDimensions(const QList<unsigned int>&, size_t*)’: qopen62541backend.cpp:1415:55: error: ‘const class QList<unsigned int>’ has no member named ‘constData’ UA_StatusCode res = UA_Array_copy(arrayDimensions.constData(), arrayDimensions.size(), ^ Makefile:1345: recipe for target '.obj/qopen62541backend.o' failed make[4]: *** [.obj/qopen62541backend.o] Error 1
Looks like code referencing error to the defined structure. Do we need to modify the sources and build here ?
Regards
Bala B -
Which version of Qt are you using ?
Are you using a git clone ?
Is that clone on the branch matching the Qt version you are using ? -
@SGaist
I am using Qt 5.15.2. i got the commercial one from the qt website. There wont be git on that. -
Sure there is: https://code.qt.io/cgit/qt/qtopcua.git/
Since you are a commercial customer, you will have access to LTS releases longer than OpenSource users but otherwise.
Just to be sure, are you sure you are using the correct qmake to build that module ?
-
@SGaist
Thanks . I did compile the open source code successfully.
But still an issue with the commercial one. Yup i did use the right qmake. Issue could be with version matching. But there is nt a way to match version for the open sourceRegards
Bala B -
They should be in sync unless you have additional patches. With the new operating model there will indeed be a difference at some point.