Jump to content
  • 0

.NET app looks for DWF library files on Raspberry OS (64 bit)


Andras

Question

I'm trying to run a .NET application on Raspberry Pi 4 using the DWF library. It runs on Windows and I could make it work in Raspberry OS before (I just can't remember exactly how 🙈).

It's a fresh installation, so first I installed the Adept Runtime (digilent.adept.runtime_2.27.9-armhf.deb) and WaveForms (digilent.waveforms_beta_3.20.13_armhf.deb) without any issues, and WaveForms sees the AD3 correctly.

When I run my app and I call the FDwfGetVersion method, and I get this exception:

Failed to get DWF version. 
System.DllNotFoundException: Unable to load shared library 'dwf' or one of its dependencies. 
In order to help diagnose loading problems, consider using a tool like strace. 
If you're using glibc, consider setting the LD_DEBUG environment variable:  
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/runtimes/linux-arm64/native/dwf.so: cannot open shared object file: No such file or directory 
/opt/dotnet/shared/Microsoft.NETCore.App/7.0.7/dwf.so: cannot open shared object file: No such file or directory 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/dwf.so: cannot open shared object file: No such file or directory 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/runtimes/linux-arm64/native/libdwf.so: cannot open shared object file: No such file or directory 
/opt/dotnet/shared/Microsoft.NETCore.App/7.0.7/libdwf.so: cannot open shared object file: No such file or directory 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/libdwf.so: cannot open shared object file: No such file or directory libdwf.so: wrong ELF class: ELFCLASS32 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/runtimes/linux-arm64/native/dwf: cannot open shared object file: No such file or directory 
/opt/dotnet/shared/Microsoft.NETCore.App/7.0.7/dwf: cannot open shared object file: No such file or directory 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/dwf: cannot open shared object file: No such file or directory 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/runtimes/linux-arm64/native/libdwf: cannot open shared object file: No such file or directory 
/opt/dotnet/shared/Microsoft.NETCore.App/7.0.7/libdwf: cannot open shared object file: No such file or directory 
/home/pi/Work/bbd-p08-body-monitor/Source/BBD.BodyMonitor.API/bin/Debug/net7.0/libdwf


It looks for dwf and libdwf files. I have a libdwf.so in /usr/lib which is a link to libdwf.so.3.20.13 in the same folder.

I tried to copy the file into my app's folder, but no luck. I suspect that the library can't be loaded for some reason. Is armhf the right architecture for the 64-bit Raspbian OS?
Does WaveForms use this library to connect with AD3? (Because then I can rule out the architecture issue.)

Should this work or am I missing something?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Szia @attila,

Thank you, it works now!

Just for the record: I incorrectly installed the 32-bit packages (digilent.adept.runtime_2.27.9-armhf.deb and digilent.waveforms_beta_3.20.13_armhf.deb) to my 64-bit Raspberry OS. WaveForms worked, but DWF didn't.

To fix this I first needed to remove those two packages:

sudo dpkg --remove digilent.waveforms:armhf
sudo dpkg --remove digilent.adept.runtime:armhf

And then - as you suggested - I installed the digilent.adept.runtime_2.27.9-arm64.deb and digilent.waveforms_beta_3.20.13_arm64.deb packages, and DWF came alive!

Thank you!
Andras

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...