Talk:InstallingGR

From GNU Radio
Revision as of 15:54, 28 January 2020 by IndianaM1ke (talk | contribs) (→‎To install system wide: slight tweak to "last command")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DRAFT revisions to "To install system wide"

To install system wide

For this example, we will start in the home directory; you can, of course, use any directory you wish and the results will be the same.

Note: In the following command, change maint-3.8 to some other branch or tag if you want to build a different version of GNU Radio; see tags for tagged releases including pre-releases ("rc"). For branches, it's generally wise to stick with "master" (the default after cloning), and, currently: maint-3.7 or maint-3.8. Here we checkout the maint-3.8 branch, which contains the latest 3.8 release plus any fixes or augmentations to it that will be in the next 3.8 release.

  • git checkout maint-3.8
  • mkdir build
  • cd build

Note: In the following command, you can use -DCMAKE_INSTALL_PREFIX=XXX to install GNU Radio into the PREFIX XXX; if not specified, then the PREFIX is /usr/local. See other CMake options in Common cmake flags.

  • cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../

Note: In the following command, if your computer's CPU has multiple cores, you can use the argument -j# to speed compilation;
e.g., make -j3 will use 3 threads in the build. Specify at least one less than the number of CPU cores so the system does not appear to 'freeze' during the build. If not specified, then a single thread is used for the build; this is not necessarily a bad thing, but it will take roughly 2 times as long to build as using 2 threads, and roughly 3 times as long to build as using 3 threads.

  • make

Note: In the following command, it is very possible that not all tests pass. Generally any error is a sign of a missing dependency such as the Python interface to ZMQ or NumPy or SciPy, none of which are required for building GNU Radio but are required for testing.

  • make test
  • sudo make install

If you're running Linux, then always remember to do the following command after installing any library:

  • sudo ldconfig

Go to Setting PYTHONPATH to set your PYTHONPATH and LD_LIBRARY_PATH. After setting these environment variables, you might need to redo sudo ldconfig for the Linux dynamic library loader to find the just-installed GNU Radio libraries.