Issues compiling Forte with OPC UA module included in Windows [message #1800608] |
Thu, 03 January 2019 07:33  |
Eclipse User |
|
|
|
I'm having issues in compiling Forte including OPC UA (open62541) under Visual Studio 2017. I followed the description provided in the 4DIAC documentation pages (https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc_ua.html#build).
I used the current master branch of open62541 (887ebf842c6072c692f5de1c84ba1cc084368334), and was able to compile it successfully in Release mode (Shared Library build AND amalgamated header file). And the latest version of Forte (1.10.1) from the 4diac download page.
Compiling Forte, having the required CMake variables for the OPC UA communication layer set, leads to errors: see Visual Studio console output attached as file.
* The winsock2 and ws2tcpip related errors might be a problem of the sequence of how these headers are included. I was not able to fix that.
* In COPC_UA_Handler::configureUAServer, an UA_ServerConfig instance is allocated. A function pointer to UA_Log_Forte should be assigned (from my understanding to uaServerConfig->logger.log. However, the signature of the function does not match with the type of uaServerConfig->logger.log.
Now could this be a version mismatch between Forte and the most recent version of the open62541 sources? Am I missing anything?
Any hints and help are greatly apprechiated.
Thank you!
|
|
|
Re: Issues compiling Forte with OPC UA module included in Windows [message #1800731 is a reply to message #1800608] |
Mon, 07 January 2019 08:39   |
Eclipse User |
|
|
|
Hi Matthias, you're right, there has been a change in open62541 logger API done in the meantime, that's why you're getting this error in COPC_UA_Handler::configureUAServer . To fix it you need to change UA_Log_Forte to be
void UA_Log_Forte_log(void* logContext, UA_LogLevel level, UA_LogCategory category, const char *msg, va_list args)
and assign it in COPC_UA_Handler::configureUAServer as
uaServerConfig->logger.log = UA_Log_Forte_log;
then forte compiles successfully.
The reason, why I won't change it in the official forte repository for now is that we need to stick the forte code to one (latest) of open62541 release versions and there the API has not been changed yet.
Hope this helps,
Kirill
[Updated on: Mon, 07 January 2019 08:40] by Moderator
|
|
|
|
|
|
|
Re: Issues compiling Forte with OPC UA module included in Windows [message #1802054 is a reply to message #1801614] |
Thu, 31 January 2019 06:41  |
Eclipse User |
|
|
|
Hi Matthias ,
I am having issues while compiling OPC UA on linux (Ubuntu-16.04) after the command make -j.
PFA for the screenshot.
Do i have to build forte before running the command or the following command takes care of forte compilation for OPC UA.
$ cd ~/4diac/forte/build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DFORTE_ARCHITECTURE=Posix -DFORTE_MODULE_CONVERT=ON \ -DFORTE_COM_ETH=ON -DFORTE_MODULE_IEC61131=ON -DFORTE_COM_OPC_UA=ON \ -DFORTE_COM_OPC_UA_INCLUDE_DIR=$HOME/4diac/open62541/build \ -DFORTE_COM_OPC_UA_LIB_DIR=$HOME/4diac/open62541/build/bin \ -DFORTE_COM_OPC_UA_LIB=libopen62541.so \ -DFORTE_COM_OPC_UA_VERSION=master ..
Regards,
Manas
|
|
|
Powered by
FUDForum. Page generated in 0.09216 seconds