discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gr-lte error


From: Johannes Demel
Subject: Re: [Discuss-gnuradio] gr-lte error
Date: Thu, 9 Jan 2014 15:24:56 -0800

Hi,

this is a C++11 feature you just "discovered". Older compilers won't allow you to compile this code like this. Although they usually through a warning that this is C++11 code. I don't know which commit it was, but I removed this _expression_ and put in some pre-C++11 code instead.
Also I recommend upgrading to GR 3.7 and the gr-lte blocks which use the 3.7 API. All bugfixes and new features go in there.

Another smaller solution to the problem should be to make this member static. This should be allowed by older compilers.

Happy hacking
Johannes


On Thu, Jan 9, 2014 at 3:08 PM, sumitstop <address@hidden> wrote:
I am facing this error while during make of gr-lte(3.6.5.1)
OS : Ubuntu 12.04
GNU Radio ver : 3.6.5.1
GCC : 4.6.3


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make -j5
Scanning dependencies of target pygen_apps_9a6dd
Scanning dependencies of target _lte_swig_swig_tag
Scanning dependencies of target pygen_python_fd902
Scanning dependencies of target _lte_swig_doc_tag
[  0%] [  4%] [  4%] Built target pygen_apps_9a6dd
Generating __init__.pyc, viterbi_vfvb.pyc, hier_freq_estimate_cc.pyc,
hier_sss_sync_cc.pyc, hier_pss_sync_cc.pyc, decode_bch_vfvb.pyc,
decode_pbch_vcvf.pyc, estimator_parameterizer_msg.pyc, utils.pyc,
decode_pcfich_vcm.pyc
[  7%] Building CXX object
swig/CMakeFiles/_lte_swig_swig_tag.dir/_lte_swig_swig_tag.cpp.o
[  9%] Generating __init__.pyo, viterbi_vfvb.pyo, hier_freq_estimate_cc.pyo,
hier_sss_sync_cc.pyo, hier_pss_sync_cc.pyo, decode_bch_vfvb.pyo,
decode_pbch_vcvf.pyo, estimator_parameterizer_msg.pyo, utils.pyo,
decode_pcfich_vcm.pyo
Building CXX object
swig/CMakeFiles/_lte_swig_doc_tag.dir/_lte_swig_doc_tag.cpp.o
[ 11%] Building CXX object
lib/CMakeFiles/gnuradio-lte.dir/lte_qpsk_soft_demod_vcvf.cc.o
Linking CXX executable _lte_swig_swig_tag
Linking CXX executable _lte_swig_doc_tag
[ 14%] Building CXX object
lib/CMakeFiles/gnuradio-lte.dir/lte_layer_demapper_vcvc.cc.o
[ 14%] Built target _lte_swig_swig_tag
[ 14%] Built target pygen_python_fd902
[ 14%] [ 16%] [ 19%] Built target _lte_swig_doc_tag
Building CXX object lib/CMakeFiles/gnuradio-lte.dir/lte_pbch_demux_vcvc.cc.o
Scanning dependencies of target pygen_swig_07e0e
Building CXX object
lib/CMakeFiles/gnuradio-lte.dir/lte_pre_decoder_vcvc.cc.o
[ 21%] Generating doxygen xml for lte_swig_doc docs
[ 23%] Generating lte_swig_doc.i
[ 26%] Building CXX object
lib/CMakeFiles/gnuradio-lte.dir/lte_extract_occupied_tones_vcvc.cc.o
[ 28%] Building CXX object
lib/CMakeFiles/gnuradio-lte.dir/lte_remove_cp_cvc.cc.o
In file included from
/home/lte1/Downloads/gr-lte-gnuradio-v3.6.5.1/code/lib/lte_qpsk_soft_demod_vcvf.cc:26:0:
/home/lte1/Downloads/gr-lte-gnuradio-v3.6.5.1/code/include/lte_qpsk_soft_demod_vcvf.h:49:29:
*error: ‘std::sqrt’ cannot appear in a constant-_expression_[ 30%] *
/home/lte1/Downloads/gr-lte-gnuradio-v3.6.5.1/code/include/lte_qpsk_soft_demod_vcvf.h:49:35:
*error: a function call cannot appear in a constant-_expression_*
/home/lte1/Downloads/gr-lte-gnuradio-v3.6.5.1/code/include/lte_qpsk_soft_demod_vcvf.h:49:35:
*error: ISO C++ forbids initialization of member ‘d_SQRT2’ [-fpermissive]*
/home/lte1/Downloads/gr-lte-gnuradio-v3.6.5.1/code/include/lte_qpsk_soft_demod_vcvf.h:49:35:
*error: making ‘d_SQRT2’ static [-fpermissive]*
Generating lte_swig.tag
[ 33%] Swig source
make[2]: *** [lib/CMakeFiles/gnuradio-lte.dir/lte_qpsk_soft_demod_vcvf.cc.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [lib/CMakeFiles/gnuradio-lte.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 38%] [ 38%] Generating lte_swig.pyo
Generating lte_swig.pyc
[ 38%] Built target pygen_swig_07e0e
make: *** [all] Error 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*My Solution :* I went to line 49 of file lte_qpsk_soft_demod_vcvf.h, remove
the declaration of float d_SQRT2 and its initialization i.e. std::sqrt(2)
and made it a global declaration. And it worked for me as I am able to the
lte block in grc.

Is this patch wrong ! Somehow I am having doubt over it




--
View this message in context: http://gnuradio.4.n7.nabble.com/gr-lte-error-tp45675.html
Sent from the GnuRadio mailing list archive at Nabble.com.

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]