Re: Problems with gr-modtool on Ubuntu 20.04 (gnuradio 3.10.4)

2022-10-20 Thread Ryan Volz

Hi Michael,

The trace is very helpful, and it seems clear now that the GNU Radio 
CMake files are working as expected. The actual problem is coming from 
Boost, and because the gnuradio-runtime target depends on Boost, it 
inherits the nonexistent "/include" INTERFACE_INCLUDE_DIRECTORIES.


I tried digging around to see if/when Boost fixed this, but I couldn't 
find anything. Hopefully an upgrade to a newer Boost version does fix it.


Another potentially workaround would be passing the 
"-DBoost_NO_BOOST_CMAKE=ON" argument when you run cmake. That should 
avoid Boost's supplied CMake config and use the one built in to CMake 
instead, which hopefully would be better behaved.


Cheers,
Ryan

On 10/19/22 9:36 PM, Michael Matthews wrote:

Hi Ryan,

It seems that changing the trace source path to start with /lib did 
produce a more meaningful output. When the target properties are set for 
gnuradio::gnuradio-runtime, the INTERFACE_INCLUDE_DIRECTORIES is 
correctly declared as /usr/include (gnuradio-runtimeTargets.cmake, line 
66). I was unsure where or how that would change to /include and throw 
the error, so I decided to do the more expansive trace log to see if the 
libraries it was linked with could have any issues.


If I am reading the output correctly, it seems that Boost and pybind11 
are two things having the path /include being added to their targets. 
So, I am still unsure why gnuradio-runtime is being affected. My next 
guess to try to resolve this is to update the versions for Boost and 
pybind11 on my machine. The GNU Radio Manual and API Reference only 
mentions needing boost >= 1.65 (mine is 1.71.0.0ubuntu2) and does not 
mention pybind11 (my version is 2.4.3-2build2, which seems to be the 
latest available through apt on Ubuntu 20.04).


Thank you for bearing with me. As I said last time, I am more familiar 
with other build systems, not so much with cmake and I am completely new 
to gnuradio.


Cheers,

Michael

PS. These are the outputs I got, in case they are helpful

The trace output I received was:

~/gr-customModule/build$ cmake .. 
--trace-source=/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake 
--trace-expand


Running with expanded trace output on.

-- The CXX compiler identification is GNU 9.4.0

-- The C compiler identification is GNU 9.4.0

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Looking for pthread.h

-- Looking for pthread.h - found

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD

-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")

-- Checking for module 'gmp'

--   Found gmp, version 6.2.0

-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmpxx.so

-- Using GMP.

-- Found MPLIB: /usr/lib/x86_64-linux-gnu/libgmpxx.so

-- Found Boost: 
/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found 
suitable version "1.71.0", minimum required is "1.71.0") found 
components: date_time program_options system regex thread 
unit_test_framework


-- Found Volk: Volk::volk

-- User set python executable /usr/bin/python3

-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10")

-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found 
suitable exact version "3.8.10")


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(3):  
if(3.16 LESS 2.5 )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(6):  
cmake_policy(PUSH )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(7):  
cmake_policy(VERSION 2.6 )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(13):  
set(CMAKE_IMPORT_FILE_VERSION 1 )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(16):  
set(_targetsDefined )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(17):  
set(_targetsNotDefined )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(18):  
set(_expectedTargets )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(19):  
foreach(_expectedTarget gnuradio::gnuradio-runtime )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(20):  
list(APPEND _expectedTargets gnuradio::gnuradio-runtime )


