Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Issues compiling Forte with OPC UA module included in Windows(Platform: Windows 10, CMake 3.10, VisualStudio 2017)
Issues compiling Forte with OPC UA module included in Windows [message #1800608] Thu, 03 January 2019 12:33 Go to next message
Matthias Plasch is currently offline Matthias PlaschFriend
Messages: 3
Registered: January 2019
Junior Member
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 13:39 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 46
Registered: February 2016
Member
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 13:40]

Report message to a moderator

Re: Issues compiling Forte with OPC UA module included in Windows [message #1801614 is a reply to message #1800731] Wed, 23 January 2019 12:52 Go to previous messageGo to next message
Matthias Plasch is currently offline Matthias PlaschFriend
Messages: 3
Registered: January 2019
Junior Member
Hi Kirill,

Thanks for your hints, and sorry for my late response.
I was able to compile forte now under Linux. In case of Windows I still had problems and I was not able to resolve the errors related to winsock2 and ws2tcpip. See my previous comment. Can you reproduce this problem in Windows?

Thanks!
Matthias

Re: Issues compiling Forte with OPC UA module included in Windows [message #1801702 is a reply to message #1801614] Thu, 24 January 2019 20:58 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Hi Matthias,

have you seen Martin's comment in this post [1]?

Cheers,
Alois

[1] https://www.eclipse.org/forums/index.php/t/1097118/
Re: Issues compiling Forte with OPC UA module included in Windows [message #1802012 is a reply to message #1801702] Wed, 30 January 2019 17:57 Go to previous messageGo to next message
Matthias Plasch is currently offline Matthias PlaschFriend
Messages: 3
Registered: January 2019
Junior Member
Hi Alois,

Thanks for the hint. I didn't recognise that post.
Cheers,
Matthias
Re: Issues compiling Forte with OPC UA module included in Windows [message #1802016 is a reply to message #1802012] Wed, 30 January 2019 19:45 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
You are welcome.
Re: Issues compiling Forte with OPC UA module included in Windows [message #1802054 is a reply to message #1801614] Thu, 31 January 2019 11:41 Go to previous message
Manas Das is currently offline Manas DasFriend
Messages: 13
Registered: January 2019
Junior Member
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

Previous Topic:v1.10.1 Woes
Next Topic:Issues compiling Forte with OPC UA module included in Linux(Ubuntu 16.04)
Goto Forum:
  


Current Time: Wed Aug 21 17:45:12 GMT 2019

Powered by FUDForum. Page generated in 0.02089 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top