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

log4cpp-related linking error with OOT-packages when GNURadio was built with log4cpp #1045

Closed
mnhauke opened this issue Oct 2, 2016 · 43 comments
Assignees
Labels

Comments

@mnhauke
Copy link

mnhauke commented Oct 2, 2016

I've just built GNURadio 3.7.10.1 with log4cpp support but now gr-osmosdr fails to compile because of "undefined reference to log4cpp:Appender..." errors since it does not have the information to also link against log4cpp.

Here's the full buildlog from gr-osmosdr:
https://blackhole.pmtu.de/.dump/gr-osmosdr-buildlog-fail.txt

I actually worked around by adding log4cpp to the linker flags manually but it still does not feel like the proper way to address this problem...
https://blackhole.pmtu.de/.dump/gr-osmosdr-fix-log4cpp-linking-error.diff

Conditionally adding the lib4cpp linking flags to gnuradio-runtime.pc could be a solution.

GNUradio was build in a clean chroot-environment.
CMake automatically detected log4cpp and set ENABLE_GR_LOG to ON.

Here's a the GNURadio buildlog:
https://blackhole.pmtu.de/.dump/gnuradio-buildlog-log4cpp.txt

libgnuradio-runtime.so is linked to liblog4cpp.so and so should all programs that make use of this library ...
https://blackhole.pmtu.de/.dump/ldd_libgnuradio-runtime_so.txt

@jmcorgan jmcorgan self-assigned this Oct 2, 2016
@jmcorgan jmcorgan added this to the Release 3.7.10.2 milestone Nov 4, 2016
@bastibl
Copy link
Member

bastibl commented Jan 6, 2017

I think this is just one of many symptoms of GNU Radio's lack of dependency tracking in cmake.

On my mac, the problem already starts with the includes. Since ${GNURADIO_RUNTIME_INCLUDE_DIRS} is just another name for <install_prefix>/include, it already fails when looking for log4cpp headers. (On Linux that's often not an issue since the headers are in a standard directory that's likely pulled in by another library. Every module uses boost; so if the headers of boost and log4cpp are in the same directory, it works by chance.)
The problem is that every block includes block.h, which includes logger.h, which includes log4cpp. So every module that uses gnuradio-runtime has to know about its dependency on log4cpp and manually add the includes.

Sticking to the current definition of ${GNURADIO_RUNTIME_INCLUDE_DIRS}, the problem already starts in-tree. To compile GNU Radio on my mac, I had to add log4cpp in every module.
That's clearly not so nice. I think that, ${GNURADIO_RUNTIME_INCLUDE_DIRS} should include everything that is needed when using gnuradio-runtime, i.e., all headers that are referenced by its public headers.

The same problem is also apparent for the libraries. I think, ${GNURADIO_ALL_LIBRARY_DIRS} should include the directories of the shared libraries that it uses. Currently, it only includes the directories of libgnuradio-xxx, which leads to the above mentioned problem.

Even in-tree, there seems to be lots of confusion on how to deal with shared libraries that are indirectly referenced through other modules. Looking again at log4cpp:

  • Some modules just link against runtime and that’s it (see gr-analog).
  • Some modules put ${LOG4CPP_LIBRARY_DIRS} in the search path and link against runtime (see gr-trellis).
  • Some modules put ${LOG4CPP_LIBRARY_DIRS} in the search path and link against runtime and log4cpp even though they don’t use it directly (see gr-audio).
  • Some modules link against runtime and log4cpp even though they don’t use it directly (see gr-blocks).

Note for in-tree modules the easiest solution, i.e. to just link against runtime, as gr-analog does, is OK. During compilation cmake sets the rpath (or uses the install name on macOS) and, therefore, finds libraries during compilation. The rpath is, however, stripped during installation, which is why OOT modules might not be able to find the libraries (as shown by the above build logs).

To deal with this, we could consider to:

  • redefine ${GR_XXX_INCLUDE_DIRS} to include all directories referenced by its public headers
  • introduce ${GR_XXX_LIBRARY_DIRS} to include the directories of all referenced shared libraries.
  • store these values in GnuradioConfig.cmake to provide them to OOT modules

It would be interesting to hear your thoughts on that.

@jmcorgan
Copy link
Contributor

@bastibl I had missed this when you added your thoughtful comments above. I think you're on the right track, but we'd need to figure out how to actually automate generating the above CMake variables.

@jmcorgan jmcorgan removed this from the Release 3.7.10.2 milestone Jan 26, 2017
@bastibl bastibl mentioned this issue Jan 29, 2017
@vamsi765
Copy link

Hi,

Is this resolved? I still face the issue with log4cpp on Mac, where I installed gnuradio using Macport developer version.

gnuradio-config-info -v
v3.7-MacPorts-devel-git-3a2c67c6(20170413)

3a2c67c

Issue:
[ 17%] Linking CXX shared library libgnuradio-fsk_mod.dylib
Undefined symbols for architecture x86_64:
"log4cpp::Appender::AppenderMapStorageInitializer::AppenderMapStorageInitializer()", referenced from:
__GLOBAL__sub_I_fsk_mod_impl.cc in fsk_mod_impl.cc.o
__GLOBAL__sub_I_stream_gatepass_impl.cc in stream_gatepass_impl.cc.o
__GLOBAL__sub_I_threshold_detect_impl.cc in threshold_detect_impl.cc.o
"log4cpp::Appender::AppenderMapStorageInitializer::~AppenderMapStorageInitializer()", referenced from:
__GLOBAL__sub_I_fsk_mod_impl.cc in fsk_mod_impl.cc.o
__GLOBAL__sub_I_stream_gatepass_impl.cc in stream_gatepass_impl.cc.o
__GLOBAL__sub_I_threshold_detect_impl.cc in threshold_detect_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-fsk_mod.dylib] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-fsk_mod.dir/all] Error 2
make: *** [all] Error 2

Note: I have this code which worked two years ago[version 3.7 I think].

Is there a temporary workaround for this for immediate use? I have tried the fix in below issue with no success:
gnuradio/gr-tutorial#10

Thanks
Vamsi

@bastibl
Copy link
Member

bastibl commented Apr 24, 2017

So you are trying to build an OOT module against GNU Radio master? Is the code somewhere online?

I don't use MacPorts. Does it compile GNU Radio with log4cpp support?
Do you still have log4cpp installed?

Can you run otool -L libgnuradio-runtime.dylib (might be somewhere under /opt/)

What libraries do you link your module against? Did you try the fix suggested in this thread?

Can you post the linker error after VERBOSE=1 make?

@vamsi765
Copy link

So you are trying to build an OOT module against GNU Radio master?

Almost, As I understand Macport gnuradio devel version updates every week or so.

Is the code somewhere online?

Any code works the same, simple module with a block, I have put a simple code on GitHub
https://github.com/vamsi765/gr-testinggnuradio

There is another uploaded tutorial facing the same issue.
gnuradio/gr-tutorial#10 (comment)

I don't use MacPorts. Does it compile GNU Radio with log4cpp support?
Do you still have log4cpp installed?

Yes Macport has the dependency: Log4cpp is available [There is no compile time issue, just during linking]

Can you run otool -L libgnuradio-runtime.dylib (might be somewhere under /opt/)

otool -L /opt/local/lib/libgnuradio-runtime.dylib
/opt/local/lib/libgnuradio-runtime.dylib:
/opt/local/lib/libgnuradio-runtime.3.7.12git.dylib (compatibility version 3.7.12, current version 0.0.0)
/opt/local/lib/libgnuradio-pmt.3.7.12git.dylib (compatibility version 3.7.12, current version 0.0.0)
/opt/local/lib/libvolk.1.3.dylib (compatibility version 1.3.0, current version 0.0.0)
/opt/local/lib/libboost_date_time-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_program_options-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_chrono-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_atomic-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/liblog4cpp.5.dylib (compatibility version 6.0.0, current version 6.6.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.51.1)

What libraries do you link your module against? Did you try the fix suggested in this thread?

I'm not sure what the fix is? Adding log4cpp dependency? if so, I'm not sure how to do that.

Can you post the linker error after VERBOSE=1 make?

