pavsa / hackrf-spectrum-analyzer

GNU General Public License v3.0
645 stars 97 forks source link

Program will run, but wont interface with HackRF One on Linux #21

Closed CanadianBaconPro closed 5 years ago

CanadianBaconPro commented 5 years ago

Every time I run the program it throws this error

Exception in thread "hackrf_sweep" java.lang.UnsatisfiedLinkError: Unable to load library 'hackrf-sweep': Native library (linux-x86-64/libhackrf-sweep.so) not found in resource path ([rsrc:./, jar:rsrc:miglayout15-swing.jar!/, jar:rsrc:jcommon-1.0.17.jar!/, jar:rsrc:jfreechart-1.0.14.jar!/, jar:rsrc:hackrf-sweep-jna.jar!/, jar:rsrc:jna-4.5.1.jar!/])
    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:303)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:369)
    at jspectrumanalyzer.nativebridge.HackRFSweepNativeBridge.<clinit>(Unknown Source)
    at jspectrumanalyzer.HackRFSweepSpectrumAnalyzer.sweep(Unknown Source)
    at jspectrumanalyzer.HackRFSweepSpectrumAnalyzer.lambda$restartHackrfSweepExecute$6(Unknown Source)
    at java.base/java.lang.Thread.run(Thread.java:834)

I have tried to find the library, and look through the repo for it to no avail. It seems to be a library that is made by the makefile and does not exist as my build/lib/linux-x86-64 Any help would be appreciated,

Thanks in advance!

pavsa commented 5 years ago

Did you manage to get it working? It needs to be compiled first for linux.

CanadianBaconPro commented 5 years ago

Did you manage to get it working? It needs to be compiled first for linux.

Yes, soon after I found out g++ was throwing an error when trying to compile using the makefile, and for some reason I didn't have libusb-1.0 installed. After installing it and re making the project it worked just fine