discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] linker problem with c++ application on next branc


From: Alexandru Csete
Subject: Re: [Discuss-gnuradio] linker problem with c++ application on next branch
Date: Tue, 16 Apr 2013 16:22:48 +0200

On Mon, Apr 15, 2013 at 7:34 PM, Johnathan Corgan
<address@hidden> wrote:
> On Mon, Apr 15, 2013 at 8:40 AM, Alexandru Csete <address@hidden> wrote:
>
>> As far as I can see libgnuradio-pmt is a new library and it does not
>> have it's own package, so I assume a -lgnuradio-pmt is missing in the
>> pkg-config file of one of the other packages, perhaps
>> gnuradio-runtime.
>
> Thanks, I'll fix this right away.
>

Hi Johnathan,

I saw you made the update, however, it seems this wasn't enough as I
still get the same build error. This time I also noticed a problem
while building gnuradio so maybe the problem is somewhere else.

Here is what I do (xubuntu 12.10 64 with gcc 4.6 and 4.7 installed):

export CC=/usr/bin/gcc-4.6
export CXX=/usr/bin/g++-4.6
cmake -DCMAKE_INSTALL_PREFIX=/opt/gnuradio/v3.6.4.1-1146-gae625607-next
-DENABLE_GR_ATSC=OFF -DENABLE_GR_CTRLPORT=ON ..

Then I type make and it builds fine, however, if I just type make
again (or make install for that matter) I get an error:
address@hidden:~/sdr/gnuradio/v3.6.4.1-1146-gae625607-next/build2$ make
[  5%] Built target volk
[  5%] Built target test_all
[  5%] Built target volk_profile
[  6%] Built target pygen_python_volk_modtool_dad04
[  6%] Built target pygen_python_volk_modtool_f7e51
[  6%] Built target doxygen_target
[  6%] Built target pmt_generated
Linking CXX shared library libgnuradio-pmt-3.7git.so
make[2]: *** [gnuradio-runtime/lib/libgnuradio-pmt-3.7git.so.0.0.0] Error 1
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/gnuradio-pmt.dir/all] Error 2
make: *** [all] Error 2
address@hidden:~/sdr/gnuradio/v3.6.4.1-1146-gae625607-next/build2$

Subsequent attempts at "make" are OK, but my application still fails to link.

My application (https://github.com/csete/stlm/tree/master/receiver) is
also built using cmake. I tried forcing it to gcc 4.6 instead of the
default 4.7. It will then give a symbol name in the error message:

/usr/bin/ld: CMakeFiles/strx.dir/strx/strx_source_c_impl.cpp.o:
undefined reference to symbol 'pmt::intern(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: note: 'pmt::intern(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)' is defined in
DSO 
/opt/gnuradio/v3.6.4.1-1146-gae625607-next/lib/libgnuradio-pmt-3.7git.so.0.0.0
so try adding it to the linker command line
/opt/gnuradio/v3.6.4.1-1146-gae625607-next/lib/libgnuradio-pmt-3.7git.so.0.0.0:
could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [strx] Error 1
make[1]: *** [CMakeFiles/strx.dir/all] Error 2
make: *** [all] Error 2
address@hidden:~/sdr/stlm.git/receiver/build$

Alex



reply via email to

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