UHD: undefined symbol uhd_time_spec_t

Hi all,

I’m having right now problems with a implementation of a time tag in a
block that I’m writing. I’m basically writing a burst tagger with SOB,
EOB
and TX_TIME tags. The first two are working, but the third (the one that
uses a UHD function), is giving me problems.

I recognized that the part that is not properly working is when I write
“uhd::time_spec_t”. I even tried to create an arbitrary variable by
writing
just “uhd::time_spec_t test;” in an arbitrary function and then ctest,
and
then I notice that there is problems with that, as the output says:

       " /$WORKING_DIR$/build/lib/libgnuradio-dyspan.so: undefined

symbol: _ZN3uhd11time_spec_tC1Ed"

Make and make install of my block run without any issue.

I have in the headers and body the necessary includes, such as
<sys/time.h>
and <uhd/types/time_spec.hpp>. I also added the UHD module in the
CMakeList.txt file and it is found, as I can see this in the output:

– Build type not specified: defaulting to release.
– Boost version: 1.54.0
– Found the following Boost libraries:
– filesystem
– system
– date_time
Checking for GNU Radio Module: RUNTIME

  • INCLUDES=/usr/local/include

LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
GNURADIO_RUNTIME_FOUND = TRUE
Checking for GNU Radio Module: UHD

  • INCLUDES=/usr/local/include

LIBS=/usr/local/lib/libgnuradio-uhd.so;/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
GNURADIO_UHD_FOUND = TRUE
Checking for GNU Radio Module: PMT

  • INCLUDES=/usr/local/include

LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
GNURADIO_PMT_FOUND = TRUE

– Checking for module SWIG
– Found SWIG version 2.0.11.
– Configuring done
– Generating done
– Build files have been written to: /$WORKING_DIR$/build

I sincerely don’t know what am I missing. Maybe I’m skipping some
linking
steps, but I don’t know right now how to trace this. Any type of help
will
be welcomed.

Thanks in advance for your opinions,

Nicolas

Hi Nicolas,

so the good news is that you’re doing things right:
the CMake output contains this line:

Checking for GNU Radio Module: UHD
which indicates that you did a
set(GR_REQUIRED_COMPONENTS RUNTIME UHD PMT)
(or even more), so the libraries that CMake should link against are
being found.

You should check your gr-dyspan/lib/CMakeLists.txt; look for the lines
starting with
target_link_libraries(…
These should also include ${GNURADIO_ALL_LIBRARIES}.

Best regards,
Marcus

Hi Marcus,

You were right, I did the modifications on the CMakeList.txt file on the
working folder, but I forgot to go into the CMakeList.txt on tue lib/
folder. Now that I went thrhough the lib/CMakeList.txt and did the
proper
modificacions, the tests are passed and I can continue working.

Thank you very much for your time!

Best regards,
Nicolas

On Tue, May 19, 2015 at 10:50 AM, Marcus Müller
[email protected]