martinmarinov / TempestSDR

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

TDSRLibraryNotCompatible on OS X #1

Open tibbon opened 8 years ago

tibbon commented 8 years ago

Removed the line 93 in the Makefile, ran make all with no errors. Attempted to run the JTempestSDR.jar file, after installing new JDK... and getting the error The Library has not been compiled for your OS/Architecture yet (MAC/X64)

Output of running make all

make all
mkdir -p bin/MAC/X64
mkdir -p obj
cc -Wall  -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O3   -m64 -c src/TSDRPlugin_RawFile.c -o obj/TSDRPlugin_RawFile.o
mkdir -p bin/MAC/X64
mkdir -p obj
cc -Wall  -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O3   -m64 -c src/timer.c -o obj/timer.o
cc -Wall -shared    -m64 -o bin/MAC/X64/TSDRPlugin_RawFile.so obj/TSDRPlugin_RawFile.o obj/timer.o
make[1]: Nothing to be done for `all'.
mkdir -p lib/MAC/X64
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../TSDRPlugin_RawFile/ all BUILD_TYPE=; cp -f ../TSDRPlugin_RawFile//bin/MAC/X64/*.so lib/MAC/X64/;
cc -Wall -shared    -m64 -o bin/MAC/X64/TSDRPlugin_RawFile.so obj/TSDRPlugin_RawFile.o obj/timer.o
makefile:13: JAVA_HOME should be set so it points to your jdk installation dir
make[3]: Nothing to be done for `all'.
mkdir -p include
mkdir -p ../lib/MAC/X64
mkdir -p obj
mkdir -p include ../bin/martin/tempest/core/
javac ../src/martin/tempest/core/TSDRLibrary.java -d ../bin/ -cp ../src/
javah -classpath ../bin -o TSDRLibraryNDK.h -jni martin.tempest.core.TSDRLibrary
cc -Wall  -I"/include"  -I"/include/win32"  -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O3  -m64 -c TSDRLibraryNDK.c -o obj/TSDRLibraryNDK.o
cc -Wall -shared   -m64 -o ../lib/MAC/X64/TSDRLibraryNDK.so obj/TSDRLibraryNDK.o ../../TempestSDR/bin/MAC/X64/TSDRLibrary.a
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRCannotOpenDeviceException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRFunctionNotImplemented.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRIncompatiblePluginException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRInvalidParameterException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRInvalidParameterValueException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRLoadPluginException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRNotRunningException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRPluginParametersException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRSampleRateWrongException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/core/exceptions/TSDRVideoParamsException.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/gui/AutoScaleVisualizer.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/gui/HoldButton.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/gui/ImageVisualizer.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/gui/Main.java -d bin/ -cp src/
mkdir -p bin # Create the bin directory if it doesn't exist (if you downloaded it from github)
javac src/martin/tempest/gui/SNRVisualizer.java -d bin/ -cp src/
jar cvfe JTempestSDR.jar martin.tempest.gui.Main lib -C bin .
added manifest
adding: lib/(in = 0) (out= 0)(stored 0%)
adding: lib/MAC/(in = 0) (out= 0)(stored 0%)
adding: lib/MAC/X64/(in = 0) (out= 0)(stored 0%)
adding: lib/MAC/X64/TSDRLibraryNDK.so(in = 59676) (out= 25755)(deflated 56%)
adding: lib/MAC/X64/TSDRPlugin_RawFile.so(in = 14336) (out= 4254)(deflated 70%)
adding: martin/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/core/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/core/exceptions/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/core/exceptions/TSDRAlreadyRunningException.class(in = 459) (out= 293)(deflated 36%)
adding: martin/tempest/core/exceptions/TSDRCannotOpenDeviceException.class(in = 463) (out= 292)(deflated 36%)
adding: martin/tempest/core/exceptions/TSDRException.class(in = 496) (out= 311)(deflated 37%)
adding: martin/tempest/core/exceptions/TSDRFunctionNotImplemented.class(in = 372) (out= 270)(deflated 27%)
adding: martin/tempest/core/exceptions/TSDRIncompatiblePluginException.class(in = 445) (out= 298)(deflated 33%)
adding: martin/tempest/core/exceptions/TSDRInvalidParameterException.class(in = 441) (out= 296)(deflated 32%)
adding: martin/tempest/core/exceptions/TSDRInvalidParameterValueException.class(in = 451) (out= 295)(deflated 34%)
adding: martin/tempest/core/exceptions/TSDRLibraryNotCompatible.class(in = 453) (out= 294)(deflated 35%)
adding: martin/tempest/core/exceptions/TSDRLoadPluginException.class(in = 429) (out= 290)(deflated 32%)
adding: martin/tempest/core/exceptions/TSDRNotRunningException.class(in = 451) (out= 291)(deflated 35%)
adding: martin/tempest/core/exceptions/TSDRPluginParametersException.class(in = 463) (out= 292)(deflated 36%)
adding: martin/tempest/core/exceptions/TSDRSampleRateWrongException.class(in = 461) (out= 293)(deflated 36%)
adding: martin/tempest/core/exceptions/TSDRVideoParamsException.class(in = 453) (out= 294)(deflated 35%)
adding: martin/tempest/core/TSDRLibrary$1.class(in = 1603) (out= 843)(deflated 47%)
adding: martin/tempest/core/TSDRLibrary$2.class(in = 1091) (out= 677)(deflated 37%)
adding: martin/tempest/core/TSDRLibrary$FrameReadyCallback.class(in = 464) (out= 251)(deflated 45%)
adding: martin/tempest/core/TSDRLibrary$IncomingValueCallback$PLOT_ID.class(in = 1253) (out= 558)(deflated 55%)
adding: martin/tempest/core/TSDRLibrary$IncomingValueCallback$VALUE_ID.class(in = 1495) (out= 691)(deflated 53%)
adding: martin/tempest/core/TSDRLibrary$IncomingValueCallback.class(in = 606) (out= 280)(deflated 53%)
adding: martin/tempest/core/TSDRLibrary$PARAM.class(in = 1475) (out= 778)(deflated 47%)
adding: martin/tempest/core/TSDRLibrary$PARAM_DOUBLE.class(in = 916) (out= 451)(deflated 50%)
adding: martin/tempest/core/TSDRLibrary$SYNC_DIRECTION.class(in = 1217) (out= 601)(deflated 50%)
adding: martin/tempest/core/TSDRLibrary.class(in = 10146) (out= 4867)(deflated 52%)
adding: martin/tempest/gui/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/gui/AutoScaleVisualizer.class(in = 3514) (out= 2090)(deflated 40%)
adding: martin/tempest/gui/HoldButton$1.class(in = 648) (out= 365)(deflated 43%)
adding: martin/tempest/gui/HoldButton$2.class(in = 917) (out= 487)(deflated 46%)
adding: martin/tempest/gui/HoldButton$HoldListener.class(in = 238) (out= 167)(deflated 29%)
adding: martin/tempest/gui/HoldButton.class(in = 2474) (out= 1302)(deflated 47%)
adding: martin/tempest/gui/ImageVisualizer.class(in = 5632) (out= 3137)(deflated 44%)
adding: martin/tempest/gui/Main$1.class(in = 711) (out= 474)(deflated 33%)
adding: martin/tempest/gui/Main$10.class(in = 1079) (out= 604)(deflated 44%)
adding: martin/tempest/gui/Main$11.class(in = 1596) (out= 862)(deflated 45%)
adding: martin/tempest/gui/Main$12.class(in = 1544) (out= 809)(deflated 47%)
adding: martin/tempest/gui/Main$13.class(in = 1547) (out= 817)(deflated 47%)
adding: martin/tempest/gui/Main$14.class(in = 1290) (out= 700)(deflated 45%)
adding: martin/tempest/gui/Main$15.class(in = 1010) (out= 554)(deflated 45%)
adding: martin/tempest/gui/Main$16.class(in = 1348) (out= 723)(deflated 46%)
adding: martin/tempest/gui/Main$17.class(in = 626) (out= 409)(deflated 34%)
adding: martin/tempest/gui/Main$18.class(in = 696) (out= 444)(deflated 36%)
adding: martin/tempest/gui/Main$19.class(in = 567) (out= 368)(deflated 35%)
adding: martin/tempest/gui/Main$2.class(in = 634) (out= 403)(deflated 36%)
adding: martin/tempest/gui/Main$20.class(in = 1060) (out= 592)(deflated 44%)
adding: martin/tempest/gui/Main$21.class(in = 567) (out= 370)(deflated 34%)
adding: martin/tempest/gui/Main$22.class(in = 567) (out= 367)(deflated 35%)
adding: martin/tempest/gui/Main$23.class(in = 865) (out= 467)(deflated 46%)
adding: martin/tempest/gui/Main$24.class(in = 866) (out= 469)(deflated 45%)
adding: martin/tempest/gui/Main$25.class(in = 564) (out= 369)(deflated 34%)
adding: martin/tempest/gui/Main$26.class(in = 865) (out= 469)(deflated 45%)
adding: martin/tempest/gui/Main$27.class(in = 863) (out= 469)(deflated 45%)
adding: martin/tempest/gui/Main$28.class(in = 634) (out= 385)(deflated 39%)
adding: martin/tempest/gui/Main$29.class(in = 634) (out= 385)(deflated 39%)
adding: martin/tempest/gui/Main$3.class(in = 1614) (out= 811)(deflated 49%)
adding: martin/tempest/gui/Main$30.class(in = 727) (out= 439)(deflated 39%)
adding: martin/tempest/gui/Main$31.class(in = 877) (out= 525)(deflated 40%)
adding: martin/tempest/gui/Main$32.class(in = 1023) (out= 609)(deflated 40%)
adding: martin/tempest/gui/Main$33.class(in = 1283) (out= 694)(deflated 45%)
adding: martin/tempest/gui/Main$34.class(in = 1054) (out= 605)(deflated 42%)
adding: martin/tempest/gui/Main$35.class(in = 694) (out= 407)(deflated 41%)
adding: martin/tempest/gui/Main$36.class(in = 2023) (out= 992)(deflated 50%)
adding: martin/tempest/gui/Main$37.class(in = 1594) (out= 734)(deflated 53%)
adding: martin/tempest/gui/Main$4.class(in = 562) (out= 365)(deflated 35%)
adding: martin/tempest/gui/Main$5.class(in = 565) (out= 365)(deflated 35%)
adding: martin/tempest/gui/Main$6.class(in = 672) (out= 417)(deflated 37%)
adding: martin/tempest/gui/Main$7.class(in = 582) (out= 377)(deflated 35%)
adding: martin/tempest/gui/Main$8.class(in = 596) (out= 376)(deflated 36%)
adding: martin/tempest/gui/Main$9.class(in = 861) (out= 505)(deflated 41%)
adding: martin/tempest/gui/Main$ActRegistrator.class(in = 1526) (out= 757)(deflated 50%)
adding: martin/tempest/gui/Main$TransformerAndCallbackHeight.class(in = 2367) (out= 1168)(deflated 50%)
adding: martin/tempest/gui/Main.class(in = 36180) (out= 16743)(deflated 53%)
adding: martin/tempest/gui/OnTSDRParamChangedCallback.class(in = 472) (out= 253)(deflated 46%)
adding: martin/tempest/gui/ParametersToggleButton$1.class(in = 914) (out= 482)(deflated 47%)
adding: martin/tempest/gui/ParametersToggleButton.class(in = 2251) (out= 1083)(deflated 51%)
adding: martin/tempest/gui/PlotVisualizer$1.class(in = 2043) (out= 951)(deflated 53%)
adding: martin/tempest/gui/PlotVisualizer$2.class(in = 1337) (out= 706)(deflated 47%)
adding: martin/tempest/gui/PlotVisualizer$3.class(in = 2138) (out= 978)(deflated 54%)
adding: martin/tempest/gui/PlotVisualizer$TransformerAndCallback.class(in = 622) (out= 381)(deflated 38%)
adding: martin/tempest/gui/PlotVisualizer.class(in = 8896) (out= 4537)(deflated 48%)
adding: martin/tempest/gui/scale/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/gui/scale/LogScale.class(in = 4288) (out= 2418)(deflated 43%)
adding: martin/tempest/gui/scale/ZoomableXScale.class(in = 3712) (out= 1812)(deflated 51%)
adding: martin/tempest/gui/SNRVisualizer.class(in = 3258) (out= 1918)(deflated 41%)
adding: martin/tempest/gui/VideoMode.class(in = 5173) (out= 2444)(deflated 52%)
adding: martin/tempest/sources/(in = 0) (out= 0)(stored 0%)
adding: martin/tempest/sources/TSDRExtIOSource$1$1.class(in = 1194) (out= 653)(deflated 45%)
adding: martin/tempest/sources/TSDRExtIOSource$1.class(in = 1067) (out= 553)(deflated 48%)
adding: martin/tempest/sources/TSDRExtIOSource$2$1.class(in = 1218) (out= 661)(deflated 45%)
adding: martin/tempest/sources/TSDRExtIOSource$2.class(in = 1031) (out= 524)(deflated 49%)
adding: martin/tempest/sources/TSDRExtIOSource.class(in = 3577) (out= 1835)(deflated 48%)
adding: martin/tempest/sources/TSDRFileSource$1.class(in = 2144) (out= 967)(deflated 54%)
adding: martin/tempest/sources/TSDRFileSource$2.class(in = 1546) (out= 744)(deflated 51%)
adding: martin/tempest/sources/TSDRFileSource$ParsedTSDRFileSource.class(in = 2652) (out= 1347)(deflated 49%)
adding: martin/tempest/sources/TSDRFileSource.class(in = 4375) (out= 2142)(deflated 51%)
adding: martin/tempest/sources/TSDRMiricsSource.class(in = 678) (out= 378)(deflated 44%)
adding: martin/tempest/sources/TSDRSource$1.class(in = 1003) (out= 521)(deflated 48%)
adding: martin/tempest/sources/TSDRSource$ActionListenerRegistrator.class(in = 313) (out= 199)(deflated 36%)
adding: martin/tempest/sources/TSDRSource$TSDRSourceParamChangedListener.class(in = 329) (out= 187)(deflated 43%)
adding: martin/tempest/sources/TSDRSource.class(in = 3492) (out= 1687)(deflated 51%)
adding: martin/tempest/sources/TSDRUHDSource.class(in = 332) (out= 238)(deflated 28%)
tibbon commented 8 years ago

