管理GNU Radio的依赖项以从源代码进行编译

Ettus研究为18.04提供了一个大量的依赖项列表,几乎可以用于从源代码编译GNU Radio。
cmake给出了以下配置错误:
-- Python checking for PyQt5 - found
-- Checking for module 'Qt5Qwt6'
--   No package 'Qt5Qwt6' found
-- QWT Version: 6.1.3
-- Found Qwt: /usr/lib/libqwt.so  

然而根据我拥有的软件包(似乎是每个可能的版本..也许太多了),我应该有它所需的东西。
apt-cache search qwt
libqwt-dev - Qt widgets library for technical applications (development, qt4)
libqwt-doc - Qt widgets library for technical applications (documentation)
libqwt-headers - Qt widgets library for technical applications (header files)
libqwt-qt5-6 - Qt widgets library for technical applications (runtime, qt5)
libqwt-qt5-dev - Qt widgets library for technical applications (development, qt5)
libqwt5-doc - Qt widgets library for technical applications (documentation)
libqwt5-qt4 - Qt4 widgets library for technical applications (runtime)
libqwt5-qt4-dev - Qt4 widgets library for technical applications (development)
libqwt6abi1 - Qt widgets library for technical applications (runtime, qt4)
libqwtmathml-dev - Text Engine for Qwt (development, qt4)
libqwtmathml-qt5-6 - Text Engine for Qwt (runtime, qt5)
libqwtmathml-qt5-dev - Text Engine for Qwt (development, qt5)
libqwtmathml6abi1 - Text Engine for Qwt (runtime, qt4)
libqwtplot3d-doc - 3D plotting library based on Qt/OpenGL (documentation)
libqwtplot3d-qt5-0 - 3D plotting library based on Qt5/OpenGL (runtime)
libqwtplot3d-qt5-dev - 3D plotting library based on Qt5/OpenGL (development)
python-guiqwt - efficient 2D data-plotting library - Python 2
python-guiqwt-doc - efficient 2D data-plotting library - Documentation
python-qwt - Pure Python implementation of Qwt - Python 2
python-qwt5-doc - Python Qwt5 technical widget library, documentation and examples
python-qwt5-qt4 - Python version of the Qwt5 technical widget library
python3-guiqwt - efficient 2D data-plotting library - Python 3
python3-qwt - Pure Python implementation of Qwt - Python 3
python-qwt-doc - Pure Python implementation of Qwt - Documentation

如何编辑CMake列表以正确找到它所寻找的内容?
2个回答

在互联网上搜索了“找不到软件包'Qt5Qwt6'”之后,我发现gnuradio问题追踪器显示了这个问题,并且给出了一个推荐的解决方案

值得一提的是,在arch上需要使用-DQWT_LIBRARIES=/usr/lib/libqwt.so来使gnuradion的cmake脚本启用gr-qtgui

这里,“arch”指的是ArchLinux,但这并不意味着这个解决方案仅适用于ArchLinux,它很可能也适用于你。

我会试试这个变通方法,之前我忽略了它,因为它是针对Arch的,但你说得对,它可能仍然有效。 - nickhansenrf
1尤其是考虑到这个问题是多么新颖,而且通常问题首先在Arch Linux中被发现,因为它非常前沿等等。谢谢您尝试并确保在出现问题时指明您已经尝试过了。 - earthmeLon
1它修复了问题的一部分,现在找到了qwt。谢谢! - nickhansenrf
1很好。@n0rbert有一个很棒的建议。请看一下以理解他们的建议。 - earthmeLon

我建议使用APT驱动的方法。GNU Radio在Ubuntu上已经打包了插件。首先,可以从二进制包开始使用,非常简单:
sudo apt-get install gnuradio

它是通过编译打包的,编译过程需要构建时依赖。您可以通过以下操作获取这些依赖项:
  1. 打开“软件和更新”(software-properties-gtk)并在此处启用“源代码”存储库
  2. 使用简单的命令安装构建依赖项:

    sudo apt-get build-dep gnuradio
    

    上述命令将为GNU Radio 3.7.11-10(如Ubuntu 18.04 LTS中所示)安装构建时依赖项。这个版本并不是很新,因为官方网站(2018年7月15日的消息中包含了GNU Radio v3.7.13.4发布的公告)。

  3. 使用简单的命令从Ubuntu存储库获取GNU Radio 3.7.11-10的源代码

    apt-get source gnuradio
    

    然后根据您的需求进行修补/更改/更新。


这看起来很不错,但我过去在使用gnuradio和这种方法时遇到了一些问题。我希望现在能够正常工作并成功使用。 - earthmeLon
谢谢你的回答,'apt install gnuradio' 对于那个版本来说效果非常好。我之前试图直接从gnu radio的git仓库编译。 - nickhansenrf