Any chances you are confusing libgnuradio-uhd.so with libuhd.so. To me
it sounds like you want to link against the latter.
Maybe some linkers resolve symbols from libuhd through libgnuradio-uhd
and some don't (which might make sense if you do not use any symbols
defined in libgnuradio-uhd).
Best,
Bastian
On 6/19/2018 13:27, Gilad Beeri (ApolloShield) wrote:
The MESSAGE directive shows it should be ok - added to
lib/CMakeLists.txt, after the first target_link_libraries(), the line
"MESSAGE(STATUS "DEBUG GR LIBS: ${GNURADIO_ALL_LIBRARIES}")".
The output:
/
/
/-- DEBUG GR LIBS:
/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so;/home/user/gr/lib/libgnuradio-filter.so;/home/user/gr/lib/libgnuradio-fft.so;/home/user/gr/lib/libgnuradio-uhd.so/
/
/
I moved away all cmake/ files and then put them back one-by-one until
the build succeeded, which meant I ended up removing:
D cmake/Modules/CMakeParseArgumentsCopy.cmake
D cmake/Modules/FindGnuradioRuntime.cmake
D cmake/Modules/GrMiscUtils.cmake
D cmake/Modules/GrPython.cmake
D cmake/Modules/GrSwig.cmake
D cmake/Modules/GrTest.cmake
D cmake/Modules/UseSWIG.cmake
but still no luck (the undefined symbol error still exists).
It might be worth to mention, the version I use is 3.7.11.1.
On Tue, Jun 19, 2018 at 2:47 PM Müller, Marcus (CEL) <muel...@kit.edu
<mailto:muel...@kit.edu>> wrote:
add a "message ()" directive that prints the GNURADIO_ALL_LIBRARIES
that is actually used in your lib/CMakeLists.txt. If that is wrong:
Move your OOT's cmake/Modules/* out of the way – I do not endorse the
fact that we're distributing copies of all the GNU Radio CMake scripts
with our OOT template, as these might outdate locally.
I must admit I don't have an OOT where I test gr-uhd linkage myself.
Best regards,
Marcus
On Tue, 2018-06-19 at 14:42 +0300, Gilad Beeri (ApolloShield) wrote:
> I've done "rm -rf build/*" and "pushd build; cmake ../; and make
-j7; and make install; popd" ~ 50 times since yesterday :)
>
> Any suggestions for debugging it?
>
> On Tue, Jun 19, 2018 at 2:33 PM Müller, Marcus (CEL)
<muel...@kit.edu <mailto:muel...@kit.edu>> wrote:
> > I must admit this is surprising to me, as the line of code where
> > LIBS=... is printed is pretty integrally coupled to the line that
> > specifies what GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
> > I know this is kind of a "haveyoutriedturningitoffandonagain"
answer,
> > but have you tried completely rm'ing your build/ directory and
letting
> > CMake run anew?
> >
> > Best regards,
> > Marcus
> >
> > :e ../cmake/Modules/FindG On Tue, 2018-06-19 at
14:19 +0300,
> > Gilad Beeri (ApolloShield) wrote:
> > > I have a similar problem as described in
https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> > >
> > > When I try to run tests (with Python), I get:
> > >
> > > Traceback (most recent call last):
> > > File "python/myblock.py", line 12, in <module>
> > > from myproj.myproj_swig import mitigation_source
> > > File
"/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py",
line 28, in <module>
> > > _myproj_swig = swig_import_helper()
> > > File
"/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py",
line 24, in swig_import_helper
> > > _mod = imp.load_module('_myproj_swig', fp, pathname,
description)
> > > ImportError:
/home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0: undefined
symbol: _ZN3uhd11time_spec_tC1Eld
> > >
> > >
> > > I did add "UHD" to the line starting with
"set(GR_REQUIRED_COMPONENTS" (in my root CMakeLists.txt) so I get
the output of
> > >
> > > Checking for GNU Radio Module: UHD
> > > -- Checking for module 'gnuradio-uhd'
> > > -- Found gnuradio-uhd, version 3.7.11.1-as
> > > * INCLUDES=/home/user/gr/include
> > > *
LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > > -- Found GNURADIO_UHD:
/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > > GNURADIO_UHD_FOUND = TRUE
> > >
> > > I also have in my lib/CMakeLists.txt file
${GNURADIO_ALL_LIBRARIES} in both target_link_libraries() lists.
> > >
> > > I have "#include <uhd/types/time_spec.hpp>" in my header file.
> > >
> > > But for some reason, it doesn't seem to link gnuradio-uhd:
> > >
> > > readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> > >
> > > 0x0000000000000001 (NEEDED) Shared library:
[libboost_system.so.1.58.0]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libgnuradio-runtime-3.7.11.1-as.so.0.0.0]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libgnuradio-pmt-3.7.11.1-as.so.0.0.0]
> > > 0x0000000000000001 (NEEDED) Shared library:
[liblog4cpp.so.5]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libgnuradio-filter-3.7.11.1-as.so.0.0.0]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libstdc++.so.6]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libm.so.6]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libgcc_s.so.1]
> > > 0x0000000000000001 (NEEDED) Shared library:
[libc.so.6]
> > > 0x000000000000000e (SONAME) Library soname:
[libgnuradio-myproj-1.0.0git.so.0.0.0]
> > > _______________________________________________
> > > Discuss-gnuradio mailing list
> > > Discuss-gnuradio@gnu.org <mailto:Discuss-gnuradio@gnu.org>
> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio