bastibl / gr-foo

Some GNU Radio blocks that I use.
GNU General Public License v3.0
106 stars 55 forks source link

OS X build error #3

Closed JayKickliter closed 9 years ago

JayKickliter commented 9 years ago

I'm having the same error trying to build the 802.15.4 block, but since that depends on this, figured I'd file here first. GNURadio installed with macports:

gnuradio @3.7.6.1_2+docs+grc+jack+orc+portaudio+python27+qtgui+sdl+swig+uhd+wavelet+wxgui

Please let me what other information you need. I'm a complete novice when it comes to cmake and c++, but I'd really like to get this to work.

jkmp:build jay$ cmake ..; make
-- Build type not specified: defaulting to release.
-- Boost version: 1.57.0
-- Found the following Boost libraries:
--   filesystem
--   system
--   thread
Checking for GNU Radio Module: RUNTIME
 * INCLUDES=/opt/local/include
 * LIBS=/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib
GNURADIO_RUNTIME_FOUND = TRUE
Checking for GNU Radio Module: PMT
 * INCLUDES=/opt/local/include
 * LIBS=/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib
GNURADIO_PMT_FOUND = TRUE
CMake Warning (dev) at /opt/local/share/cmake/gnuradio/GrTest.cmake:45 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "test-foo".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  lib/CMakeLists.txt:80 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jay/repos/gr-foo/build
[  5%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/burst_tagger_impl.cc.o
[ 11%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/packet_dropper_impl.cc.o
[ 17%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/packet_pad_impl.cc.o
[ 23%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/packet_pad2.cc.o
[ 29%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/periodic_msg_source_impl.cc.o
[ 35%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/wireshark_connector_impl.cc.o
[ 41%] Building CXX object lib/CMakeFiles/gnuradio-foo.dir/rtt_measure_impl.cc.o
Linking CXX shared library libgnuradio-foo.dylib
Undefined symbols for architecture x86_64:
  "gr::sync_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&)", referenced from:
      vtable for gr::foo::burst_tagger in burst_tagger_impl.cc.o
      construction vtable for gr::foo::burst_tagger-in-gr::foo::burst_tagger_impl in burst_tagger_impl.cc.o
      vtable for gr::foo::burst_tagger_impl in burst_tagger_impl.cc.o
  "gr::sync_block::forecast(int, std::vector<int, std::allocator<int> >&)", referenced from:
      vtable for gr::foo::burst_tagger in burst_tagger_impl.cc.o
      construction vtable for gr::foo::burst_tagger-in-gr::foo::burst_tagger_impl in burst_tagger_impl.cc.o
      vtable for gr::foo::burst_tagger_impl in burst_tagger_impl.cc.o
  "gr::sync_block::sync_block(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<gr::io_signature>, boost::shared_ptr<gr::io_signature>)", referenced from:
      gr::foo::burst_tagger_impl::burst_tagger_impl(boost::intrusive_ptr<pmt::pmt_base>, unsigned int) in burst_tagger_impl.cc.o
      gr::foo::burst_tagger::make(boost::intrusive_ptr<pmt::pmt_base>, unsigned int) in burst_tagger_impl.cc.o
  "gr::tagged_stream_block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&)", referenced from:
      construction vtable for gr::foo::packet_pad2-in-packet_pad2_impl in packet_pad2.cc.o
      vtable for packet_pad2_impl in packet_pad2.cc.o
      vtable for gr::foo::packet_pad2 in packet_pad2.cc.o
  "gr::tagged_stream_block::parse_length_tags(std::vector<std::vector<gr::tag_t, std::allocator<gr::tag_t> >, std::allocator<std::vector<gr::tag_t, std::allocator<gr::tag_t> > > > const&, std::vector<int, std::allocator<int> >&)", referenced from:
      construction vtable for gr::foo::packet_pad2-in-packet_pad2_impl in packet_pad2.cc.o
      vtable for packet_pad2_impl in packet_pad2.cc.o
      vtable for gr::foo::packet_pad2 in packet_pad2.cc.o
  "gr::tagged_stream_block::calculate_output_stream_length(std::vector<int, std::allocator<int> > const&)", referenced from:
      construction vtable for gr::foo::packet_pad2-in-packet_pad2_impl in packet_pad2.cc.o
      vtable for gr::foo::packet_pad2 in packet_pad2.cc.o
  "gr::tagged_stream_block::forecast(int, std::vector<int, std::allocator<int> >&)", referenced from:
      construction vtable for gr::foo::packet_pad2-in-packet_pad2_impl in packet_pad2.cc.o
      vtable for packet_pad2_impl in packet_pad2.cc.o
      vtable for gr::foo::packet_pad2 in packet_pad2.cc.o
  "gr::tagged_stream_block::tagged_stream_block(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<gr::io_signature>, boost::shared_ptr<gr::io_signature>, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      gr::foo::packet_pad2::make(bool, bool, double, unsigned int, unsigned int) in packet_pad2.cc.o
  "gr::block::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&)", referenced from:
      construction vtable for gr::foo::packet_dropper-in-gr::foo::packet_dropper_impl in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_dropper_impl in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_dropper in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_pad in packet_pad_impl.cc.o
      construction vtable for gr::foo::packet_pad-in-gr::foo::packet_pad_impl in packet_pad_impl.cc.o
      vtable for gr::foo::periodic_msg_source in periodic_msg_source_impl.cc.o
      construction vtable for gr::foo::periodic_msg_source-in-gr::foo::periodic_msg_source_impl in periodic_msg_source_impl.cc.o
      ...
  "gr::block::get_tags_in_range(std::vector<gr::tag_t, std::allocator<gr::tag_t> >&, unsigned int, unsigned long long, unsigned long long)", referenced from:
      gr::foo::packet_pad_impl::general_work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) in packet_pad_impl.cc.o
      packet_pad2_impl::work(int, std::vector<int, std::allocator<int> >&, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) in packet_pad2.cc.o
  "gr::block::get_tags_in_range(std::vector<gr::tag_t, std::allocator<gr::tag_t> >&, unsigned int, unsigned long long, unsigned long long, boost::intrusive_ptr<pmt::pmt_base> const&)", referenced from:
      gr::foo::burst_tagger_impl::work(int, std::vector<void const*, std::allocator<void const*> >&, std::vector<void*, std::allocator<void*> >&) in burst_tagger_impl.cc.o
  "gr::block::set_processor_affinity(std::vector<int, std::allocator<int> > const&)", referenced from:
      vtable for gr::foo::burst_tagger in burst_tagger_impl.cc.o
      construction vtable for gr::foo::burst_tagger-in-gr::foo::burst_tagger_impl in burst_tagger_impl.cc.o
      vtable for gr::foo::burst_tagger_impl in burst_tagger_impl.cc.o
      construction vtable for gr::foo::packet_dropper-in-gr::foo::packet_dropper_impl in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_dropper_impl in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_dropper in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_pad in packet_pad_impl.cc.o
      ...
  "gr::block::forecast(int, std::vector<int, std::allocator<int> >&)", referenced from:
      construction vtable for gr::foo::packet_dropper-in-gr::foo::packet_dropper_impl in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_dropper_impl in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_dropper in packet_dropper_impl.cc.o
      vtable for gr::foo::packet_pad in packet_pad_impl.cc.o
      construction vtable for gr::foo::packet_pad-in-gr::foo::packet_pad_impl in packet_pad_impl.cc.o
      vtable for gr::foo::periodic_msg_source in periodic_msg_source_impl.cc.o
      construction vtable for gr::foo::periodic_msg_source-in-gr::foo::periodic_msg_source_impl in periodic_msg_source_impl.cc.o
      ...
  "gr::block::block(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<gr::io_signature>, boost::shared_ptr<gr::io_signature>)", referenced from:
      gr::foo::packet_dropper_impl::packet_dropper_impl(double, unsigned long) in packet_dropper_impl.cc.o
      gr::foo::packet_pad_impl::packet_pad_impl(bool, bool, double, unsigned int, unsigned int) in packet_pad_impl.cc.o
      gr::foo::periodic_msg_source_impl::periodic_msg_source_impl(boost::intrusive_ptr<pmt::pmt_base>, float, int, bool, bool) in periodic_msg_source_impl.cc.o
      gr::foo::periodic_msg_source::make(boost::intrusive_ptr<pmt::pmt_base>, float, int, bool, bool) in periodic_msg_source_impl.cc.o
      gr::foo::wireshark_connector_impl::wireshark_connector_impl(gr::foo::LinkType, bool) in wireshark_connector_impl.cc.o
      gr::foo::rtt_measure_impl::rtt_measure_impl(unsigned long) in rtt_measure_impl.cc.o
  "pmt::string_to_symbol(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      gr::foo::burst_tagger_impl::add_sob(unsigned long long) in burst_tagger_impl.cc.o
      gr::foo::burst_tagger_impl::add_eob(unsigned long long) in burst_tagger_impl.cc.o
      gr::foo::packet_dropper_impl::packet_dropper_impl(double, unsigned long) in packet_dropper_impl.cc.o
      gr::foo::packet_dropper_impl::packet_dropper_impl(double, unsigned long) in packet_dropper_impl.cc.o
      gr::foo::packet_dropper_impl::msg_handler(boost::intrusive_ptr<pmt::pmt_base>)         in packet_dropper_impl.cc.o
      pmt::mp(char const*) in packet_pad_impl.cc.o
      gr::foo::packet_pad_impl::add_sob(unsigned long long) in packet_pad_impl.cc.o
      ...
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [lib/libgnuradio-foo.dylib] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-foo.dir/all] Error 2
make: *** [all] Error 2
jkmp:build jay$ 
michaelld commented 9 years ago

@JayKickliter: gr-foo, gr-ieee802-11, and gr-ieee802-15-4 are in MacPorts, as of yesterday. Please do: {{{ sudo port selfupdate sudo port install gr-foo }}} and hopefully that will work for you. If not, contact me off-ticket & I'll help you out (michael.dickens@ettus.com).

I believe that your issue is mixing C++ runtime libraries (libstdc++ and libc++). But, I can't say for sure without more info. Hope this helps!

JayKickliter commented 9 years ago

Thanks so much. They installed fine using MacPorts.

bastibl commented 9 years ago

great, thank you Michael!

michaelld commented 9 years ago

You're welcome!