简体   繁体   English

Ubuntu 20.04 在 gr-iio cmake 期间找不到 MPIR

[英]Ubuntu 20.04 Could NOT find MPIR during gr-iio cmake

For the third time I reinstalled Ubuntu 20.04 on a Windows 10 machine running VMWare whilst attempting to install GNU Radio Companion 3.8 with the PlutoSDR gr_iio blocks.我第三次在运行 VMWare 的 Windows 10 机器上重新安装 Ubuntu 20.04,同时尝试使用 PlutoSDR gr_iio 块安装 GNU Radio Companion 3.8。 Each time failed with a different error.每次都因不同的错误而失败。

I am charting my most recent attempt below.我在下面绘制了我最近的尝试。 Any help is greatly appreciated.任何帮助是极大的赞赏。

  1. Installed Ubuntu 20.04 on VMWare在 VMWare 上安装 Ubuntu 20.04
  2. Updated Ubuntu更新了 Ubuntu
  3. cp./53-adi-plutosdr-usb.rules /etc/udev/rules.d/
  4. sudo service udev restart
  5. checked the output of dmesg检查了dmesg的output
  6. Since I had no ~/.ssh/config file I ran wget https://raw.githubusercontent.com/analogdevicesinc/plutosdr_scripts/master/ssh_config -O ~/.ssh/config因为我没有~/.ssh/config文件,所以我运行wget https://raw.githubusercontent.com/analogdevicesinc/plutosdr_scripts/master/ssh_config -O ~/.ssh/config
  7. ssh plutosdr to add to list of known hosts. ssh plutosdr添加到已知主机列表。 I verified the IP and firmware version.我验证了 IP 和固件版本。
  8. sudo apt-get install libiio-utils and verified I can talk to the device via iio_info -n 192.168.2.1 | grep device sudo apt-get install libiio-utils并验证我可以通过iio_info -n 192.168.2.1 | grep device iio_info -n 192.168.2.1 | grep device The following output was produced: iio_info -n 192.168.2.1 | grep device生产了以下 output:
IIO context has 5 devices:
    iio:device0: adm1177
    iio:device1: ad9361-phy
        18 device-specific attributes found:
                attr  2: dcxo_tune_coarse ERROR: No such device (-19)
                attr  4: dcxo_tune_fine ERROR: No such device (-19)
    iio:device2: xadc
        1 device-specific attributes found:
    iio:device3: cf-ad9361-dds-core-lpc (buffer capable)
    iio:device4: cf-ad9361-lpc (buffer capable)
                attr  3: samples_pps ERROR: No such device (-19)
                attr  3: samples_pps ERROR: No such device (-19)

I checked the errors shown above on the ADIEngineerZone and a top 1%er said "You can ignore these errors."我在 ADIEngineerZone 上检查了上面显示的错误,前 1% 的人说“你可以忽略这些错误”。 https://ez.analog.com/adieducation/university-program/f/qa/111133/missing-device-attributes-after-update-of-pluto/331921#331921 https://ez.analog.com/adieducation/university-program/f/qa/111133/missing-device-attributes-after-update-of-pluto/331921#331921

