Can't find module "mpir" while unsing CMake generating "gr-ais"

2.3k Views Asked by At

I'm trying to install "gr-ais" and I get an error while using CMake "Could NOT find MPIR (missing: 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

As a result gr_ais is not working:

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'

I have installed mpir 3.0 (https://github.com/wbhart/mpir/releases), gnuradio-companion (3.8.1.0), GMP 6.2.1 and libgmp-dev (2:6.2.0+dfsg-4) too. Any other ideas?

1

There are 1 best solutions below

0
On

This fixed my problem: I needed to install gr-ais on /usr and not /usr/local. So just type cmake -DCMAKE_INSTALL_PREFIX=/usr gr-ais/ I think in /use/local python couldn't find the library... Don't forget to do a make clean before.

I did also install some more packages:

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

After all just do: make and sudo make install - ais_rx ist then available for sudo.

But this didn't solve the missing mpir package. CMake was still complaining. But gr-ais seems to work now anyway.