Tuesday, October 18, 2022

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

Hi Michael,

On 10/3/22 1:21 AM, Michael Matthews wrote:
> ...
>
> -- 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

The above line shows where I think things start to go wrong for you.
Ubuntu links /lib to /usr/lib, and CMake has found at least Boost with
the /lib prefix.

> ...
>
> CMake Error in lib/CMakeLists.txt:
>
>   Imported target "gnuradio::gnuradio-runtime" includes non-existent path
>
>     "/include"
>
>   in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
>
>   * The path was deleted, renamed, or moved to another location.
>
>   * An install or uninstall procedure did not complete successfully.
>
>   * The installation package was faulty and references files it does not
>
>   provide.
>
> ...

So CMake ends up setting the INTERFACE_INCLUDE_DIRECTORIES for a few
targets to "/include" (which doesn't exist) when it should be
"/usr/include". Reading the CMake code, the way it gets this directory
is by:

1) Finding the directory containing the gnuradio-runtimeTargets.cmake
file (should be /usr/lib/x86_64-linux-gnu/cmake/gnuradio)
2) Stripping the last 4 directories from that path to get the prefix
(should be /usr)
3) Then appending "/include" (should be /usr/include)

In your case, I suspect what's happening is
"/lib/x86_64-linux-gnu/cmake/gnuradio" -> "/" -> "/include" because of
that /lib to /usr/lib symlink.

The curious thing is, there is CMake code in
gnuradio-runtimeTargets.cmake that is supposed to handle this exact case
and replace "/lib/x86_64-linux-gnu/cmake/gnuradio" with
"/usr/lib/x86_64-linux-gnu/cmake/gnuradio". So why isn't that working,
or what is different about your system???

I think you can trace what's happening in that file by running cmake
with
"--trace-source=/usr/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake",
so probably

cmake ..
--trace-source=/usr/lib/x86_64-linux-gnu/cmake/gnuradio/gnuradio-runtimeTargets.cmake

Hopefully that provides some illuminating information.

Cheers,
Ryan

No comments:

Post a Comment