To be noted, I barely know anything about Java, its environment, etc...

martinmarinov commented 8 years ago

Hi I'm afraid I'm not actively supporting the project anymore. However, if possible, I would suggest running this under a 32 bit java if possible. Otherwise I can guess something might be wrong with the compiler (not compiling for 64 bit)

Darth-Carrotpie commented 7 years ago

Java does not care about the platform. Compiler tries to fish out the libraries, which in this case are built in x86, while your system (as well as mine was) is x64. Just build .dll's to x64 and java will work.

dennisdebel commented 6 years ago

Build the source on 64bit OSX 10.10

-download/clone the source -cd into java gui directory -find out where java jdk is: $ /usr/libexec/java_home -v 1.7 -copy Home/include/darwin/jni_md.h to /include/jni_md.h like so: $ cp /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/include/darwin/jni_md.h /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/include/jni_md.h -comment out line 93 in the makefile (UHD plugin) -run the make command $ make all JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home ARCHNAME=X64

The GUI app now runs, but have trouble to get the ExtIO plugin/dll for my RTLSDR dongle to work. I think the problem is the 32bit-ness of these ExtIO's? See: http://www.hdsdr.de/hardware.html

How to build these in 64bit?

fvantienen commented 6 years ago

On line 30 in JavaGUI/jni/makefile "$(JAVA_HOME)/include/darwin" needs to be added

