02-07-2023 03:29 AM
I am having issues calling my .so under RT linux, I get error 7.
LabVIEW: (Hex 0x7) File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
I am using a sbRIO 9627 with LV 2019 SP1.
The .so is for a Maxon EPOS4 downloaded from here.
I built the LabVIEW .lvlib through the wizard Use LabVIEW to Call .so file in NI Linux RT Target - NI
When I run the install.sh on the sbRIO 9627 it installs the Arm v7 version.
I am trying to call the VCS_OpenDevice function, just to get going.
What I have tried so far...with no luck
- I have used the 'Check file or folder exist' function to ensure the path is correct, which it is.
- I am specifying the path on the diagram, with '/opt/EposCmdLib_188.8.131.52/lib/v7/libEposCmd.*' and '/opt/EposCmdLib_184.108.40.206/lib/v7/libEposCmd.so.220.127.116.11'
- I have changed the group and owner of the /opt directory to be ni and lvuser
- I have tried the .so in the /home/lvuser/ directory, /lib, /usr/lib
I'm assuming I am missing something simple here, any advice, pointers support is greatly appreciated. Let me know if you need any more info.
02-07-2023 04:29 AM - edited 02-07-2023 04:54 AM
Well, there are many possibilities why it goes wrong. Linux is not always just Linux. It seems to install the correct ARM v7 library but that can still be not enough. NI Linux RT is compiled with the ARM v7 eabi in softfp. Most ARM targets nowadays (such as RASPI or Beaglebone Black are however compiled as hardfp. That ARM v7 is most likely meant for these targets, not for NI Linux RT ARM targets.
Another potential problem are dependencies. Depending on what GCC version was used to compile the shared library it may need newer system libraries than what the NI Linux RT system is based on, which makes use of somewhat older kernel sources.
02-07-2023 04:33 AM - edited 02-07-2023 04:38 AM
Another simple check that caught me out before is that the permissions are set for execute for the library. Often this is disabled when transferring it to the target.
As Rolf says though you do need to check the float ABI. The library linked does have ARMv7 library but there is no documentation on whether it is compiled for hardfloat or softfloat. This changes how numbers are passed between LabVIEW and the library so they need to be the same or the library will probably crash when you load it!