discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GR-inspector installation issues


From: CEL
Subject: Re: [Discuss-gnuradio] GR-inspector installation issues
Date: Thu, 19 Apr 2018 09:22:48 +0000

Hi Neil,

this is rather surprising, as __GR_VLA is defined in
gnuradio/attributes.h, which is included in inspector/api.h, which is
included in inspector/ofdm_bouzegzi_c.h, which is included in
lib/ofdm_bouzegzi_c_impl.h, which in turn is included in
ofdm_bouzegzi_c_impl.cc, which is where your compiler complains about
it not being defined.

But let me check something: Maybe GNU Radio 3.7.9 is simply too old...
Yep, the VLA macros were introduced in 3.7.9.2, and Ubuntu 16.04 ships
3.7.9.1 or so. So, you'll need a more recent GNU Radio. Or, and to be
honest, that would be the better way: Fix the offending line:

      // TODO: make this cooler
      __GR_VLA(float, m_vec, M);
      for(unsigned int i = 0; i < M; i++){
        m_vec[i] = i;
      }

Seriously, m_vec really shouldn't be alloca'd (which basically means,
reserved stack space for) every time autocorr is called.

Since m_vec has size `d_len`, and that doesn't change at random places,
I'd recommend introducing a `std::vector<float> d_autocorr_vec` member
variable, and resizing it to d_len when that is changed. Same goes for
pre further down in the same autocorrelation function, and for the two
VLAs pwoer and R in cost_func. (it's really not a good idea to allocate
large arrays on the stack).

There's two other files where VLAs are being used in gr-inspector, and
it'd be rather cool if you fixed these, along the way.

Best regards,
Marcus

On Thu, 2018-04-19 at 08:49 +0000, neil shelley wrote:
> Hi all, 
> I am trying to install gr-inspector, I have recently installed clean O/S - 
> Ubuntu 16.04LTS and GNU Radio 3.7.9.  I installed the dependencies listed on 
> github for gr-inspector including tensorflow (without GPU support).  When 
> running cmake..  there are no errors.
> 
> However, when running make, I get the following errors, could anyone please 
> suggest what I could try to resolve the issues ?
> 
> address@hidden:~/gr-inspector/build$ make
> [  2%] Generating moc_vis3d_vf_form.cxx
> [  5%] Generating moc_inspector_form.cxx
> Scanning dependencies of target gnuradio-inspector
> [  7%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/moc_inspector_form.cxx.o
> [ 10%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/moc_vis3d_vf_form.cxx.o
> [ 13%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/signal_separator_c_impl.cc.o
> [ 15%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/signal_detector_cvf_impl.cc.o
> [ 18%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/signal_extractor_c_impl.cc.o
> [ 21%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/qtgui_inspector_sink_vf_impl.cc.o
> [ 23%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/vis3d_vf_form.cc.o
> [ 26%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/inspector_form.cc.o
> [ 28%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/signal_marker.cc.o
> [ 31%] Building CXX object 
> lib/CMakeFiles/gnuradio-inspector.dir/ofdm_bouzegzi_c_impl.cc.o
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc: In member function 
> ‘float gr::inspector::ofdm_bouzegzi_c_impl::autocorr(const gr_complex*, int, 
> int, int)’:
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:146:16: error: expected 
> primary-expression before ‘float’
>        __GR_VLA(float, m_vec, M);
>                 ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:146:23: error: ‘m_vec’ 
> was not declared in this scope
>        __GR_VLA(float, m_vec, M);
>                        ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:146:31: error: ‘__GR_VLA’ 
> was not declared in this scope
>        __GR_VLA(float, m_vec, M);
>                                ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:168:26: error: expected 
> primary-expression before ‘,’ token
>        __GR_VLA(gr_complex, pre, M);
>                           ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:168:28: error: ‘pre’ was 
> not declared in this scope
>        __GR_VLA(gr_complex, pre, M);
>                             ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc: In member function 
> ‘float gr::inspector::ofdm_bouzegzi_c_impl::cost_func(const gr_complex*, int, 
> int)’:
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:211:16: error: expected 
> primary-expression before ‘float’
>        __GR_VLA(float, power, 2 * d_Nb + 1);
>                 ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:211:23: error: ‘power’ 
> was not declared in this scope
>        __GR_VLA(float, power, 2 * d_Nb + 1);
>                        ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:211:42: error: ‘__GR_VLA’ 
> was not declared in this scope
>        __GR_VLA(float, power, 2 * d_Nb + 1);
>                                           ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:212:16: error: expected 
> primary-expression before ‘float’
>        __GR_VLA(float, R, 2 * d_Nb + 1);
>                 ^
> /home/user/gr-inspector/lib/ofdm_bouzegzi_c_impl.cc:212:23: error: ‘R’ was 
> not declared in this scope
>        __GR_VLA(float, R, 2 * d_Nb + 1);
>                        ^
> lib/CMakeFiles/gnuradio-inspector.dir/build.make:288: recipe for target 
> 'lib/CMakeFiles/gnuradio-inspector.dir/ofdm_bouzegzi_c_impl.cc.o' failed
> make[2]: *** 
> [lib/CMakeFiles/gnuradio-inspector.dir/ofdm_bouzegzi_c_impl.cc.o] Error 1
> CMakeFiles/Makefile2:137: recipe for target 
> 'lib/CMakeFiles/gnuradio-inspector.dir/all' failed
> make[1]: *** [lib/CMakeFiles/gnuradio-inspector.dir/all] Error 2
> Makefile:138: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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