Evrytania / LTE-Cell-Scanner

LTE SDR cell scanner optimized to work with very low performance RF front ends (8bit A/D, 20dB noise figure)
GNU Affero General Public License v3.0
570 stars 356 forks source link

compilation error related to itpp #37

Open gariac opened 3 years ago

gariac commented 3 years ago

I'm not a programmer but this error reads like a type definition error.

make [ 5%] Building CXX object src/CMakeFiles/LTE_MISC.dir/capbuf.cpp.o In file included from /usr/local/src/LTE-Cell-Scanner/src/capbuf.cpp:29: /usr/local/src/LTE-Cell-Scanner/include/dsp.h: In function ‘itpp::cvec fshift(const cvec&, double, double)’: /usr/local/src/LTE-Cell-Scanner/include/dsp.h:47:15: error: lvalue required as left operand of assignment 47 | coeff.real()=cos(kt); | ~~^~ /usr/local/src/LTE-Cell-Scanner/include/dsp.h:48:15: error: lvalue required as left operand of assignment 48 | coeff.imag()=sin(kt); | ~~^~ /usr/local/src/LTE-Cell-Scanner/include/dsp.h: In function ‘void fshift_inplace(itpp::cvec&, double, double)’: /usr/local/src/LTE-Cell-Scanner/include/dsp.h:64:15: error: lvalue required as left operand of assignment 64 | coeff.real()=cos(kt); | ~~^~ /usr/local/src/LTE-Cell-Scanner/include/dsp.h:65:15: error: lvalue required as left operand of assignment 65 | coeff.imag()=sin(kt); | ~~^~ make[2]: [src/CMakeFiles/LTE_MISC.dir/build.make:80: src/CMakeFiles/LTE_MISC.dir/capbuf.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:218: src/CMakeFiles/LTE_MISC.dir/all] Error 2 make: *** [Makefile:158: all] Error 2 sh-4.4#

gariac commented 3 years ago

This was solved in issue #19. Go to https://ubuntuforums.org/showthread.php?t=2349493

I edited the CMakeLists.txt in the src directory. However later I noticed the same file name exists in the top level directory so perhaps that is the file that should be edited but I am not going to break what I already fixed. Thus Edit CMakeLists.txt

I added these lines:

added line per https://ubuntuforums.org/showthread.php?t=2349493

SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")

Since only the owner can change the code I suppose this will be a bug forever. I am at least going to notify the website that suggested using this program. If you were referred to this git by another page you might want to reference this minor patch.

As an aside I have used this program in the past and the cell search sometimes crashed. If you are just here to get a frequency offset measurement, you can find the LTE frequency used by your phone with a number of apps. Just use that frequency rather than search.