/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(21):  
if(NOT TARGET gnuradio::gnur

Re: Discuss-gnuradio Digest, Vol 240, Issue 19

2022-10-20 Thread panjie yudha
MPORTED_LOCATION_RELEASE
> /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.10.4.0
> IMPORTED_SONAME_RELEASE libgnuradio-runtime.so.3.10.4 )
>
> 17299:/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets-release.cmake(15):
> list(APPEND _IMPORT_CHECK_TARGETS gnuradio::gnuradio-runtime )
>
> 17300:/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets-release.cmake(16):
> list(APPEND _IMPORT_CHECK_FILES_FOR_gnuradio::gnuradio-runtime
> /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.10.4.0 )
>
> 17303:/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(88):
> foreach(target gnuradio::gnuradio-runtime )
>
> 17306:/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake(102):
> unset(_IMPORT_CHECK_FILES_FOR_gnuradio::gnuradio-runtime )
>
> 24977:/home/mmatthews/gr-customModule/lib/CMakeLists.txt(25):
> target_link_libraries(gnuradio-customModule gnuradio::gnuradio-runtime )
>
> 30717:/lib/cmake/pybind11/pybind11Targets.cmake(56):
> set_target_properties(pybind11::pybind11 PROPERTIES
> INTERFACE_INCLUDE_DIRECTORIES /include )
>
> 30742:/lib/cmake/pybind11/pybind11Config.cmake(125):
> set(pybind11_INCLUDE_DIRS /include;/usr/include/python3.8 )
>
> 31336:/lib/x86_64-linux-gnu/cmake/gnuradio/GrPybind.cmake(336):
> target_link_libraries(customModule_python PRIVATE
> Boost::date_time;Boost::program_options;Boost::system;Boost::regex;Boost::thread;Boost::unit_test_framework
> pybind11::pybind11 Python::Module Python::NumPy gnuradio-customModule )
>
> 31544:  Imported target "gnuradio::gnuradio-runtime" includes non-existent
> path
>
> 31546:"/include"
>
> 31560:  Imported target "gnuradio::gnuradio-runtime" includes non-existent
> path
>
> 31562:"/include"
>
> 31584:  Imported target "Boost::date_time" includes non-existent path
>
> 31586:"/include"
>
> 31618:  Imported target "Boost::date_time" includes non-existent path
>
> 31620:"/include"
>
>
>
>
>
> Michael Matthews
> Graduate Software Engineer
> Mobile: +1 847 714 4809
>
>
> [https://micro-x.com/esignature/micro-x-lo...@2x-white-bg.png]<
> https://micro-x.com>
>
> 855 South 192nd St, Suite 600
> SeaTac, WA, 98148, United States
> www.micro-x.com<https://micro-x.com>
>
>
> > -Original Message-
>
> > From: Ryan Volz 
>
> > Sent: Wednesday, October 19, 2022 7:18 AM
>
> > To: Michael Matthews ; discuss-
>
> > gnura...@gnu.org
>
> > Subject: Re: Problems with gr-modtool on Ubuntu 20.04 (gnuradio 3.10.4)
>
> >
>
> > Hi Michael,
>
> >
>
> > On 10/18/22 5:47 PM, Michael Matthews wrote:
>
> > > Hey Ryan,
>
> > >
>
> > > I went ahead and ran that cmake trace and it did produce something
>
> > > interesting.  I seems that two cmake policies are not set and both
>
> > > have the behavior to not throw warnings by default. The offending
> policies
>
> > are:
>
> > >
>
> > > - CMP0060
>
> > >
>
> > > - CMP0082
>
> >
>
> > Those are nothing to be concerned about.
>
> >
>
> > > ...
>
> > > PS.
>
> > >
>
> > > The trace output I received is below:
>
> > >
>
> > > ...
>
> > I don't actually see anything new in the trace, so I suspect it didn't
> work.
>
> > Probably it's not loading that file from that exact path (maybe /usr/lib
> -> /lib
>
> > would work?). Here's the option that should definitely work, although it
> will
>
> > also produce much more than we need:
>
> >
>
> > cmake .. --trace-expand
>
> >
>
> >
>
> > Cheers,
>
> > Ryan
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> https://lists.gnu.org/archive/html/discuss-gnuradio/attachments/20221020/d1ef2302/attachment.htm
> >
>
> --
>
> Subject: Digest Footer
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
> --
>
> End of Discuss-gnuradio Digest, Vol 240, Issue 19
> *
>