tibbon commented 5 years ago

I'm having trouble figuring out which line 93 to comment out in the current release. What precisely am I commenting out (in case the lines move)

Getting this error now

~/C/TempestSDR ❯❯❯ make all JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home ARCHNAME=X64                                                                                  master
mkdir -p bin/MAC/X64
mkdir -p obj
cc -Wall  -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O3   -m64 -c src/TSDRPlugin_RawFile.c -o obj/TSDRPlugin_RawFile.o
mkdir -p bin/MAC/X64
mkdir -p obj
cc -Wall  -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -O3   -m64 -c src/timer.c -o obj/timer.o
cc -Wall -shared    -m64 -o bin/MAC/X64/TSDRPlugin_RawFile.so obj/TSDRPlugin_RawFile.o obj/timer.o
make[1]: Nothing to be done for `all'.
mkdir -p lib/MAC/X64
/Library/Developer/CommandLineTools/usr/bin/make -C ../TSDRPlugin_RawFile/ all BUILD_TYPE=; cp -f ../TSDRPlugin_RawFile//bin/MAC/X64/*.so lib/MAC/X64/;  /Library/Developer/CommandLineTools/usr/bin/make -C ../TSDRPlugin_UHD/ all BUILD_TYPE=; cp -f ../TSDRPlugin_UHD//bin/MAC/X64/*.so lib/MAC/X64/;
cc -Wall -shared    -m64 -o bin/MAC/X64/TSDRPlugin_RawFile.so obj/TSDRPlugin_RawFile.o obj/timer.o
mkdir -p bin/MAC/X64
mkdir -p obj
g++  -fPIC  -m64 -c src/TSDRPlugin_UHD.cpp -o obj/TSDRPlugin_UHD.o
src/TSDRPlugin_UHD.cpp:335:23: error: no member named 'RECV_MODE_ONE_PACKET' in 'uhd::device'
                uhd::device::RECV_MODE_ONE_PACKET
                ~~~~~~~~~~~~~^
1 error generated.
make[2]: *** [obj/TSDRPlugin_UHD.o] Error 1
cp: ../TSDRPlugin_UHD//bin/MAC/X64/*.so: No such file or directory
make[1]: *** [plugins] Error 1
make: *** [all] Error 2
sealldeveloper commented 8 months ago

Gday, after a hefty look into this the core issue seems to arise from using SdrPlay, which you can 'compile' it without by commenting out the lines compiling it in both JavaGUI's makefile and the root folder makefile, which results in a jar but still has no mac support for M1. If we want SdrPlay to work we need the new API from SdrPlay (3.x).