Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling issue on Raspberry Pi #21

Open
ghost opened this issue Feb 26, 2019 · 4 comments
Open

Compiling issue on Raspberry Pi #21

ghost opened this issue Feb 26, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2019

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
Copy link

wuyuemei commented Dec 1, 2019

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

@monteiroman
Copy link

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

@helmarw
Copy link

helmarw commented Jan 20, 2020

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
Copy link

xologram commented Oct 18, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants