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