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

compilation error related to itpp #37

Open
gariac opened this issue Mar 18, 2021 · 1 comment
Open

compilation error related to itpp #37

gariac opened this issue Mar 18, 2021 · 1 comment

Comments

@gariac
Copy link

gariac commented Mar 18, 2021

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(k
t);
| ~~~~~~~~~~^~
/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(k
t);
| ~~~~~~~~~~^~
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
Copy link
Author

gariac commented Apr 5, 2021

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.

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

1 participant