在取消生成“gr-ais”的 CMake 时找不到模块“mpir”

时间:2021-02-15 21:50:29

标签: gnuradio gnuradio-companion mpir

我正在尝试安装“gr-ais”,但在使用 CMake 时出现错误“找不到 MPIR(缺少:MPIRXX_LIBRARY MPIR_INCLUDE_DIR)”:

mavo@mavo:~/Dokumente/ais$ cmake gr-ais/
-- Build type not specified: defaulting to release.
-- Checking for module 'mpir >= 3.0'
--   No package 'mpir' found
-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_INCLUDE_DIR) 
-- User set python executable /usr/bin/python3
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable exact version "3.8.5") 
-- Extracting version information from git describe...
-- Using install prefix: /usr/local
-- Building for version: 21621032 / 0.9.0git
-- 
-- Checking for module SWIG
-- Disabling SWIG because version check failed.
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found version "3.8.5") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mavo/Dokumente/ais

结果 gr_ais 不起作用:

mavo@mavo:~/Dokumente/ais$ ais_rx 
Traceback (most recent call last):
  File "/usr/local/bin/ais_rx", line 6, in <module>
    import ais
ModuleNotFoundError: No module named 'ais'

我也安装了 mpir 3.0 (https://github.com/wbhart/mpir/releases)、gnuradio-companion (3.8.1.0)、GMP 6.2.1 和 libgmp-dev (2:6.2.0+dfsg-4)。还有其他想法吗?

1 个答案:

答案 0 :(得分:0)

这解决了我的问题:我需要在 /usr 而不是 /usr/local 上安装 gr-ais。所以只需输入 cmake -DCMAKE_INSTALL_PREFIX=/usr gr-ais/ 我认为在 /use/local python 中找不到图书馆......不要忘记之前做一个 make clean

我还安装了更多软件包:

sudo apt install -y cmake autoconf libtool pkg-config build-essential  libcppunit-dev swig doxygen liblog4cpp5-dev gnuradio-dev gr-osmosdr libosmogsm10  libosmocodec0 libosmogsm-doc libosmosdr0 libosmocodec-doc libosmosdr-dev libosmocoding0 libosmocoding-doc libosmocore libosmocore11 libosmocore-dev libosmocore-doc libosmocore-utils libosmoctrl0 libosmoctrl-doc

毕竟只是做:make 和 sudo make install - ais_rx ist 然后可用于 sudo。

但这并没有解决丢失的 mpir 包。 CMake 仍在抱怨。但是 gr-ais 现在似乎可以正常工作了。