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 » Cross compiling FORTE + OPC-UA lib to raspberry from Windows
Cross compiling FORTE + OPC-UA lib to raspberry from Windows [message #1852404] Sat, 14 May 2022 02:14 Go to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hello all!

I've cross-compile FORTE to raspberry PI from my machine (Windows 11), and it works fine with the default FBs and even with my own FBs.

When I add the open62541 library compilation of FORTE also ok. I've copy the libopen62541.so file (generate when compiling the library) to the same diretory with forte. But when I try to execute forte on rasp I got the below error:

./forte: error while loading shared libraries: libopen62541.so: cannot open shared object file: No such file or directory

see pic attached

Does anyone faced a similar issue?


BR.
Ricardo

Re: Cross compiling FORTE + OPC-UA lib to raspberry from Windows [message #1852413 is a reply to message #1852404] Sun, 15 May 2022 10:22 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

Hi Ricard,

haven't tried it myself but here a few tips on Linux shared libraries that may help: first is the executable permission flag set for the library? Typcially the .so is only a symbolic link to .so with semantic versioning. Is this here also the case. If yes have you copied them as well?

I hope this helps.

BR,
Alois
Re: Cross compiling FORTE + OPC-UA lib to raspberry from Windows [message #1852480 is a reply to message #1852413] Wed, 18 May 2022 01:43 Go to previous messageGo to next message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois,

Thanks for the prompt reply. Find below answers to the the questions:

first is the executable permission flag set for the library?
Yes, permission to Execute is set to Anyone, for forte executable and for libopen62541.so as well.

Typcially the .so is only a symbolic link to .so with semantic versioning. Is this here also the case. If yes have you copied them as well?
I'm not sure if I made it correctly, but I've copied all the folder with open62541 cross-compilation done on W11 to the Raspberry and place at the same directory as the Forte folder. At Windows machine OPC-UA library is working well with this arrangement.

P.S.: using O.S. Raspbian Stretch distribution.


B.R.
Ricardo

[Updated on: Sat, 21 May 2022 13:22]

Report message to a moderator

Re: Cross compiling FORTE + OPC-UA lib to raspberry from Windows [message #1852532 is a reply to message #1852480] Sat, 21 May 2022 17:04 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1589
Registered: January 2014
Senior Member

Hi Ricardo,

you could try a few things to find out more. First you can use ldd ./forte to check what libraries 4diac FORTE is expecting. Maybe there is some absolute path or something else strange. Also you could check with file libopen62541.so for which architecture your .so is compiled. Also you can have a look with ls -al in the directory where your 4diac FORTE executable is located if the .so is a symbolic link or not. I hope this gives you more insights to find out what is worng here.

Cheers,
Alois
Re: Cross compiling FORTE + OPC-UA lib to raspberry from Windows [message #1852534 is a reply to message #1852480] Sat, 21 May 2022 18:41 Go to previous message
Ricardo Rech is currently offline Ricardo RechFriend
Messages: 21
Registered: September 2021
Junior Member
Hi Alois and 4diac community

I managed to run OPC. As Alois suggest it was a matter to link the libopen62541.so library to the path, which is the directory with the all compiled OPC-UA files.
Running the command $ ldd ./forte we can see that the path is missing.

index.php/fa/42082/0/

By running the /etc/ld.so.conf command and than run ldconfig the path is set permanently to the libopen62541.so.

$ echo "/home/pi/open62541/build_raspPi/bin" | sudo tee /etc/ld.so.conf

$ sudo ldconfig

$ ldd ./forte

index.php/fa/42081/0/

Note that at Linux it is note necessary to save the libopen62541.so at the same directory as forte executable, as I stated before.

Hope that may help other fellows in the community.


B.R.
Ricardo
Previous Topic:Other IEC Process Control FBD standards
Next Topic:Can the algorithms in FB written in Java?
Goto Forum:
  


Current Time: Thu May 09 14:08:20 GMT 2024

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

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

Back to the top