BogdanDIA/gr-dvbt

ld: symbol(s) not found for architecture x86_64

maggo1404 opened this issue · 6 comments

The make command create follow Messages:

$ make
Scanning dependencies of target gnuradio-dvbt
[  1%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/test_impl.cc.o
[  3%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/vector_pad_impl.cc.o
[  5%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/reference_signals_impl.cc.o
/Users/marcoschwan/gr-dvbt/lib/reference_signals_impl.cc:1173:25: warning: equality comparison result unused [-Wunused-comparison]
          d_frame_index == 0;
          ~~~~~~~~~~~~~~^~~~
/Users/marcoschwan/gr-dvbt/lib/reference_signals_impl.cc:1173:25: note: use '=' to turn this equality comparison into an assignment
          d_frame_index == 0;
                        ^~
                        =
1 warning generated.
[  7%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/dvbt_config.cc.o
/Users/marcoschwan/gr-dvbt/lib/dvbt_config.cc:61:7: warning: expression result unused [-Wunused-value]
      d_hierarchy;
      ^~~~~~~~~~~
/Users/marcoschwan/gr-dvbt/lib/dvbt_config.cc:62:5: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
2 warnings generated.
[  8%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/dvbt_map_impl.cc.o
[ 10%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/bit_inner_interleaver_impl.cc.o
[ 12%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/symbol_inner_interleaver_impl.cc.o
[ 14%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/inner_coder_impl.cc.o
[ 16%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/reed_solomon_enc_impl.cc.o
[ 17%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/energy_dispersal_impl.cc.o
/Users/marcoschwan/gr-dvbt/lib/energy_dispersal_impl.cc:130:26: warning: unsequenced modification and access to 'count' [-Wunsequenced]
                out[count++] = in[index + count] ^ clock_prbs(d_npacks);
                         ^                ~~~~~
1 warning generated.
[ 19%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/convolutional_interleaver_impl.cc.o
[ 21%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/test2_impl.cc.o
[ 23%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/demod_reference_signals_impl.cc.o
[ 25%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/dvbt_demap_impl.cc.o
[ 26%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/bit_inner_deinterleaver_impl.cc.o
[ 28%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/convolutional_deinterleaver_impl.cc.o
[ 30%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/energy_descramble_impl.cc.o
/Users/marcoschwan/gr-dvbt/lib/energy_descramble_impl.cc:165:24: warning: unsequenced modification and access to 'count' [-Wunsequenced]
              out[count++] = in[d_index + count] ^ clock_prbs(d_nblocks);
                       ^                  ~~~~~
1 warning generated.
[ 32%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/reed_solomon.cc.o
[ 33%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/reed_solomon_dec_impl.cc.o
[ 35%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/ofdm_sym_acquisition_impl.cc.o
/Users/marcoschwan/gr-dvbt/lib/ofdm_sym_acquisition_impl.cc:267:23: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
      if (peak_length = peak_detect_process(&d_lambda[0], (lookup_start - lookup_stop), &peak_pos[0], &peak_max))
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/marcoschwan/gr-dvbt/lib/ofdm_sym_acquisition_impl.cc:267:23: note: place parentheses around the assignment to silence this warning
      if (peak_length = peak_detect_process(&d_lambda[0], (lookup_start - lookup_stop), &peak_pos[0], &peak_max))
                      ^
          (                                                                                                     )
/Users/marcoschwan/gr-dvbt/lib/ofdm_sym_acquisition_impl.cc:267:23: note: use '==' to turn this assignment into an equality comparison
      if (peak_length = peak_detect_process(&d_lambda[0], (lookup_start - lookup_stop), &peak_pos[0], &peak_max))
                      ^
                      ==
/Users/marcoschwan/gr-dvbt/lib/ofdm_sym_acquisition_impl.cc:356:5: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
2 warnings generated.
[ 37%] Building CXX object lib/CMakeFiles/gnuradio-dvbt.dir/viterbi_decoder_impl.cc.o
[ 39%] Building C object lib/CMakeFiles/gnuradio-dvbt.dir/d_viterbi.c.o
[ 41%] Building C object lib/CMakeFiles/gnuradio-dvbt.dir/d_metrics.c.o
[ 42%] Building C object lib/CMakeFiles/gnuradio-dvbt.dir/d_tab.c.o
Linking CXX shared library libgnuradio-dvbt.dylib
Undefined symbols for architecture x86_64:
  "_volk_32f_s32f_multiply_32f_u", referenced from:
      gr::dvbt::ofdm_sym_acquisition_impl::ml_sync(std::__1::complex const*, int, int, int*, std::__1::complex*, int*, int*) in ofdm_sym_acquisition_impl.cc.o
  "_volk_32f_x2_subtract_32f_u", referenced from:
      gr::dvbt::ofdm_sym_acquisition_impl::ml_sync(std::__1::complex const*, int, int, int*, std::__1::complex*, int*, int*) in ofdm_sym_acquisition_impl.cc.o
  "_volk_32fc_magnitude_32f_u", referenced from:
      gr::dvbt::ofdm_sym_acquisition_impl::ml_sync(std::__1::complex const*, int, int, int*, std::__1::complex*, int*, int*) in ofdm_sym_acquisition_impl.cc.o
  "_volk_32fc_magnitude_squared_32f_u", referenced from:
      gr::dvbt::ofdm_sym_acquisition_impl::ml_sync(std::__1::complex const*, int, int, int*, std::__1::complex*, int*, int*) in ofdm_sym_acquisition_impl.cc.o
  "_volk_32fc_x2_multiply_32fc_u", referenced from:
      gr::dvbt::ofdm_sym_acquisition_impl::general_work(int, std::__1::vector >&, std::__1::vector >&, std::__1::vector >&) in ofdm_sym_acquisition_impl.cc.o
  "_volk_32fc_x2_multiply_conjugate_32fc_u", referenced from:
      gr::dvbt::ofdm_sym_acquisition_impl::ml_sync(std::__1::complex const*, int, int, int*, std::__1::complex*, int*, int*) in ofdm_sym_acquisition_impl.cc.o
  "_volk_32fc_x2_square_dist_32f_a", referenced from:
      gr::dvbt::dvbt_demap_impl::find_constellation_value(std::__1::complex) in dvbt_demap_impl.cc.o
  "_volk_32fc_x2_square_dist_32f_u", referenced from:
      gr::dvbt::dvbt_demap_impl::find_constellation_value(std::__1::complex) in dvbt_demap_impl.cc.o
  "_volk_get_alignment", referenced from:
      gr::dvbt::dvbt_demap_impl::dvbt_demap_impl(int, gr::dvbt::dvbt_constellation_t, gr::dvbt::dvbt_hierarchy_t, gr::dvbt::dvbt_transmission_mode_t, float) in dvbt_demap_impl.cc.o
      gr::dvbt::dvbt_demap_impl::dvbt_demap_impl(int, gr::dvbt::dvbt_constellation_t, gr::dvbt::dvbt_hierarchy_t, gr::dvbt::dvbt_transmission_mode_t, float) in dvbt_demap_impl.cc.o
      gr::dvbt::ofdm_sym_acquisition_impl::ofdm_sym_acquisition_impl(int, int, int, int, float) in ofdm_sym_acquisition_impl.cc.o
      gr::dvbt::ofdm_sym_acquisition_impl::ofdm_sym_acquisition_impl(int, int, int, int, float) in ofdm_sym_acquisition_impl.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libgnuradio-dvbt.dylib] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-dvbt.dir/all] Error 2
make: *** [all] Error 2

I compiled this project at a Mac OS X 10.9.0 and xcode 5.0.2.
The gnuradio is the version 3.7.2.1_1 and installed with macport.

Can you help me or do you have a idea for a solution to this problem.

greetings
Marco

Thanks for testing the tool.

I'll integrate the fix for the warnings in the next commit chunk.
Regarding the missing symbols, I assume it is because of a missing or wrong build VOLK module. Did you check that?

Thanks B

Hi,

The gnuradio-companion use VOLK an run without errors and created follow message "Using Volk machine: sse4_2_64_orc" and for me is this the indicator VOLK is running on my Mac with 64-Bit.

greetings
Marco

Could you try the following command:
volk_profile
It is located usually in /usr/local/bin. It should create a volk_config in your home directory volk/.volk_config

Then run again the compilation. It is hard for me to test this as long as I do not have access to a Mac.

Hi,
I encountered same issue on OSX and fixed CMakeList.txt to link library volk explicitly.
sent a Pull Request #6, try it.

Wishes,
Tomohiro

Hi Marko, could you please try with the latest code from github?

Thanks,
Bogdan

Yes, the Commit 8c4b479 is building without errors. Thanks.

I need run cmake ../ with with this extra parameter -DCMAKE_INSTALL_PREFIX=/opt/local. If not use this exrta parameter. the gnuradio compaion not found the blocks.

greetings Marco