martinmarinov / TempestSDR

Remote video eavesdropping using a software-defined radio platform
GNU General Public License v3.0
1.35k stars 248 forks source link

Compiling issue on Raspberry Pi #21

Open ghost opened 5 years ago

ghost commented 5 years ago

Hello, I was really interested about this program and try to compile it by carefully following the instruction. But when i ran the make all command, this happen :

cc -Wall  -O3 -fPIC    -c src/timer.c -o obj/timer.o
cc -Wall -shared     -o bin/LINUX/ARM/libTSDRPlugin_RawFile.so obj/TSDRPlugin_RawFile.o obj/timer.o
make[2]: Leaving directory '/home/noroot/TempestSDR/TSDRPlugin_RawFile'
make[2]: Entering directory '/home/noroot/TempestSDR/JavaGUI/jni'
makefile:13: JAVA_HOME should be set so it points to your jdk installation dir
make[3]: Entering directory '/home/noroot/TempestSDR/TempestSDR'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/noroot/TempestSDR/TempestSDR'
mkdir -p include
mkdir -p ../lib/LINUX/ARM
mkdir -p obj
javah -classpath ../bin -o TSDRLibraryNDK.h -jni martin.tempest.core.TSDRLibrary
Error: Could not find class file for 'martin.tempest.core.TSDRLibrary'.
make[2]: *** [makefile:139: TSDRLibraryNDK.h] Error 1
make[2]: Leaving directory '/home/noroot/TempestSDR/JavaGUI/jni'
make[1]: *** [makefile:144: jnilib] Error 2
make[1]: Leaving directory '/home/noroot/TempestSDR/JavaGUI'
make: *** [makefile:28: all] Error 2

What can I do to solve this ? Is it possible to compile it with the Raspberry architecture ?

Thanks for taking the time to help me :D

wuyuemei commented 4 years ago

hello,I also encountered the same problem, did you solve it and how did you solve it?

monteiroman commented 4 years ago

Same here, I'm facing that error on an ubuntu desktop.

helmarw commented 4 years ago

me too, looks like there is no javah in recent versions von java jdk. instead javac -h should be used. i tried to change that but also other flags do not exist anymore like -jni .... so im also stuck at this point

xologram commented 3 years ago

so what I did was first figure out where jni.h and jni_md.h are located on my system:

$ locate jni.h
/usr/include/arm-linux-gnueabihf/libavcodec/jni.h
/usr/lib/jvm/java-11-openjdk-armhf/include/jni.h
$ locate jni_md.h
/usr/lib/jvm/java-11-openjdk-armhf/include/linux/jni_md.h

and include the directories in TempestSDR/JavaGUI/jni/makefile

under INC. so it looks like

INC += "$(JAVA_HOME)/include" "$(JAVA_HOME)/include/win32" "$(JAVA_HOME)/include/linux" "$(JAVA_HOME)/include/darwin" "/usr/lib/jvm/java-11-openjdk-armhf/include" "/usr/lib/jvm/java-11-openjdk-armhf/include/linux/"

and compilation worked, however the jar file is still compiled for the wrong arch. it's under JavaGUI, but I still get

martin.tempest.core.exceptions.TSDRLibraryNotCompatible: The library has not been compiled for your OS/Architecture yet (LINUX/ARM).

EDIT:

managed to compile it and run the .jar but i have no idea how to make it work with either RTL-SDR or HackRF.

since I run debian 64 bit, the OS recognizes arch as aarch64. the easiest way for me was to go to each makefile and change UNAME_M line to UNAME_M := arm64.

It compiled for arm64/aarch64 and starts (via X11 forwarding) but i have no idea which plugin to use. extIO seems to be windows only. any suggestion?