So I did just that (since I couldn't find a solution to resolve it) and moved on to the final check for lined items three through eight.所以我就这样做了(因为我找不到解决它的解决方案)并继续对第 3 到第 8 项进行最后检查。

  1. iio_readdev -n 192.168.2.1 -s 64 cf-ad9361-lpc | hexdump -x iio_readdev -n 192.168.2.1 -s 64 cf-ad9361-lpc | hexdump -x returned values just fine iio_readdev -n 192.168.2.1 -s 64 cf-ad9361-lpc | hexdump -x返回值就好了

Now that the Linux drivers are installed I proceeded to check the output of iio_info -s and iio_info -u ip:192.168.2.1 .现在已经安装了 Linux 驱动程序,我开始检查iio_info -siio_info -u ip:192.168.2.1的 output。 The first returned expected results.第一个返回预期结果。 The second output was terribly long but notable errors showed after the /gaintable tag第二个 output 非常长,但在 /gaintable 标记之后显示了明显的错误

                .
                .
                .
                attr 10: multichip_sync ERROR: Permission denied (-13)
                attr 11: rssi_gain_step_error value: lna_error: 0 0 0 0
mixer_error: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
gain_step_calib_reg_val: 0 0 0 0 0
                .
                .
                .

I am not sure if this is an issue, but considering the prior excusable error, I moved forward with the installation as outlined below.我不确定这是否是一个问题,但考虑到先前的可原谅错误,我继续进行如下所述的安装。

I begin by installing dependencies for GNU Radio.我首先安装 GNU Radio 的依赖项。

cd
sudo apt-get -y install libxml2 libxml2-dev bison flex cmake git libaio-dev libboost-all-dev swig libgmp-dev liborc-0.4-dev libusb-1.0-0-dev libserialport-dev graphviz doxygen

No errors were seen.没有发现错误。

Next, for git clone I installed using the following prefix /usr/local , which I'll take note when setting and checking the PATH.接下来,对于git clone ,我使用以下前缀/usr/local安装,我会在设置和检查 PATH 时注意这一点。

git clone https://github.com/analogdevicesinc/libiio.git
cd ~/libiio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
make
sudo make install
cd

git clone https://github.com/analogdevicesinc/libad9361-iio.git
cd ~/libad9361-iio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
make
sudo make install
cd

git clone https://github.com/analogdevicesinc/gr-iio.git
cd ~/gr-iio
git checkout upgrade-3.8
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
make
sudo make install
sudo ldconfig

Because I ran into a problem with the gr-iio cmake stating:因为我遇到了 gr- cmake的问题,说明:

-- The CXX compiler identification is unknown
-- The C compiler identification is GNU 9.3.0
CMake Error at CMakeLists.txt:25 (project):
  No CMAKE_CXX_COMPILER could be found.

I read online I should update apt-get , soemthing I should of done from the beginning but never stated in any walk-through.我在网上阅读我应该更新apt-get ,这是我应该从一开始就做的事情,但从未在任何演练中说明过。

sudo apt-get update && sudo apt-get install build-essential

I deleted the build folder after the above update and reran the gr-iio portion.我在上述更新后删除了 build 文件夹并重新运行了 gr-iio 部分。

After the update, the CXX compiler was found.更新后发现CXX编译器。 However, I did get an error not finding a package configuration file:但是,我确实收到了一个错误,没有找到 package 配置文件:

CMake Warning at CMakeLists.txt:90 (find_package):
  By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Gnuradio",
  but CMake did not find one.

  Could not find a package configuration file provided by "Gnuradio"
  (requested version 3.9) with any of the following names:

    GnuradioConfig.cmake
    gnuradio-config.cmake

So I looked for the two stated files so I can add to the CMAKE_MODULE_PATH but using: find /usr/ -iname GnuradioConfig.cmake or find /usr/ -iname gnuradio-config.cmake所以我寻找了两个声明的文件,所以我可以添加到 CMAKE_MODULE_PATH 但使用: find /usr/ -iname GnuradioConfig.cmakefind /usr/ -iname gnuradio-config.cmake

returned nothing... Online searching showed me I would need to sudo apt install gnuradio-dev so I did that and reran cmake什么也没返回...在线搜索显示我需要sudo apt install gnuradio-dev所以我这样做并重新运行cmake

This time it resulted in an error stating:这次它导致了一个错误,说明:

--   No package 'mpir' found
-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_LIBRARY MPIR_INCLUDE_DIR) 

On to installing mpir:关于安装 mpir:

sudo apt-get install libgmp3-dev and back to another go at removing the build directory and rerunning cmake. sudo apt-get install libgmp3-dev并在删除构建目录并重新运行 cmake 时返回另一个 go。 But, still same issue:但是,仍然是同样的问题:

-- Could NOT find MPIR (missing: MPIRXX_LIBRARY MPIR_LIBRARY MPIR_INCLUDE_DIR)

All online documentation points to installing libgmp3-dev or libgmp-dev but neither resolve this issue.所有在线文档都指向安装libgmp3-devlibgmp-dev但都没有解决这个问题。

Any thoughts?有什么想法吗?

Accoding to the documentation , the gr-iio project doesn't include the GNU Radio project but expects you to build it in advance.根据文档gr-iio项目不包括GNU Radio项目,但希望您提前构建它。

However, you only built libiio and libad9361 , but not the GNU Radio library from https://github.com/gnuradio/gnuradio .但是,您只构建libiiolibad9361 ,而不是来自https://github.com/gnuradio/gnuradioGNU Radio库。 The config file gr-iio is complaining about should be installed when installing GNU Radio .安装GNU Radio时应该安装gr-iio抱怨的配置文件。

Regarding MPIR: While MPIR started as a fork of gmp you can't install gmp as a replacement for MPIR, as they use different names for their headers and libraries.关于 MPIR:虽然 MPIR 最初是 gmp 的一个分支,但您不能安装 gmp 作为 MPIR 的替代品,因为它们的头文件和库使用不同的名称。 Which is why MPIR is still not being found after you've installed the development packages for gmp.这就是为什么在您安装了 gmp 的开发包后仍未找到 MPIR 的原因。 If ubuntu doesn't provide packages for MPIR you'll have to compile it from source.如果 ubuntu 不提供 MPIR 包,您必须从源代码编译它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM