From b03a22ad8b625edc770617b66f18462769f8cd59 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 22 Dec 2011 02:26:28 +0000 Subject: [PATCH] Updating build instructions git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@89 64b25241-fba3-4117-9849-534c7e92360d --- README | 149 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 81 insertions(+), 68 deletions(-) diff --git a/README b/README index 137dfb341..b3ba44664 100644 --- a/README +++ b/README @@ -1,80 +1,93 @@ -How to set up the compilation environment for Ubuntu 9.10 and 10.04 +How to set up the compilation environment and build GNSS-SDR in Ubuntu: -- Download GNU Radio 3.3.0 or GNU Radio 3.4.2 from ftp://ftp.gnu.org/gnu/gnuradio -- Compile and install following the instructions at http://gnuradio.org/redmine/wiki/1/UbuntuInstall -- Install bjam with the command 'sudo apt-get install bjam' -- Install Boost.Build with the command 'sudo apt-get install boost-build' -- Add the system variable GNURADIO_ROOT with the location of the sources of gnuradio-3.3.0 or gnuradio-3.4.2 -- Download gtest-1.4.0.tar.gz from http://code.google.com/p/googletest. -- Unpack gtest-1.4.0.tar.gz into some folder. -- From the folder containing gtest build the libraries and install them: - - GTEST$ ./configure - - GTEST$ make - - GTEST$ make check - - GTEST$ sudo make install -- Add the following line to your .bashrc: - - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -- Download glog-0.3.0.tar.gz from http://code.google.com/p/google-glog. -- Unpack glog-0.3.0.tar.gz into some folder. -- From the folder containing glog, build and install the libraries: - - GLOG$ ./configure - - GLOG$ make - - GLOG$ sudo make install - NOTE: THE LOG FILES ARE STORED BY DEFAULT /TMP/ -- Download gflags-1.3.tar.gz from http://code.google.com/p/google-gflags. -- Unpack gflags-1.3.tar.gz into some folder. -- From the folder containing gflags, build the libraries and install them: - - GFLAGS$ ./configure - - GFLAGS$ make - - GFLAGS$ sudo make install - - - (28/11/2011) Download, compile, and install the Armadillo linear algebra library - 1. Download the latest stable version from http://arma.sourceforge.net/ - 2. Unpack it - 3. Open a shell, change into the directory that was - created by unpacking the armadillo archive, and type the following - commands: - cmake . - make - The full stop separated from "cmake" by a space is important. - CMake will figure out what other libraries are currently installed - and will modify Armadillo's configuration correspondingly. - CMake will also generate a run-time armadillo library, which is a - combined alias for all the relevant libraries present on your system - (eg. BLAS, LAPACK and ATLAS). - 4. Install the library - sudo make install - -(11/12/2010) GSL AND CBLAS ARITHMETIC +* Install GNU Radio: -In order to compile the arithmetic tests, the GNU Scientific Library (GSL) library package is needed. -Install the ubuntu package with: +- Downloading, building and installing GNU Radio and all its dependencies is not an easy task. We recommend to use Marcus Leech's build-gnuradio script, which automatically does all the work for you. In a terminal, do: -sudo apt-get install libgsl0ldbl +$ wget http://www.sbrac.org/files/build-gnuradio +$ chmod a+x build-gnuradio +$ ./build-gnuradio +This can take a while (up to two hours to complete, depending on the system), and installs the latest versions of UHD and GNU Radio in your system, including all their dependencies. -To build the project type call bjam from the project root folder. +- Set up some system variables needed by the GNSS-SDR build system: -PROFILING +export PYTHONPATH=/usr/local/lib/python2.7/dist-packages +export GNURADIO_ROOT=/path/to/gnuradio +export LD_LIBRARY_PATH=/usr/local/lib -In order to do profiling, you'll have to install google-perftools library. -- Download google-perftools-1.5.tar.gz from http://code.google.com/p/google-perftools. -- Unpack google-perftools-1.5.tar.gz into some folder. -- From the folder containing google-perftools, build and install the libraries: - - PERFTOOLS$ ./configure - - PERFTOOLS$ make - - PERFTOOLS$ sudo make install - -Once google-perftools is installed, you can use the script "profiler" which is placed -in the root folder of GNSS-SDR sources. The script must be run as root since it makes use -of "nice". The result of the profiling are two files, mercurio.cpu.prof and mercurio.head.prof.0001.heap, -that contain the results for CPU and HEAP profiling. You can use google-perftools' script pprof -to analyze the recorded data. +where /path/to/gnuradio is the folder in which you invoked build-gnuradio. If you don't want to define these variables each time you enter a session, you can add these two lines to your $HOME/.bashrc file. + +* Install other libraries used by GNSS-SDR: + +- Download, compile, and install the Armadillo linear algebra library + +$ wget http://sourceforge.net/projects/arma/files/armadillo-2.4.2.tar.gz +$ tar xvfz armadillo-2.4.2.tar.gz +$ cd armadillo-2.4.2 +$ cmake . +$ make +$ sudo make install + + The full stop separated from "cmake" by a space is important. CMake will figure out what other libraries are currently installed and will modify Armadillo's configuration correspondingly. CMake will also generate a run-time armadillo library, which is a combined alias for all the relevant libraries present on your system (eg. BLAS, LAPACK and ATLAS). + +- Download, unzip, configure, build and install Google's performance analysis tools, google-perftools: + +$ wget http://google-perftools.googlecode.com/files/google-perftools-1.8.3.tar.gz +$ tar xvfz google-perftools-1.8.3.tar.gz +$ cd google-perftools-1.8.3 +$ ./configure --enable-frame-pointers +$ make +$ sudo make install + +NOTE: At this moment, perftools seems to be not working properly in Ubuntu 11.10. See http://code.google.com/p/google-perftools/issues/detail?id=386 + +- Download, unzip, configure, and build Google's framework for writing C++ tests (also known as gtest): + +$ wget http://googletest.googlecode.com/files/gtest-1.6.0.zip +$ unzip gtest-1.6.0.zip +$ cd gtest-1.6.0 +$ ./configure +$ make + +- Download, unzip, configure, build and install Google's library that implements commandline flags processing, gflags: + +$ wget http://google-gflags.googlecode.com/files/gflags-1.7.tar.gz +$ tar xvfz gflags-1.7.tar.gz +$ cd gflags-1.7 +$ ./configure +$ make +$ sudo make install + +- Download, unzip, configure, build and install Google's library that implements application-level logging, glog: + +$ wget http://google-glog.googlecode.com/files/glog-0.3.1-1.tar.gz +$ tar xvfz glog-0.3.1-1.tar.gz +$ cd glog-0.3.1 +$ ./configure +$ make +$ sudo make install + +- Install Subversion + +$ sudo apt-get install subversion + +* Check the repository for the latest version of GNSS-SDR: + +- Check out the latest version of GNSS-SDR + +$ svn co http://gnss-sdr.svn.sourceforge.net/svnroot/gnss-sdr gnss-sdr + +* Build GNSS-SDR + +- Go to GNSS-SDR's root directory and compile the program: + +$ cd gnss-sdr/trunk +$ bjam + +If everything went fine, a executable will be found at gnss-sdr/trunk/install/gnss-sdr -(Sample of .bashrc configuration) -export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export GNURADIO_ROOT=/home/gnss/sdr/gnuradio-3.3.0