Skip to main content



      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] Fri, 13 May 2022 22:14 Go to next message
Eclipse UserFriend
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 06:22 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 17 May 2022 21:43 Go to previous messageGo to next message
Eclipse UserFriend
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 09:22] by Moderator

Re: Cross compiling FORTE + OPC-UA lib to raspberry from Windows [message #1852532 is a reply to message #1852480] Sat, 21 May 2022 13:04 Go to previous messageGo to next message
Eclipse UserFriend
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 14:41 Go to previous message
Eclipse UserFriend
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: Sun Jul 13 03:06:22 EDT 2025

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

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

Back to the top