[ 4%] Linking CXX shared library libgnuradio-testinggnuradio.dylib
cd /Users/vamsi/Documents/workspace/gr-testinggnuradio/build/lib && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/gnuradio-testinggnuradio.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 1.0.0 -o libgnuradio-testinggnuradio.1.0.0git.dylib -install_name /opt/local/lib/libgnuradio-testinggnuradio.1.0.0git.dylib CMakeFiles/gnuradio-testinggnuradio.dir/block1_impl.cc.o -L/opt/local/lib -Wl,-rpath,/opt/local/lib /opt/local/lib/libboost_filesystem-mt.dylib /opt/local/lib/libboost_system-mt.dylib /opt/local/lib/libgnuradio-runtime.dylib /opt/local/lib/libgnuradio-pmt.dylib
Undefined symbols for architecture x86_64:
"log4cpp::Appender::AppenderMapStorageInitializer::AppenderMapStorageInitializer()", referenced from:
GLOBAL__sub_I_block1_impl.cc in block1_impl.cc.o
"log4cpp::Appender::AppenderMapStorageInitializer::~AppenderMapStorageInitializer()", referenced from:
GLOBAL__sub_I_block1_impl.cc in block1_impl.cc.o
"std::bad_exception::what() const", referenced from:
vtable for boost::exception_detail::bad_exception
in block1_impl.cc.o
vtable for boost::exception_detail::clone_implboost::exception_detail::bad_exception_ in block1_impl.cc.o
"std::runtime_error::what() const", referenced from:
vtable for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call > in block1_impl.cc.o
vtable for boost::exception_detail::error_info_injectorboost::bad_function_call in block1_impl.cc.o
vtable for boost::bad_function_call in block1_impl.cc.o
"std::1::vector_base_common::throw_length_error() const", referenced from:
gr::block::processor_affinity() in block1_impl.cc.o
"std::bad_alloc::what() const", referenced from:
vtable for boost::exception_detail::bad_alloc
in block1_impl.cc.o
vtable for boost::exception_detail::clone_implboost::exception_detail::bad_alloc_ in block1_impl.cc.o
"std::bad_exception::~bad_exception()", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_exception_() in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_exception_::clone_impl(boost::exception_detail::bad_exception
const&) in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_exception_::~clone_impl() in block1_impl.cc.o
boost::exception_detail::bad_exception
::~bad_exception
() in block1_impl.cc.o
boost::exception_detail::bad_exception
::~bad_exception
() in block1_impl.cc.o
non-virtual thunk to boost::exception_detail::bad_exception
::~bad_exception
() in block1_impl.cc.o
non-virtual thunk to boost::exception_detail::bad_exception
::~bad_exception_() in block1_impl.cc.o
...
"std::runtime_error::runtime_error(char const*)", referenced from:
boost::function1<void, boost::intrusive_ptrpmt::pmt_base >::operator()(boost::intrusive_ptrpmt::pmt_base) const in block1_impl.cc.o
"std::runtime_error::runtime_error(std::runtime_error const&)", referenced from:
void boost::throw_exceptionboost::bad_function_call(boost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone_impl(boost::exception_detail::error_info_injectorboost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone_impl(boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call > const&, boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone_tag) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone_impl(boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call > const&) in block1_impl.cc.o
"std::runtime_error::~runtime_error()", referenced from:
boost::function1<void, boost::intrusive_ptrpmt::pmt_base >::operator()(boost::intrusive_ptrpmt::pmt_base) const in block1_impl.cc.o
void boost::throw_exceptionboost::bad_function_call(boost::bad_function_call const&) in block1_impl.cc.o
boost::bad_function_call::~bad_function_call() in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::~clone_impl() in block1_impl.cc.o
boost::exception_detail::error_info_injectorboost::bad_function_call::~error_info_injector() in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone_impl(boost::exception_detail::error_info_injectorboost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::~clone_impl() in block1_impl.cc.o
...
"std::__1::basic_string<char, std::__1::char_traits, std::_1::allocator >::init(char const*, unsigned long)", referenced from:
gr::testinggnuradio::block1_impl::block1_impl() in block1_impl.cc.o
"std::1::basic_string<char, std::1::char_traits, std::1::allocator >::~basic_string()", referenced from:
gr::testinggnuradio::block1_impl::block1_impl() in block1_impl.cc.o
"std::bad_alloc::bad_alloc()", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
"std::bad_alloc::~bad_alloc()", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_alloc_::clone_impl(boost::exception_detail::bad_alloc
const&) in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_alloc_::~clone_impl() in block1_impl.cc.o
boost::exception_detail::bad_alloc
::~bad_alloc
() in block1_impl.cc.o
boost::exception_detail::bad_alloc
::~bad_alloc
() in block1_impl.cc.o
non-virtual thunk to boost::exception_detail::bad_alloc
::~bad_alloc
() in block1_impl.cc.o
non-virtual thunk to boost::exception_detail::bad_alloc
::~bad_alloc() in block1_impl.cc.o
...
"std::terminate()", referenced from:
_clang_call_terminate in block1_impl.cc.o
"typeinfo for std::bad_exception", referenced from:
typeinfo for boost::exception_detail::bad_exception
in block1_impl.cc.o
"typeinfo for std::runtime_error", referenced from:
typeinfo for boost::bad_function_call in block1_impl.cc.o
"typeinfo for std::bad_alloc", referenced from:
typeinfo for boost::exception_detail::bad_alloc
in block1_impl.cc.o
"vtable for __cxxabiv1::__class_type_info", referenced from:
typeinfo for boost::exception in block1_impl.cc.o
typeinfo for boost::exception_detail::clone_base in block1_impl.cc.o
typeinfo for boost::detail::sp_counted_base in block1_impl.cc.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for __cxxabiv1::__si_class_type_info", referenced from:
typeinfo for gr::testinggnuradio::block1_impl in block1_impl.cc.o
typeinfo for boost::bad_function_call in block1_impl.cc.o
typeinfo for boost::detail::sp_counted_impl_p<boost::exception_detail::clone_implboost::exception_detail::bad_alloc_ > in block1_impl.cc.o
typeinfo for boost::detail::sp_counted_impl_p<boost::exception_detail::clone_implboost::exception_detail::bad_exception_ > in block1_impl.cc.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for __cxxabiv1::vmi_class_type_info", referenced from:
typeinfo for gr::testinggnuradio::block1 in block1_impl.cc.o
typeinfo for boost::exception_detail::error_info_injectorboost::bad_function_call in block1_impl.cc.o
typeinfo for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call > in block1_impl.cc.o
typeinfo for boost::exception_detail::bad_alloc
in block1_impl.cc.o
typeinfo for boost::exception_detail::clone_implboost::exception_detail::bad_alloc_ in block1_impl.cc.o
typeinfo for boost::exception_detail::bad_exception
in block1_impl.cc.o
typeinfo for boost::exception_detail::clone_implboost::exception_detail::bad_exception_ in block1_impl.cc.o
...
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"operator delete(void*)", referenced from:
gr::testinggnuradio::block1::make() in block1_impl.cc.o
gr::testinggnuradio::block1_impl::~block1_impl() in block1_impl.cc.o
virtual thunk to gr::testinggnuradio::block1_impl::~block1_impl() in block1_impl.cc.o
gr::testinggnuradio::block1::~block1() in block1_impl.cc.o
virtual thunk to gr::testinggnuradio::block1::~block1() in block1_impl.cc.o
gr::block::processor_affinity() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
...
"operator new(unsigned long)", referenced from:
gr::testinggnuradio::block1::make() in block1_impl.cc.o
gr::block::processor_affinity() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_exception_() in block1_impl.cc.o
std::__1::map<boost::intrusive_ptrpmt::pmt_base, boost::function<void (boost::intrusive_ptrpmt::pmt_base)>, pmt::comparator, std::__1::allocator<std::__1::pair<boost::intrusive_ptrpmt::pmt_base const, boost::function<void (boost::intrusive_ptrpmt::pmt_base)> > > >::operator[](boost::intrusive_ptrpmt::pmt_base const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone() const in block1_impl.cc.o
virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone() const in block1_impl.cc.o
...
"___cxa_allocate_exception", referenced from:
void boost::throw_exceptionboost::bad_function_call(boost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::rethrow() const in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_alloc_::rethrow() const in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_exception_::rethrow() const in block1_impl.cc.o
"___cxa_begin_catch", referenced from:
___clang_call_terminate in block1_impl.cc.o
void boost::detail::sp_pointer_construct<boost::exception_detail::clone_base const, boost::exception_detail::clone_implboost::exception_detail::bad_alloc_ >(boost::shared_ptr<boost::exception_detail::clone_base const>, boost::exception_detail::clone_implboost::exception_detail::bad_alloc_, boost::detail::shared_count&) in block1_impl.cc.o
void boost::detail::sp_pointer_construct<boost::exception_detail::clone_base const, boost::exception_detail::clone_implboost::exception_detail::bad_exception_ >(boost::shared_ptr<boost::exception_detail::clone_base const>, boost::exception_detail::clone_implboost::exception_detail::bad_exception_, boost::detail::shared_count&) in block1_impl.cc.o
"___cxa_call_unexpected", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_exception_() in block1_impl.cc.o
void boost::throw_exceptionboost::bad_function_call(boost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::~clone_impl() in block1_impl.cc.o
boost::exception_detail::error_info_injectorboost::bad_function_call::~error_info_injector() in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::clone_impl(boost::exception_detail::error_info_injectorboost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::~clone_impl() in block1_impl.cc.o
...
"___cxa_end_catch", referenced from:
void boost::detail::sp_pointer_construct<boost::exception_detail::clone_base const, boost::exception_detail::clone_implboost::exception_detail::bad_alloc_ >(boost::shared_ptr<boost::exception_detail::clone_base const>, boost::exception_detail::clone_implboost::exception_detail::bad_alloc_, boost::detail::shared_count&) in block1_impl.cc.o
void boost::detail::sp_pointer_construct<boost::exception_detail::clone_base const, boost::exception_detail::clone_implboost::exception_detail::bad_exception_ >(boost::shared_ptr<boost::exception_detail::clone_base const>, boost::exception_detail::clone_implboost::exception_detail::bad_exception_, boost::detail::shared_count&) in block1_impl.cc.o
"___cxa_free_exception", referenced from:
void boost::throw_exceptionboost::bad_function_call(boost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::rethrow() const in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_alloc_::rethrow() const in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_exception_::rethrow() const in block1_impl.cc.o
"___cxa_guard_abort", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_exception_() in block1_impl.cc.o
"___cxa_guard_acquire", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_exception_() in block1_impl.cc.o
"___cxa_guard_release", referenced from:
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_alloc_() in block1_impl.cc.o
boost::exception_ptr boost::exception_detail::get_static_exception_objectboost::exception_detail::bad_exception_() in block1_impl.cc.o
"___cxa_pure_virtual", referenced from:
construction vtable for gr::testinggnuradio::block1-in-gr::testinggnuradio::block1_impl in block1_impl.cc.o
vtable for boost::exception_detail::clone_base in block1_impl.cc.o
vtable for boost::exception in block1_impl.cc.o
"___cxa_rethrow", referenced from:
void boost::detail::sp_pointer_construct<boost::exception_detail::clone_base const, boost::exception_detail::clone_implboost::exception_detail::bad_alloc_ >(boost::shared_ptr<boost::exception_detail::clone_base const>, boost::exception_detail::clone_implboost::exception_detail::bad_alloc_, boost::detail::shared_count&) in block1_impl.cc.o
void boost::detail::sp_pointer_construct<boost::exception_detail::clone_base const, boost::exception_detail::clone_implboost::exception_detail::bad_exception_ >(boost::shared_ptr<boost::exception_detail::clone_base const>, boost::exception_detail::clone_implboost::exception_detail::bad_exception_, boost::detail::shared_count&) in block1_impl.cc.o
"___cxa_throw", referenced from:
void boost::throw_exceptionboost::bad_function_call(boost::bad_function_call const&) in block1_impl.cc.o
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::bad_function_call >::rethrow() const in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_alloc_::rethrow() const in block1_impl.cc.o
boost::exception_detail::clone_implboost::exception_detail::bad_exception_::rethrow() const in block1_impl.cc.o
"___dynamic_cast", referenced from:
gr::testinggnuradio::block1::make() in block1_impl.cc.o
"___gxx_personality_v0", referenced from:
gr::testinggnuradio::block1::make() in block1_impl.cc.o
gr::testinggnuradio::block1_impl::block1_impl() in block1_impl.cc.o
gr::testinggnuradio::block1_impl::~block1_impl() in block1_impl.cc.o
virtual thunk to gr::testinggnuradio::block1_impl::~block1_impl() in block1_impl.cc.o
gr::testinggnuradio::block1::~block1() in block1_impl.cc.o
virtual thunk to gr::testinggnuradio::block1::~block1() in block1_impl.cc.o
gr::basic_block::dispatch_msg(boost::intrusive_ptrpmt::pmt_base, boost::intrusive_ptrpmt::pmt_base) in block1_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-testinggnuradio.1.0.0git.dylib] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-testinggnuradio.dir/all] Error 2
make: *** [all] Error 2

carlesfernandez added a commit to carlesfernandez/gnss-sdr that referenced this issue Apr 25, 2017
@vamsi765
Copy link

I was able to fix this issue [Carles also has similar changes required]:
This commit shows what the changes to be made for a simple OOT block to work
vamsi765/gr-testinggnuradio@c204fc7

@bastibl
Copy link
Member

bastibl commented Apr 27, 2017

Great that it fixes your problem, but think it's a workaround rather than a real solution. Without further support from GNU Radio, the OOT would have to test if GNU Radio was build with log4cpp and (in case) search for the library, make sure that it's the same version, and link against it.
That's quite some complexity that would have to be added to all OOT modules. Considering, for example, runtime, I think it would be better if GNURADIO_RUNTIME_INCLUDE_DIRS returned all include directories that are needed when using runtime (i.e., all headers that are reachable through the public headers in include).
Similarly, GNURADIO_RUNTIME_LIBRARIES should return all libraries that are required when linking against runtime.
It should be pretty easy to record these variables during build and would simplify OOT modules a lot. In particular,

  • no need for GNU Radio configuration checks (like, is log4cpp used or not)
  • GNU Radio and the OOT would always link to the same version of the library (this was often a problem for me on macOS, where I have often more than one version of a library installed)
  • It doesn't require to update all OOTs when GNU Radio uses a new library.

Would be great to hear some thoughts on that.

(There is one thing I don't understand (and that's why I asked for all the command outputs): Why fail OOT builds with indirect shared library dependencies on mac (in the scenario libgnuradio-tutorial.dylib -> libgnuradio-runtime -> liblog4cpp.dylib, the log4cpp symbols cannot be resolved, which leads to the above error.) But in-tree works (i.e., libgnuradio-blocks.dylib -> libgnuradio-runtime.dylib -> liblog4cpp.dylib) I know that during build shared objects use special settings for the rpath, for example, but I couldn't find something that impacts how symbols are resolved).)

@jmcorgan
Copy link
Contributor

Just as an aside, for GNU Radio 3.8+ and already on the next branch, logging is always turned on and log4cpp is a mandatory requirement, so this seems strictly a 3.7 issue.

@bastibl
Copy link
Member

bastibl commented Apr 27, 2017

I would say log4cpp is just one example where most problems occur. The suggestions were meant in general. On macOS, for example, I have the impression that 90% of the problems are because users link against the wrong version of a library (like system python vs. homebrew/ports python).
If find_package(gnuradio) would also return the proper dependencies that might simplify OOTs a lot.

@jmcorgan
Copy link
Contributor

I agree. I'm not familiar with the Mac side of things--@michaelld looks after this--my comment was only an aside that the log4cpp complexity has been removed in 3.8.

@michaelld
Copy link
Contributor

The issue is with log4cpp 1.1.2. I'm still debugging. Revert to 1.1.1 if you can & it'll work nice & clean.

@michaelld
Copy link
Contributor

Many prior issues on macOS were because of the mixed Python issue as @bastibl points out. We've committed code that addresses that issue. This isn't that issue or even related to it. It's an issue with log4cpp & AppenderMapStorageInitializer. I haven't had time to debug it far enough to have a clue what's going on yet.

@michaelld
Copy link
Contributor

OK so the problem is the "static" declaration in the Appender class. The variable isn't used for anything anyway, and it's easy to get rid of: sed -e "/appenderMapStorageInitializer/d" on the file include/log4cpp/Appender.hh. I'm pushing this into MacPorts shortly.

@michaelld
Copy link
Contributor

@vamsi765
Copy link

@michaelld Thanks for the update! That fixed the issue.

@bastibl
Copy link
Member

bastibl commented Apr 28, 2017

Great that it works, but a bit unfortunate that it works good enough to ignore the general problem with configuring OOTs.

I wanted to try the patch on homebrew and installed a fixed version of log4cpp somewhere in my home. While I can point GR to use this version, I don't see how I can point OOTs to that location (if we don't add find(log4cpp) to all OOT modules). Since runtime references log4cpp in its include files, but doesn't add the log4cpp path to GNURADIO_ALL_INCLUDE_DIRS, I cannot see how an OOT could find the headers.

So, AFAIS, with this slightly unusual installation, I cannot use (most) OOTs.

@jmcorgan jmcorgan removed the Runtime label Apr 28, 2017
@jmcorgan
Copy link
Contributor

@bastibl I agree the more general issue is important to address. Can you open a new issue so we can more properly address it outside this particular one?

@michaelld
Copy link
Contributor

It would be good to add the LOG4CPP_INCLUDE_DIRS as @bastibl did in his commit from his above comment, assuming that LOG4CPP is enabled. Might be enabled by default by now I don't recall.

@michaelld
Copy link
Contributor

After some searching I think the issue is with gnuradio-runtime/include/logger.h.in:38-43
{{{
#ifndef ENABLE_GR_LOG
#cmakedefine ENABLE_GR_LOG
#endif
#ifndef HAVE_LOG4CPP
#cmakedefine HAVE_LOG4CPP
#endif
}}}
where the CMake macro "#cmakedefine" replaces the line with either "#define ..." or "/* #undef ... */".

Let's look at the various possible use cases, for GR and an OOT, assuming that both ENABLE_GR_LOG and HAVE_LOG4CPP are both either enabled or disabled:

GR: True, OOT: True -> works
=> Both GR and OOT define ENABLE_GR_LOG and HAVE_LOG4CPP, so the above #define's aren't used.

GR: False, OOT: False -> works
=> Both GR and OOT do not define ENABLE_GR_LOG and HAVE_LOG4CPP, so the above #define's make no difference.

GR: False, OOT: True -> fails
=> GR is not compiled with support for logging, so OOTs can't use it either, no matter if requested or not.

GR: True, OOT: False -> fails
=> Since logging is either not enabled or explicitly turned off in the OOT, #include'ing logger.h should not force the OOT to link to log4cpp. But, in this case logging is actually enabled by these #define's & thus log4cpp is required.

Result: We need a better way to handle logging in OOTs & checking for when GR provides it & when it's not provided. I'll look into what it'll take to fix this & report back here.

@michaelld
Copy link
Contributor

In initial testing, the following works for me, replacing the above code. It's more complicated, but it handles the cases well. YA question is whether we also need to replace to code in the top-level config.in.h for these same macros ...

{{{
// handle current status of GR_LOG
#ifdef ENABLE_GR_LOG
#define EXT_ENABLE_GR_LOG
#undef ENABLE_GR_LOG
#endif

// did GR enable LOG?
#cmakedefine ENABLE_GR_LOG

// if GR does not provide logging and the current module is requesting
// it, disable it.
#if defined(EXT_ENABLE_GR_LOG) && !defined(ENABLE_GR_LOG)
#warning "Logging was requested but is not enabled in GNU Radio, so disabling."
#undef EXT_ENABLE_GR_LOG
#endif

// if GR provides logging but the current module is not requesting it,
// disable it.
#if !defined(EXT_ENABLE_GR_LOG) && defined(ENABLE_GR_LOG)
#warning "Logging was requested but is not enabled in GNU Radio, so disabling."
#undef ENABLE_GR_LOG
#endif

// the other 2 cases work; no need to check them!

// handle current status of LOG4CPP
#ifdef HAVE_LOG4CPP
#define EXT_HAVE_LOG4CPP
#undef HAVE_LOG4CPP
#endif

// did GR use log4cpp?
#cmakedefine HAVE_LOG4CPP

// if GR does not use log4cpp and the current module is requesting it,
// disable it & print a warning.
#if defined(EXT_HAVE_LOG4CPP) && !defined(HAVE_LOG4CPP)
#warning "Log4Cpp use was requested but was not in GNU Radio, so disabling."
#undef EXT_HAVE_LOG4CPP
#endif

// if GR provides for using log4cpp but the current module is not
// requesting it, disable it quietly.
#if !defined(EXT_HAVE_LOG4CPP) && defined(HAVE_LOG4CPP)
#undef HAVE_LOG4CPP
#endif

// the other 2 cases work; no need to check them!
}}}

@jmcorgan
Copy link
Contributor

jmcorgan commented May 2, 2017

And now you know firsthand why all this was ripped out on next for 3.8, with logging always enabled and log4cpp always required.

@michaelld
Copy link
Contributor

Yup! Is there a specific branch of next with the log4cpp changes, or is it on master?

@jmcorgan
Copy link
Contributor

jmcorgan commented May 2, 2017

It is set that way on the 'next' branch currently.

@michaelld
Copy link
Contributor

Yes of course not on master duh. OK, looking at that branch I see what you mean about making log4cpp required.

So, yes, then if not already done so we need to fix the GR OOT CMake scripts to always require log4cpp and include it for headers and library automagically, now that 1.1.2 is released.

This was not required with log4cpp 1.1.0: the header just declared the API such that an OOT that didn't explicitly use logging didn't require linking to log4cpp.

Version 1.1.2 added in a static variable that's instantiated just by including the header, and thus requires the library for linking even if the OOT does not explicitly use logging.

@jmcorgan
Copy link
Contributor

jmcorgan commented May 2, 2017

Good catch. I don't think the OOT module in gr-utils has been modified.

@michaelld
Copy link
Contributor

My preference would actually be to patch log4cpp to move the static variable to the .cpp file to make it benign again; push the fix upstream. This change would be because it's difficult to know when a header might indirectly include log4cpp.

The fix I mention would work for GR & should be compatible with most GR OOT modules. But it probably won't work with all of them & certainly not with non-GR projects.

My opinion: bad log4cpp for adding in that static variable in the header.

@jmcorgan
Copy link
Contributor

jmcorgan commented May 2, 2017

Of course, it's ideal if upstream will fix things. And yes, a pox on anyone that puts things in header files that either allocates storage or forces linkage.

@michaelld
Copy link
Contributor

I think moving the static variable from the header to the .cpp code will do the trick. It does allow GNU Radio to execute again, which is a plus. I'm really not sure the intent of placing that static variable in the header; seems like there need be just 1 of them for the code to work correctly. Whatever. The commit is here: macports/macports-ports@03e977a . I'll also create a ticket on the log4cpp SF area & link in that commit and this issue. Fun times!

@michaelld
Copy link
Contributor

@JakeHadley
Copy link

JakeHadley commented May 29, 2019

@michaelld Do we know if this issue has been fixed? I just ran into this using log4cpp 1.1.1 and the latest gnuradio on centos 7. Would downgrading gnuradio help me get through this?

This is my cmake command, everything ran ok:
cmake -DENABLE_GRC=ON -DENABLE_GR_QTGUI=ON -DPYTHON_EXECUTABLE=/bin/python3 -DLOG4CPP_INCLUDE_DIR=/usr/include -DLOG4CPP_LIBRARY=/usr/lib64 -DQWT_LIBRARIES=/usr/lib64/libqwt.so -DZEROMQ_LIBRARIES=/usr/lib64/libzmq.so -DZEROMQ_INCLUDE_DIRS=/usr/include ../

The error I ran into while running make is this:

[ 14%] Linking CXX executable pmt_unv
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::Category::exists(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::CategoryStream::operator<<(log4cpp::CategoryStream& (*)(log4cpp::CategoryStream&))'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::CategoryStream::~CategoryStream()'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::FileAppender::FileAppender(std::string const&, std::string const&, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::PropertyConfigurator::configure(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::PatternLayout::PatternLayout()'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::Category::getInstance(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::RollingFileAppender::RollingFileAppender(std::string const&, std::string const&, unsigned long, unsigned int, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::eol(log4cpp::CategoryStream&)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::CategoryStream::operator<<(char const*)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::string const&, std::ostream*)'
libgnuradio-runtime.so.3.8tech-preview-373-g8a7214c7: undefined reference to `log4cpp::Category::getCurrentCategories()'
collect2: error: ld returned 1 exit status
make[2]: *** [gnuradio-runtime/lib/pmt_unv] Error 1
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/all] Error 2
make: *** [all] Error 2

Also, it says I unassigned jmcorgan just now, not sure how that happened, but apologies nonetheless.

@michaelld
Copy link
Contributor

I'm using stock log4cpp version 1.1.3 and can build the current GR GIT master HEAD without issue.

Can you do make VERBOSE=ON to get the actual link command? That might provide useful.

@michaelld michaelld self-assigned this May 29, 2019
@JakeHadley
Copy link

JakeHadley commented May 29, 2019

I am on centos 7 and the latest version offered from the repo is 1.1.1. If it would work to compile from source 1.1.3 I can try that.

Here's the make command on verbose

[ 14%] Linking CXX executable pmt_unv
cd /home/<user>/gnuradio/build/gnuradio-runtime/lib && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/pmt_unv.dir/link.txt --verbose=ON
/bin/c++   -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG   CMakeFiles/pmt_unv.dir/pmt/qa_pmt_unv.cc.o  -o pmt_unv -Wl,-rpath,/home/<user>/gnuradio/build/gnuradio-runtime/lib:/home/<user>/gnuradio/build/gnuradio-runtime/lib/pmt:/home/<user>/gnuradio/build/volk/lib libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4 pmt/libgnuradio-pmt.so.3.8tech-preview-381-g27dd99e4 /usr/lib64/libboost_unit_test_framework-mt.so ../../volk/lib/libvolk.so.1.4.1git -ldl /usr/lib64/liborc-0.4.so -lm /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_filesystem-mt.so /usr/lib64/libboost_regex-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_atomic-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_atomic-mt.so -lpthread /usr/lib64/libboost_chrono-mt.so /usr/lib64/libboost_system-mt.so /usr/lib64/libboost_date_time-mt.so /usr/lib64/libgmpxx.so /usr/lib64/libgmp.so -lrt 
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::exists(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::operator<<(log4cpp::CategoryStream& (*)(log4cpp::CategoryStream&))'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::~CategoryStream()'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::FileAppender::FileAppender(std::string const&, std::string const&, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::PropertyConfigurator::configure(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::PatternLayout::PatternLayout()'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::getInstance(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::RollingFileAppender::RollingFileAppender(std::string const&, std::string const&, unsigned long, unsigned int, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::eol(log4cpp::CategoryStream&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::operator<<(char const*)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::string const&, std::ostream*)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::getCurrentCategories()'
collect2: error: ld returned 1 exit status
make[2]: *** [gnuradio-runtime/lib/pmt_unv] Error 1
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/all] Error 2
make[1]: Leaving directory `/home/<user>/gnuradio/build'
make: *** [all] Error 2

@JakeHadley
Copy link

JakeHadley commented May 29, 2019

If it is helpful, here's the output from Building CXX object gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/pmt/qa_pmt_unv.cc.o:

[ 13%] Building CXX object gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/pmt/qa_pmt_unv.cc.o
cd /home/<user>/gnuradio/build/gnuradio-runtime/lib && /bin/c++  -DALIGNED_MALLOC=0 -DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN -DGR_CTRLPORT -DGR_MPLIB_GMP -DGR_PERFORMANCE_COUNTERS -DHAVE_ARPA_INET_H -DHAVE_COSF -DHAVE_GETPAGESIZE -DHAVE_MALLOC_H -DHAVE_MMAP -DHAVE_NETINET_IN_H -DHAVE_PTHREAD_SETSCHEDPARAM -DHAVE_PTHREAD_SIGMASK -DHAVE_SCHED_SETSCHEDULER -DHAVE_SHM_OPEN -DHAVE_SIGACTION -DHAVE_SIGNAL_H -DHAVE_SINCOS -DHAVE_SINCOSF -DHAVE_SINF -DHAVE_SNPRINTF -DHAVE_SYSCONF -DHAVE_SYS_IPC_H -DHAVE_SYS_MMAN_H -DHAVE_SYS_RESOURCE_H -DHAVE_SYS_SHM_H -DHAVE_SYS_SOCKET_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H -DHAVE_UNISTD_H -DHAVE_VALLOC -I/home/<user>/gnuradio/build/gnuradio-runtime/lib/pmt -I/home/<user>/gnuradio/gnuradio-runtime/lib/../include -I/home/<user>/gnuradio/build/gnuradio-runtime/lib/../include -I/home/<user>/gnuradio/gnuradio-runtime/lib/pmt/../../include -I/home/<user>/gnuradio/build/volk/include -I/home/<user>/gnuradio/volk/include  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG   -std=c++11 -o CMakeFiles/pmt_unv.dir/pmt/qa_pmt_unv.cc.o -c /home/<user>/gnuradio/gnuradio-runtime/lib/pmt/qa_pmt_unv.cc
[ 14%] Linking CXX executable pmt_unv
cd /home/<user>/gnuradio/build/gnuradio-runtime/lib && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/pmt_unv.dir/link.txt --verbose=ON
/bin/c++   -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG   CMakeFiles/pmt_unv.dir/pmt/qa_pmt_unv.cc.o  -o pmt_unv -Wl,-rpath,/home/<user>/gnuradio/build/gnuradio-runtime/lib:/home/<user>/gnuradio/build/gnuradio-runtime/lib/pmt:/home/<user>/gnuradio/build/volk/lib libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4 pmt/libgnuradio-pmt.so.3.8tech-preview-381-g27dd99e4 /usr/lib64/libboost_unit_test_framework-mt.so ../../volk/lib/libvolk.so.1.4.1git -ldl /usr/lib64/liborc-0.4.so -lm /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_filesystem-mt.so /usr/lib64/libboost_regex-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_atomic-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_atomic-mt.so -lpthread /usr/lib64/libboost_chrono-mt.so /usr/lib64/libboost_system-mt.so /usr/lib64/libboost_date_time-mt.so /usr/lib64/libgmpxx.so /usr/lib64/libgmp.so -lrt 
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::exists(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::operator<<(log4cpp::CategoryStream& (*)(log4cpp::CategoryStream&))'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::~CategoryStream()'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::FileAppender::FileAppender(std::string const&, std::string const&, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::PropertyConfigurator::configure(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::PatternLayout::PatternLayout()'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::getInstance(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::RollingFileAppender::RollingFileAppender(std::string const&, std::string const&, unsigned long, unsigned int, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::eol(log4cpp::CategoryStream&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::operator<<(char const*)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::string const&, std::ostream*)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::getCurrentCategories()'
collect2: error: ld returned 1 exit status
make[2]: *** [gnuradio-runtime/lib/pmt_unv] Error 1
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/all] Error 2
make[1]: Leaving directory `/home/<user>/gnuradio/build'
make: *** [all] Error 2
[<user> build]$ sudo ldconfig
[<user> build]$ make VERBOSE=ON
/usr/local/bin/cmake -S/home/<user>/gnuradio -B/home/<user>/gnuradio/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/<user>/gnuradio/build/CMakeFiles /home/<user>/gnuradio/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/<user>/gnuradio/build'
make -f volk/lib/CMakeFiles/volk_obj.dir/build.make volk/lib/CMakeFiles/volk_obj.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/lib /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/lib /home/<user>/gnuradio/build/volk/lib/CMakeFiles/volk_obj.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/lib/CMakeFiles/volk_obj.dir/build.make volk/lib/CMakeFiles/volk_obj.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/lib/CMakeFiles/volk_obj.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  6%] Built target volk_obj
make -f volk/lib/CMakeFiles/volk.dir/build.make volk/lib/CMakeFiles/volk.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/lib /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/lib /home/<user>/gnuradio/build/volk/lib/CMakeFiles/volk.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/lib/CMakeFiles/volk.dir/build.make volk/lib/CMakeFiles/volk.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/lib/CMakeFiles/volk.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  6%] Built target volk
make -f volk/lib/CMakeFiles/volk_test_all.dir/build.make volk/lib/CMakeFiles/volk_test_all.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/lib /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/lib /home/<user>/gnuradio/build/volk/lib/CMakeFiles/volk_test_all.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/lib/CMakeFiles/volk_test_all.dir/build.make volk/lib/CMakeFiles/volk_test_all.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/lib/CMakeFiles/volk_test_all.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  7%] Built target volk_test_all
make -f volk/apps/CMakeFiles/volk-config-info.dir/build.make volk/apps/CMakeFiles/volk-config-info.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/apps /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/apps /home/<user>/gnuradio/build/volk/apps/CMakeFiles/volk-config-info.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/apps/CMakeFiles/volk-config-info.dir/build.make volk/apps/CMakeFiles/volk-config-info.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/apps/CMakeFiles/volk-config-info.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  8%] Built target volk-config-info
make -f volk/apps/CMakeFiles/volk_profile.dir/build.make volk/apps/CMakeFiles/volk_profile.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/apps /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/apps /home/<user>/gnuradio/build/volk/apps/CMakeFiles/volk_profile.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/apps/CMakeFiles/volk_profile.dir/build.make volk/apps/CMakeFiles/volk_profile.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/apps/CMakeFiles/volk_profile.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  8%] Built target volk_profile
make -f volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_ea6d3.dir/build.make volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_ea6d3.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/python/volk_modtool /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/python/volk_modtool /home/<user>/gnuradio/build/volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_ea6d3.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_ea6d3.dir/build.make volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_ea6d3.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_ea6d3.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  8%] Built target pygen_volk_python_volk_modtool_ea6d3
make -f volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_21004.dir/build.make volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_21004.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/volk/python/volk_modtool /home/<user>/gnuradio/build /home/<user>/gnuradio/build/volk/python/volk_modtool /home/<user>/gnuradio/build/volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_21004.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_21004.dir/build.make volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_21004.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `volk/python/volk_modtool/CMakeFiles/pygen_volk_python_volk_modtool_21004.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  8%] Built target pygen_volk_python_volk_modtool_21004
make -f docs/doxygen/CMakeFiles/doxygen_target.dir/build.make docs/doxygen/CMakeFiles/doxygen_target.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/docs/doxygen /home/<user>/gnuradio/build /home/<user>/gnuradio/build/docs/doxygen /home/<user>/gnuradio/build/docs/doxygen/CMakeFiles/doxygen_target.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f docs/doxygen/CMakeFiles/doxygen_target.dir/build.make docs/doxygen/CMakeFiles/doxygen_target.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `docs/doxygen/CMakeFiles/doxygen_target.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  8%] Built target doxygen_target
make -f gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/build.make gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/gnuradio-runtime/lib/pmt /home/<user>/gnuradio/build /home/<user>/gnuradio/build/gnuradio-runtime/lib/pmt /home/<user>/gnuradio/build/gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/build.make gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[  9%] Built target gnuradio-pmt
make -f gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/build.make gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/gnuradio-runtime/lib /home/<user>/gnuradio/build /home/<user>/gnuradio/build/gnuradio-runtime/lib /home/<user>/gnuradio/build/gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/build.make gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
make[2]: Nothing to be done for `gnuradio-runtime/lib/CMakeFiles/gnuradio-runtime.dir/build'.
make[2]: Leaving directory `/home/<user>/gnuradio/build'
[ 13%] Built target gnuradio-runtime
make -f gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/build.make gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/depend
make[2]: Entering directory `/home/<user>/gnuradio/build'
cd /home/<user>/gnuradio/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/<user>/gnuradio /home/<user>/gnuradio/gnuradio-runtime/lib /home/<user>/gnuradio/build /home/<user>/gnuradio/build/gnuradio-runtime/lib /home/<user>/gnuradio/build/gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make -f gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/build.make gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/build
make[2]: Entering directory `/home/<user>/gnuradio/build'
[ 14%] Linking CXX executable pmt_unv
cd /home/<user>/gnuradio/build/gnuradio-runtime/lib && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/pmt_unv.dir/link.txt --verbose=ON
/bin/c++   -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG   CMakeFiles/pmt_unv.dir/pmt/qa_pmt_unv.cc.o  -o pmt_unv -Wl,-rpath,/home/<user>/gnuradio/build/gnuradio-runtime/lib:/home/<user>/gnuradio/build/gnuradio-runtime/lib/pmt:/home/<user>/gnuradio/build/volk/lib libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4 pmt/libgnuradio-pmt.so.3.8tech-preview-381-g27dd99e4 /usr/lib64/libboost_unit_test_framework-mt.so ../../volk/lib/libvolk.so.1.4.1git -ldl /usr/lib64/liborc-0.4.so -lm /usr/lib64/libboost_program_options-mt.so /usr/lib64/libboost_filesystem-mt.so /usr/lib64/libboost_regex-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_atomic-mt.so /usr/lib64/libboost_thread-mt.so /usr/lib64/libboost_atomic-mt.so -lpthread /usr/lib64/libboost_chrono-mt.so /usr/lib64/libboost_system-mt.so /usr/lib64/libboost_date_time-mt.so /usr/lib64/libgmpxx.so /usr/lib64/libgmp.so -lrt 
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::exists(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::operator<<(log4cpp::CategoryStream& (*)(log4cpp::CategoryStream&))'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::~CategoryStream()'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::FileAppender::FileAppender(std::string const&, std::string const&, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::PropertyConfigurator::configure(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::PatternLayout::PatternLayout()'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::getInstance(std::string const&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::RollingFileAppender::RollingFileAppender(std::string const&, std::string const&, unsigned long, unsigned int, bool, unsigned int)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::eol(log4cpp::CategoryStream&)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::CategoryStream::operator<<(char const*)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::OstreamAppender::OstreamAppender(std::string const&, std::ostream*)'
libgnuradio-runtime.so.3.8tech-preview-381-g27dd99e4: undefined reference to `log4cpp::Category::getCurrentCategories()'
collect2: error: ld returned 1 exit status
make[2]: *** [gnuradio-runtime/lib/pmt_unv] Error 1
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/pmt_unv.dir/all] Error 2
make[1]: Leaving directory `/home/<user>/gnuradio/build'
make: *** [all] Error 2

@michaelld
Copy link
Contributor

Ok so the issue is that there is no "log4cpp" linkage here. Are you trying to build the latest GR GIT master HEAD? Maybe do "git pull" just to verify ...

If you are, then we need to go back to the "cmake" command & see what it thinks.

@JakeHadley
Copy link

JakeHadley commented May 29, 2019

I'm cloning with this command git clone --recursive https://github.com/gnuradio/gnuradio.git. Git pull says already up to date. I'm on branch master.

Here's the cmake output. The Dependency LOG4CPP_FOUND = TRUE is about 120 lines down:

-- Build type set to Release.
-- Extracting version information from git describe...
-- Compiler Version: cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- Compiler Flags: /bin/cc:::-O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized
/bin/c++:::-O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized
-- ADDING PERF COUNTERS
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   date_time
--   program_options
--   filesystem
--   system
--   regex
--   thread
--   unit_test_framework
--   chrono
--   atomic
-- User set python executable /bin/python3
-- Found PythonLibs: //lib64/libpython3.6m.so (found suitable exact version "3.6.8") 
-- Found PythonLibs: //lib64/libpython3.6m.so (found suitable version "3.6.8", minimum required is "2.7") 
-- Python checking for six - python 2 and 3 compatibility library - found
-- 
-- Checking for module SWIG
-- Found SWIG version 3.0.12.
-- 
-- The build system will automatically enable all components.
-- Use -DENABLE_DEFAULT=OFF to disable components by default.
-- 
-- Configuring python-support support...
--   Dependency PYTHONLIBS_FOUND = TRUE
--   Dependency SWIG_FOUND = TRUE
--   Dependency SWIG_VERSION_CHECK = TRUE
--   Dependency SIX_FOUND = TRUE
--   Enabling python-support support.
--   Override with -DENABLE_PYTHON=ON/OFF
-- 
-- Configuring testing-support support...
--   Dependency Boost_FOUND = 1
--   Enabling testing-support support.
--   Override with -DENABLE_TESTING=ON/OFF
-- 
-- Configuring VOLK support...
-- Build type set to Release.
-- Extracting version information from git describe...
-- 
-- Python checking for python >= 2.7
-- Python checking for python >= 2.7 - found
-- 
-- Python checking for mako >= 0.4.2
-- Python checking for mako >= 0.4.2 - found
-- 
-- Python checking for six - python 2 and 3 compatibility library
-- Python checking for six - python 2 and 3 compatibility library - found
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- QA Testing is enabled.
--   Modify using: -DENABLE_TESTING=ON/OFF
-- System profiling is disabled.
--   Modify using: -DENABLE_PROFILING=ON/OFF
-- Compiler name: GNU
-- x86* CPU detected
-- Compiler doesn't support NEON, Overruled arch neon
-- Compiler doesn't support NEON, Overruled arch neonv7
-- Compiler doesn't support NEON, Overruled arch neonv8
-- CPU width is 64 bits, Overruled arch 32
-- Available architectures: generic;64;3dnow;abm;popcount;mmx;fma;sse;sse2;orc;norc;sse3;ssse3;sse4_a;sse4_1;sse4_2;avx;avx2
-- Available machines: generic_orc;sse2_64_mmx_orc;sse3_64_mmx_orc;ssse3_64_mmx_orc;sse4_a_64_mmx_orc;sse4_1_64_mmx_orc;sse4_2_64_mmx_orc;avx_64_mmx_orc;avx2_64_mmx_orc
-- BUILD TYPE = RELEASE
-- Base cflags = -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall
-- BUILD INFO ::: generic_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall 
-- BUILD INFO ::: sse2_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2
-- BUILD INFO ::: sse3_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3
-- BUILD INFO ::: ssse3_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3 -mssse3
-- BUILD INFO ::: sse4_a_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3 -msse4a -mpopcnt
-- BUILD INFO ::: sse4_1_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1
-- BUILD INFO ::: sse4_2_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt
-- BUILD INFO ::: avx_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt -mavx
-- BUILD INFO ::: avx2_64_mmx_orc ::: GNU ::: -O3 -DNDEBUG  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall -m64 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt -mavx -mfma -mavx2
-- Compiler Version: cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- c flags:  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall;
-- asm flags:  
-- c flags:  -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -Wall;
-- asm flags:   
-- Loading version 1.4.1git into constants...
-- Using install prefix: /usr/local
-- 
-- Configuring volk support...
--   Enabling volk support.
--   Override with -DENABLE_VOLK=ON/OFF
--   Override with -DENABLE_INTERNAL_VOLK=ON/OFF
-- Checking for module 'gmp'
--   No package 'gmp' found
-- Checking for module 'mpir >= 3.0'
--   No package 'mpir' found
-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_LIBRARY MPIR_INCLUDE_DIR) 
-- 
-- Configuring doxygen support...
--   Dependency DOXYGEN_FOUND = YES
--   Enabling doxygen support.
--   Override with -DENABLE_DOXYGEN=ON/OFF
-- 
-- Configuring sphinx support...
--   Dependency SPHINX_FOUND = TRUE
--   Enabling sphinx support.
--   Override with -DENABLE_SPHINX=ON/OFF
-- Checking for module 'gmp'
--   No package 'gmp' found
-- Checking for module 'mpir >= 3.0'
--   No package 'mpir' found
-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_LIBRARY MPIR_INCLUDE_DIR) 
-- 
-- Configuring gnuradio-runtime support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_VOLK = ON
--   Dependency PYTHONINTERP_FOUND = TRUE
--   Dependency MPLIB_FOUND = TRUE
**--   Dependency LOG4CPP_FOUND = TRUE**
--   Enabling gnuradio-runtime support.
--   Override with -DENABLE_GNURADIO_RUNTIME=ON/OFF
-- 
-- Configuring gr-ctrlport support...
--   Dependency Boost_FOUND = 1
--   Dependency SWIG_FOUND = TRUE
--   Dependency SWIG_VERSION_CHECK = TRUE
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Enabling gr-ctrlport support.
--   Override with -DENABLE_GR_CTRLPORT=ON/OFF
-- Loading build date Wed, 29 May 2019 16:39:23 into constants...
-- Loading version 3.8tech-preview-381-g27dd99e4 into constants...
-- Could not find appropriate version of Thrift: 0.9.1 < 0.9.2
-- TRY_SHM_VMCIRCBUF set to ON.
-- 
-- Python checking for python2 >= 2.7.6 or python3 >= 3.4.0 - found
-- Python checking for PyYAML >= 3.10 - found
-- Python checking for mako >= 0.9.1 - found
-- Python checking for pygobject >= 2.28.6 - found
-- Python checking for Gtk (GI) >= 3.10.8 - found
-- Python checking for Cairo (GI) >= 1.0 - found
-- Python checking for PangoCairo (GI) >= 1.0 - found
-- Python checking for numpy - found
-- 
-- Configuring gnuradio-companion support...
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_PYTHON = ON
--   Dependency PYTHON_MIN_VER_FOUND = TRUE
--   Dependency PYYAML_FOUND = TRUE
--   Dependency MAKO_FOUND = TRUE
--   Dependency PYGI_FOUND = TRUE
--   Dependency GTK_GI_FOUND = TRUE
--   Dependency CAIRO_GI_FOUND = TRUE
--   Dependency PANGOCAIRO_GI_FOUND = TRUE
--   Dependency NUMPY_FOUND = TRUE
--   Enabling gnuradio-companion support.
--   Override with -DENABLE_GRC=ON/OFF
-- 
-- Configuring gr-blocks support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_VOLK = ON
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Enabling gr-blocks support.
--   Override with -DENABLE_GR_BLOCKS=ON/OFF
-- 
-- Configuring gr-fec support...
--   Dependency ENABLE_VOLK = ON
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Enabling gr-fec support.
--   Override with -DENABLE_GR_FEC=ON/OFF
-- 
-- Configuring gr-fft support...
--   Dependency ENABLE_VOLK = ON
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency FFTW3f_FOUND = TRUE
--   Enabling gr-fft support.
--   Override with -DENABLE_GR_FFT=ON/OFF
-- 
-- Configuring gr-filter support...
--   Dependency ENABLE_VOLK = ON
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Enabling gr-filter support.
--   Override with -DENABLE_GR_FILTER=ON/OFF
-- 
-- Configuring gr-analog support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_VOLK = ON
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Enabling gr-analog support.
--   Override with -DENABLE_GR_ANALOG=ON/OFF
-- 
-- Configuring gr-digital support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_VOLK = ON
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Enabling gr-digital support.
--   Override with -DENABLE_GR_DIGITAL=ON/OFF
-- 
-- Configuring gr-dtv support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Dependency ENABLE_GR_FEC = ON
--   Dependency ENABLE_VOLK = ON
--   Enabling gr-dtv support.
--   Override with -DENABLE_GR_DTV=ON/OFF
-- 
-- Configuring gr-audio support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Enabling gr-audio support.
--   Override with -DENABLE_GR_AUDIO=ON/OFF
-- Found ALSA 1.1.6
-- Found jack: /usr/lib64/libjack.so
-- Checking for module 'comedilib'
--   No package 'comedilib' found
-- 
-- Configuring gr-comedi support...
--   Dependency COMEDI_FOUND = 
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Disabling gr-comedi support.
--   Override with -DENABLE_GR_COMEDI=ON/OFF
-- 
-- Configuring gr-channels support...
--   Dependency ENABLE_VOLK = ON
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Enabling gr-channels support.
--   Override with -DENABLE_GR_CHANNELS=ON/OFF
-- Found PythonLibs: //lib64/libpython3.6m.so (found suitable version "3.6.8", minimum required is "2") 
-- Python checking for PyQt5 - found
-- Checking for module 'Qt5Qwt6'
--   No package 'Qt5Qwt6' found
-- QWT Version: 6.1.1
-- Found Qwt: /usr/local/qwt-6.1.4/lib/libqwt.so  
-- 
-- Configuring gr-qtgui support...
--   Dependency Boost_FOUND = 1
--   Dependency QT_FOUND = 1
--   Dependency QWT_FOUND = TRUE
--   Dependency ENABLE_VOLK = ON
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Dependency PYTHONLIBS_FOUND = TRUE
--   Dependency PYQT5_FOUND = TRUE
--   Enabling gr-qtgui support.
--   Override with -DENABLE_GR_QTGUI=ON/OFF
-- 
-- Configuring gr-trellis support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_DIGITAL = ON
--   Enabling gr-trellis support.
--   Override with -DENABLE_GR_TRELLIS=ON/OFF
-- 
-- Configuring gr-uhd support...
--   Dependency Boost_FOUND = 1
--   Dependency UHD_FOUND = TRUE
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Enabling gr-uhd support.
--   Override with -DENABLE_GR_UHD=ON/OFF
--   UHD Version: 3.15.0.git-1-gf83faf28
-- Python checking for Mako >= 0.4.2 - found
-- 
-- Configuring gr-utils support...
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_PYTHON = ON
--   Dependency MAKO_FOUND = TRUE
--   Enabling gr-utils support.
--   Override with -DENABLE_GR_UTILS=ON/OFF
-- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) 
-- 
-- Configuring gr-video-sdl support...
--   Dependency SDL_FOUND = FALSE
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Disabling gr-video-sdl support.
--   Override with -DENABLE_GR_VIDEO_SDL=ON/OFF
-- 
-- Configuring gr-vocoder support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_FFT = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_FILTER = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Enabling gr-vocoder support.
--   Override with -DENABLE_GR_VOCODER=ON/OFF
-- Could NOT find LIBCODEC2 (missing: LIBCODEC2_LIBRARIES LIBCODEC2_INCLUDE_DIRS) 
-- Could NOT find LIBGSM (missing: LIBGSM_LIBRARIES LIBGSM_INCLUDE_DIRS) 
-- 
-- Configuring gr-wavelet support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_GR_BLOCKS = ON
--   Dependency ENABLE_GR_ANALOG = ON
--   Dependency GSL_FOUND = TRUE
--   Enabling gr-wavelet support.
--   Override with -DENABLE_GR_WAVELET=ON/OFF
-- 
-- Configuring gr-zeromq support...
--   Dependency Boost_FOUND = 1
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ZEROMQ_FOUND = TRUE
--   Enabling gr-zeromq support.
--   Override with -DENABLE_GR_ZEROMQ=ON/OFF
-- 
-- ######################################################
-- # Gnuradio enabled components                         
-- ######################################################
--   * python-support
--   * testing-support
--   * volk
--   * doxygen
--   * sphinx
--   * gnuradio-runtime
--   * gr-ctrlport
--   * gnuradio-companion
--   * gr-blocks
--   * gr-fec
--   * gr-fft
--   * gr-filter
--   * gr-analog
--   * gr-digital
--   * gr-dtv
--   * gr-audio
--   * * alsa
--   * * oss
--   * * jack
--   * * portaudio
--   * gr-channels
--   * gr-qtgui
--   * gr-trellis
--   * gr-uhd
--   * gr-utils
--   * gr-vocoder
--   * gr-wavelet
--   * gr-zeromq
-- 
-- ######################################################
-- # Gnuradio disabled components                        
-- ######################################################
--   * gr-comedi
--   * gr-video-sdl
-- 
-- Using install prefix: /usr/local
-- Building for version: 3.8tech-preview-381-g27dd99e4 / 3.8git
-- Configuring done
WARNING: Target "pmt_unv" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "math_qa_fast_atan2f.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "math_qa_sincos.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-runtime" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_qa_buffer.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_qa_io_signature.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "math_qa_fxpt_nco.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_qa_circular_file.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_qa_vmcircbuf.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "math_qa_fxpt.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_qa_logger.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "math_qa_fxpt_vco.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "pmt_prims" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "math_qa_math.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-runtime" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-pmt" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-pmt" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-config-info" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "pmt_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "runtime_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-blocks" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_gr_block.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_gr_flowgraph.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_gr_hier_block2.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_gr_hier_block2_derived.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_set_msg_handler.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_rotator.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_block_tags.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_qa_gr_top_block.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-blocks" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig10" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig9" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig4" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig0" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig3" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig8" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig2" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig1" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig5" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig6" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "blocks_swig7" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-fec" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-fec" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gr_fec_rstest" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "fec_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-fft" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-fft" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "fft_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-filter" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_qa_firdes.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_qa_mmse_interp_differentiator_ff.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_qa_mmse_fir_interpolator_ff.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_qa_fir_filter_with_buffer.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_qa_mmse_fir_interpolator_cc.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_qa_mmse_interp_differentiator_cc.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-filter" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "filter_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-analog" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-analog" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "analog_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "digital_qa_header_buffer.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "digital_qa_header_format.cc" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-digital" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-digital" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "digital_swig1" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "digital_swig2" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "digital_swig0" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-dtv" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-dtv" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "dtv_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-audio" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-audio" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "audio_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "dial_tone" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-channels" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-channels" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "channels_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-qtgui" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-qtgui" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "display_qt" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "qtgui_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-trellis" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-trellis" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trellis_swig0" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "trellis_swig1" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-uhd" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-uhd" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "tags_demo" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "uhd_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-vocoder" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-vocoder" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "vocoder_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-wavelet" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-wavelet" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "wavelet_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-zeromq" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gnuradio-zeromq" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "zeromq_swig" requests linking to directory "/usr/lib64".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/<user>/gnuradio/build

@JakeHadley
Copy link

@michaelld I installed log4cplus, which is on version 1.1.3 hoping that it would work. I ran the cmake command with the same paths for the log4cpp flags, but when I run make, it errors out saying that there is no such file as log4cpp/Category.hh, which is true, since it's log4cplus instead of log4cpp.

With all of this, the log4cpp version on other distros is 1.1.3. Should I try to build that from source and see how it goes? Otherwise, centos 7 is using 1.1.1.

@JakeHadley
Copy link

JakeHadley commented May 29, 2019

So I was actually able to get past the linking error for log4cpp by doing what is described here, in that you add
-DCMAKE_EXE_LINKER_FLAGS=-llog4cpp -DCMAKE_MODULE_LINKER_FLAGS=-llog4cpp -DCMAKE_SHARED_LINKER_FLAGS=-llog4cpp to the cmake command.

However, it ran into another error with log4cpp:

[ 16%] Linking CXX executable _pmt_swig_doc_tag
cd /home/<user>/gnuradio/build/gnuradio-runtime/swig && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/_pmt_swig_doc_tag.dir/link.txt --verbose=ON
/bin/c++   -fvisibility=hidden -Wsign-compare -Wall -Wno-uninitialized -O3 -DNDEBUG  -llog4cpp CMakeFiles/_pmt_swig_doc_tag.dir/_pmt_swig_doc_tag.cpp.o  -o _pmt_swig_doc_tag 
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/liblog4cpp.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/liblog4cpp.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/liblog4cpp.so: undefined reference to `pthread_key_delete'
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/liblog4cpp.so: undefined reference to `pthread_setspecific'
collect2: error: ld returned 1 exit status
make[2]: *** [gnuradio-runtime/swig/_pmt_swig_doc_tag] Error 1
make[2]: Leaving directory `/home/<user>/gnuradio/build'
make[1]: *** [gnuradio-runtime/swig/CMakeFiles/_pmt_swig_doc_tag.dir/all] Error 2
make[1]: Leaving directory `/home/<user>/gnuradio/build'
make: *** [all] Error 2

With the references to log4cpp, I'm assuming that what I did with the cmake command didn't quite fix the issue...

@michaelld
Copy link
Contributor

OK so adding the *_LINKER_FLAGS is just a bandaid & it might work or not temporarily, but it's not a long-term fix. I'm guessing the issue is with the GR-provided log4cpp find routines. Do you mind if we take this to email instead of this issue? I'll keep helping you, and if we find anything truly relevant we can push it somewhere public. My email is "michael.dickens@ettus.com" ... please send me the file from your top-level build directory called CMakeCache.txt ... it might shed some more light. I'll also try my own build allowing CMake to find the log4cpp (instead of me telling it how to do so, which is my preferred method).

@JakeHadley
Copy link

JakeHadley commented May 29, 2019

Thanks, I sent you an email.

Edit:
Cleaned build directory and ran cmake with the command cmake -DPYTHON_EXECUTABLE=/bin/python3 -DQWT_LIBRARIES=/usr/local/qwt-6.1.4/lib/libqwt.so -DZEROMQ_LIBRARIES=/usr/lib64/libzmq.so -DZEROMQ_INCLUDE_DIRS=/usr/include ../ and it got past this issue of log4cpp.

@mwk088
Copy link

mwk088 commented Dec 3, 2019

Can we reopen this? I am getting the same error as desribed here. Cmake is finding log4cpp, but when I try and make gnuradio, I get another error. I tried the latest suggests with cmake, but still am getting the same errors.

#40 302.2 [ 29%] Linking CXX executable zeromq_swig_gr_zeromq_swig_ed811
#40 302.4 [ 29%] Linking CXX shared library libgnuradio-pmt-3.7.13.5.so
#40 302.4 Swig source
#40 302.5 /bin/ld: cannot find -llog4cpp
#40 302.5 collect2: error: ld returned 1 exit status
#40 302.5 make[2]: *** [gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/build.make:175: gnuradio-runtime/lib/pmt/libgnuradio-pmt-3.7.13.5.so.0.0.0] Error 1
#40 302.5 make[1]: *** [CMakeFiles/Makefile2:790: gnuradio-runtime/lib/pmt/CMakeFiles/gnuradio-pmt.dir/all] Error 2
#40 302.5 make[1]: *** Waiting for unfinished jobs....

CMake
Found LOG4CPP: /opt/xxxx/6.2/lib/liblog4cpp.so
#40 236.9 -- ENABLE_GR_LOG set to ON.
#40 236.9 -- HAVE_LOG4CPP set to True.
#40 236.9 -- LOG4CPP_LIBRARIES set to /opt/xxxx/6.2/lib/liblog4cpp.so.

@michaelld
Copy link
Contributor

Can you do make VERBOSE=ON and report back the link command that's generating this error? I'm guessing the issue is that Log4CPP is installed outside the CMAKE_INSTALL_PREFIX and thus we need to provide CMake with some library linkage info.

@michaelld
Copy link
Contributor

@mwk088 can you please open a new issue for this, recreated your entry, provide the info I ask for, and tag me on it? We'll take this up there. This issue is old enough it's really not clear whether it's the same as yours.

@mwk088
Copy link

mwk088 commented Dec 4, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants