EttusResearch / uhd

The USRP™ Hardware Driver Repository
http://uhd.ettus.com
Other
996 stars 666 forks source link

Issue with uhd setting up for RFNoC development #353

Closed SerkanErgunAAU closed 4 years ago

SerkanErgunAAU commented 4 years ago

Issue Description

While building RFNoC with Docker using a Ubuntu 16.04 image, building uhd causes unexpected problems.

EDIT: I also tried to build the RFNoC setup using Virtualbox, same error, so this is not a Docker issue.

Further EDIT: The solution to this specific issue is using a older but stable version of UHD: RUN pybombs config --package uhd gitrev v3.14.1.0 just before: RUN pybombs prefix init ~/rfnoc -R rfnoc -a rfnoc

Setup Details

Using Docker and ubuntu 16.04 image. I installed Mako, numpy,.. with pip3 to resolve an issue that these packages were not found. Please be aware that some packages are installed multiple times, I excuse for the the untidy code.

Expected Behavior

should build properly as described in https://kb.ettus.com/Getting_Started_with_RFNoC_Development. Please check the Dockerfile's code below to reproduce.

Actual Behaviour

Here is the last part of the terminal output. The build crashes when Building CXX object lib/CMakeFiles/uhd.dir/cal/database.cpp.o is built.

Step 7/11 : RUN pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git && pybombs recipes add ettus git+https://github.com/EttusResearch/ettus-pybombs.git && pybombs recipes add gr-iio git+https://github.com/analogdevicesinc/gr-iio.git ---> Using cache ---> e068b6564a05 Step 8/11 : RUN pybombs config -P uhd gitbranch UHD-3.15.LTS ---> Using cache ---> 7cc425b3bf86 Step 9/11 : RUN pybombs --config makewidth=2 prefix init ~/rfnoc -R rfnoc -a rfnoc ---> Running in 57a57350ff27 [INFO] Prefix Python version is: 3.5.2 [INFO] PyBOMBS Version 2.3.4a0 [INFO] Creating directory/root/rfnoc' [INFO] Prefix Python version is: 3.5.2 [INFO] Creating new config file /root/rfnoc/.pybombs/config.yml [INFO] Prefix Python version is: 3.5.2 [INFO] Installing default packages for prefix... [INFO]

  1. FROM ubuntu:16.04
  2. The cleanest way to set this up is to install everything into a dedicated directory.

  3. PyBOMBS is the simplest way to do this. If not already installed, PyBOMBS can be setup with the following commands:

  4. ARG DEBIAN_FRONTEND=noninteractive
  5. RUN apt-get update \
  6. && apt-get install -y --no-install-recommends sudo \
  7. && apt-get -y install wget \
  8. && apt-get -y install gcc \
  9. && apt-get -y install g++ \
  10. && apt-get -y install build-essential \
  11. && apt-get -y install make \
  12. && apt-get -y purge cmake \
  13. && apt-get -y install libssl-dev \
  14. && mkdir ~/temp \
  15. && cd ~/temp \
  16. && wget https://cmake.org/files/LatestRelease/cmake-3.17.3.tar.gz \
  17. && tar -xzvf cmake-3.17.3.tar.gz \
  18. && cd cmake-3.17.3/ \
  19. && ./bootstrap \
  20. && make \
  21. && make install \
  22. && apt-get -y install git swig cmake doxygen build-essential libboost-all-dev libtool libusb-1.0-0 libusb-1.0-0-dev libudev-dev libncurses5-dev libfftw3-bin libfftw3-dev libfftw3-doc libcppunit-1.13-0v5 libcppunit-dev libcppunit-doc ncurses-bin cpufrequtils python-numpy python-numpy-doc python-numpy-dbg python-scipy python-docutils qt4-bin-dbg qt4-default qt4-doc libqt4-dev libqt4-dev-bin python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-doc libqwt6abi1 libfftw3-bin libfftw3-dev libfftw3-doc ncurses-bin libncurses5 libncurses5-dev libncurses5-dbg libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake autoconf libtool python-dev libfftw3-dev libcppunit-dev libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk3.0 git-core libqt4-dev python-numpy ccache python-opengl libgsl-dev python-cheetah python-mako python-lxml doxygen qt4-default qt4-dev-tools libusb-1.0-0-dev libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools python-qwt5-qt4 cmake git-core wget libxi-dev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq-dev libzmq1 python-requests python-sphinx libcomedi-dev python-zmq python-setuptools
  23. RUN apt-get -y install python3-pip \
  24. && pip3 install --upgrade pip
  25. RUN apt-get -y install python-setuptools python-dev build-essential \
  26. && pip3 install git+https://github.com/gnuradio/pybombs.git
  27. && pybombs auto_config

  28. && pybombs prefix init ~/devel/gnuradio \

  29. && pybombs recipes add-defaults

  30. RUN pip3 install setuptools \
  31. && pip3 install Mako \
  32. && pip3 install requests \
  33. && pip3 install numpy \
  34. && pip3 install ruamel.yaml
  35. RUN apt-get install python-mako \

  36. apt-get install python-requests \

  37. apt-get install python-numpy \

  38. Add the gr-recipes recipes which are used to install GNU Radio specific software

  39. Add the ettus recipes which are used to install Ettus Research specific software

  40. RUN pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git \
  41. && pybombs recipes add ettus git+https://github.com/EttusResearch/ettus-pybombs.git \
  42. && pybombs recipes add gr-iio git+https://github.com/analogdevicesinc/gr-iio.git
  43. RUN pybombs config -P uhd gitbranch UHD-3.15.LTS
  44. && pybombs fetch uhd

  45. && pybombs rebuild uhd gnuradio

  46. RUN pybombs remove gr-iio \

  47. && pybombs -p default config --package gr-iio gitbranch upgrade-3.8 \

  48. && pybombs install gr-iio-3.8

  49. https://github.com/analogdevicesinc/gr-iio/tree/upgrade-3.8

  50. From here, PyBOMBS can be used to setup and install the development environment/sandbox by running the following command:

  51. RUN pybombs --config makewidth=2 prefix init ~/rfnoc -R rfnoc -a rfnoc
  52. Then, it is necessary to setup the PyBOMBS environment, so that the system/terminal session

  53. will have the environmental variables pointing to this newly created prefix, which is done with the following commands:

  54. RUN cd ~/rfnoc \
  55. && source ./setup_env.sh
  56. These are the Hash commits you need to use in order to have the correct version running

  57. uhd: ec9138eb6634b0af106762832c7518c887576a94

  58. uhd-fpga: b0890fa97ef3dc7d90ed8047d678ca280c72ad61

  59. gr-ettus: 457dc0a203045aa5c201655dafba4f7b90c951ee

  60. RUN cd ~/rfnoc/src/uhd \
  61. && git checkout ec9138eb6634b0af106762832c7518c887576a94 \
  62. && cd ~/rfnoc/src/uhd-fpga\
  63. && git checkout b0890fa97ef3dc7d90ed8047d678ca280c72ad61 \
  64. && cd ~/rfnoc/src/gr-ettus\
  65. && git checkout 457dc0a203045aa5c201655dafba4f7b90c951ee
  66. Check USRP connection and load the image to the USRP

` I hope that you have an solution for this issue.

sdrhertz commented 4 years ago

What was the solution?

I have followed the same instructions and come across the same error, using Ubuntu 16 directly though...

SerkanErgunAAU commented 4 years ago

I specified a Version of UHD (See in "Further" Edit above) before running pybombs prefix .... Although I only reached to building GNU Radio.