Difference between revisions of "Talk:InstallingGR"

From GNU Radio
Jump to navigation Jump to search
(Created page with "= DRAFT revisions to "To install system wide" = == To install system wide == <p><b>It is highly recommended that you start in your home directory.</b></p> * <code>cd ~/</cod...")
 
(Fixups for clarity and readability)
Line 3: Line 3:
== To install system wide ==
== To install system wide ==


<p><b>It is highly recommended that you start in your home directory.</b></p>
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.
* <code>cd ~/</code>
 
* <code>cd</code>
* <code>git clone --recursive https://github.com/gnuradio/gnuradio.git</code>
* <code>git clone --recursive https://github.com/gnuradio/gnuradio.git</code>
* <code>cd gnuradio</code>
* <code>cd gnuradio</code>
* <code>git checkout maint-3.8</code> # change `maint-3.8` if you want to use a different version; see [https://github.com/gnuradio/gnuradio/releases releases]
* <code>git checkout maint-3.8</code> # change <code>maint-3.8</code> if you want to use a different version; see [https://github.com/gnuradio/gnuradio/releases releases]
* <code>mkdir build</code>
* <code>mkdir build</code>
* <code>cd build</code>
* <code>cd build</code>
* <code>cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../</code> # see other options below
* <code>cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ..</code>
* Note: if your computer has multiple cores, you can use the -j option for 'make' to speed compilation, e.g. <code>make -j3</code> but specify one less than the total so the system does not appear to 'freeze'.
Notes:<br>
1) If your computer's CPU has multiple cores, you can use the <code>-j#</code> option for <code>make</code> to speed compilation, e.g., <code>make -j3</code>; specify one less than the number of CPU cores so the system does not appear to 'freeze'.<br>
2) Use <code>-DCMAKE_INSTALL_PREFIX=XXX</code> in the <code>cmake</code> command to install GNU Radio into the PREFIX <code>XXX</code>; if not specified then the PREFIX is <code>/usr/local</code>.
 
* <code>make</code>
* <code>make</code>
* <code>make test</code>
* <code>make test</code>
* <code>sudo make install</code>
* <code>sudo make install</code>
If you're running Linux, then always remember to do the following command after installing any library:
* <code>sudo ldconfig</code>
* <code>sudo ldconfig</code>
* If you used <code>-DCMAKE_INSTALL_PREFIX=XXX</code> in your 'cmake' command, then your prefix is XXX; otherwise it is <code>/usr/local</code>.
 
* Go to [[ModuleNotFoundError#Setting_PYTHONPATH|Setting PYTHONPATH]] to set your PYTHONPATH and LD_LIBRARY_PATH.
Go to [[ModuleNotFoundError#Setting_PYTHONPATH|Setting PYTHONPATH]] to set your PYTHONPATH and LD_LIBRARY_PATH. After setting these environment variables, you might need to redo this last command for the Linux dynamic library loader to find the just-installed GNU Radio libraries.

Revision as of 15:34, 27 January 2020

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.

  • cd
  • git clone --recursive https://github.com/gnuradio/gnuradio.git
  • cd gnuradio
  • git checkout maint-3.8 # change maint-3.8 if you want to use a different version; see releases
  • mkdir build
  • cd build
  • cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ..

Notes:
1) If your computer's CPU has multiple cores, you can use the -j# option for make to speed compilation, e.g., make -j3; specify one less than the number of CPU cores so the system does not appear to 'freeze'.
2) Use -DCMAKE_INSTALL_PREFIX=XXX in the cmake command to install GNU Radio into the PREFIX XXX; if not specified then the PREFIX is /usr/local.

  • make
  • 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 this last command for the Linux dynamic library loader to find the just-installed GNU Radio libraries.