Difference between revisions of "Building GNU Radio on Mac OS X"
(→FFTW) |
(→Building GNU Radio) |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
This page describes how to build gnuradio-core, gnuradio-audio , gr-fcd and gr-uhd on Mac OS X 10.6.8 without using macports or any other ports. The objective is to create a GNU Radio application that bundles all non-standard libraries, including GNU Radio and UHD. | This page describes how to build gnuradio-core, gnuradio-audio , gr-fcd and gr-uhd on Mac OS X 10.6.8 without using macports or any other ports. The objective is to create a GNU Radio application that bundles all non-standard libraries, including GNU Radio and UHD. | ||
Line 84: | Line 82: | ||
tar xvfz fftw-3.3.tar.gz | tar xvfz fftw-3.3.tar.gz | ||
− | ./configure --enable- | + | cd fftw-3.3 |
+ | ./configure --enable-float --enable-shared --prefix=/Users/alexc/gnuradio/runtime | ||
+ | make | ||
+ | make install | ||
+ | |||
+ | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Users/alexc/gnuradio/runtime/lib/pkgconfig | ||
+ | |||
+ | === GSL === | ||
+ | |||
+ | tar xvfz gsl-1.15.tar.gz | ||
+ | cd gsl-1.15 | ||
+ | ./configure --prefix=/Users/alexc/gnuradio/runtime | ||
+ | make | ||
+ | make install | ||
+ | |||
+ | === Cmake === | ||
+ | |||
+ | ''To be added...'' | ||
+ | |||
+ | === Libusb === | ||
+ | |||
+ | ''To be added...'' | ||
+ | |||
+ | == Building UHD == | ||
+ | |||
+ | ''To be added...'' | ||
+ | |||
+ | |||
+ | == Building GNU Radio == | ||
+ | |||
+ | * Ensure that PATH and PKG_CONFIG_PATH are set as instructed above. | ||
+ | * Get GNU Radio from git. | ||
+ | |||
+ | Notes: | ||
+ | # This is without UHD | ||
+ | # Can't build volk (neither static nor dynamic) | ||
+ | cd v3.4.0-113-gc491449c | ||
+ | ./bootstrap | ||
+ | ./configure --enable-gnuradio-core --enable-gr-audio \ | ||
+ | --enable-volk=no --enable-static \ | ||
+ | --with-boost=/Users/alexc/gnuradio/runtime \ | ||
+ | --with-boost-libdir=/Users/alexc/gnuradio/runtime/lib \ | ||
+ | --prefix=/Users/alexc/gnuradio/runtime | ||
+ | |||
+ | Now cross your fingers and pray that you end up with: | ||
+ | ********************************************************************* | ||
+ | The following GNU Radio components have been successfully configured: | ||
+ | |||
+ | config | ||
+ | '''gruel''' | ||
+ | '''gnuradio-core''' | ||
+ | gr-msdd6000 | ||
+ | '''gr-audio''' | ||
+ | gr-atsc | ||
+ | gr-cvsd-vocoder | ||
+ | gr-gsm-fr-vocoder | ||
+ | gr-noaa | ||
+ | gr-pager | ||
+ | gr-radio-astronomy | ||
+ | gr-trellis | ||
+ | gnuradio-examples | ||
+ | docs | ||
+ | |||
+ | If make fails with: | ||
+ | libtool: Version mismatch error. This is libtool 2.4, but the | ||
+ | libtool: definition of this LT_INIT comes from libtool 2.2.4. | ||
+ | libtool: You should recreate aclocal.m4 with macros from libtool 2.4 | ||
+ | libtool: and run autoconf again. | ||
+ | delete ltmain.sh and rerun bootstrap and configure. | ||
+ | |||
+ | Finally: | ||
+ | make | ||
+ | make install | ||
+ | |||
+ | == Building gr-fcd == | ||
+ | |||
+ | * Get the latest gr-fcd from https://github.com/csete/gr-fcd | ||
+ | * Apply this patch: https://gist.github.com/1117088 | ||
+ | |||
+ | ./bootstrap | ||
+ | ./configure --enable-static \ | ||
+ | --with-boost=/Users/alexc/gnuradio/runtime \ | ||
+ | --with-boost-libdir=/Users/alexc/gnuradio/runtime/lib \ | ||
+ | --prefix=/Users/alexc/gnuradio/runtime | ||
make | make | ||
make install | make install | ||
− | |||
== Building and bundling the application == | == Building and bundling the application == | ||
Line 95: | Line 175: | ||
# The location of the headers | # The location of the headers | ||
# The location of the libraries | # The location of the libraries | ||
+ | |||
+ | If we add the PATH and PKG_CONFIG_PATH to the Qt Creator config then we can use the same trick as on Linux: | ||
+ | CONFIG += link_pkgconfig | ||
+ | PKGCONFIG += gnuradio-core gnuradio-audio gnuradio-fcd | ||
+ | QMAKE_LFLAGS += $$quote(-L/Users/alexc/gnuradio/runtime/lib) # necessary for boost libs | ||
+ | |||
+ | This resulted in a working application http://twitpic.com/5z0f2b | ||
+ | but I have no idea how to specify audio device names? | ||
+ | |||
+ | '''Update:''' | ||
+ | * I think entering ''FUNcube Dongle V1.0'' is OK, but it is not working because of this issue: http://www.ruby-forum.com/topic/1445451 | ||
+ | * dial_tone.cc works well at 96 ksps | ||
+ | |||
+ | [[category:GNU Radio]] | ||
+ | [[category:Software]] |
Latest revision as of 19:55, 7 September 2011
This page describes how to build gnuradio-core, gnuradio-audio , gr-fcd and gr-uhd on Mac OS X 10.6.8 without using macports or any other ports. The objective is to create a GNU Radio application that bundles all non-standard libraries, including GNU Radio and UHD.
I created this procedure while developing gqrx.
Contents
Overview
We are going to work in the
/User/alexc/gnuradio
directory, where we create following subdirectories:
- build – This is where we install tools and libraries that are only necessary for the build process (pkg-config and libtool).
- runtime – This is where we install the tools and libraries that are needed for both build and runtime.
- deps – This is where I put and build all the dependencies. You can use whatever you want since this is basically just a scratch folder.
- source – This is where I keep the GNU Radio and UHD sources.
Building the dependencies
Following packages need to be built before we can build GNU Radio:
gr-fcd has no additional requirements. Note that on Mac OS X gr-fcd does not use libusb.
In addition to the above, UHD requires:
- cmake – available as .dmg here.
- libusb-1.0 – avaialble as .dmg?
We are going to install all dependencies into one target directory:
/Users/alexc/gnuradio/
We can build both dynamic and static libraries and choose later whether we want to do static or dynamic linking in the application.
Libtool
Libtool is necessary for the bootstrap process, i.e. if we are building GNU Radio from git
tar xvfz libtool-2.4.tar.gz cd libtool-2.4 ./configure --prefix=/Users/alexc/gnuradio/build make make install
export PATH=$PATH:/Users/alexc/gnuradio/build/bin
Pkg-config
Get pkg-config-0.25, which is the last version that includes glib (0.26 wont compile).
tar xvfz pkg-config-0.25.tar.gz cd pkg-config-0.25 ./configure --prefix=/Users/alexc/gnuradio/build make make install
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Users/alexc/gnuradio/build/lib/pkgconfig
Cppunit
tar xvfz cppunit-1.12.1.tar.gz cd cppunit-1.12.1 ./configure --prefix=/Users/alexc/gnuradio/build make make install
Boost
The following will build all boost libraries which isn't really necessary since we only need a few libraries.
tar xvfz boost_1_47_0.tar.gz cd boost_1_47_0 ./bootstrap.sh --prefix=/Users/alexc/gnuradio/runtime ./b2 install (will appear to hang for a while)
This will build both static and dynamic libraries and install them under prefix (together with the headers).
FFTW
tar xvfz fftw-3.3.tar.gz cd fftw-3.3 ./configure --enable-float --enable-shared --prefix=/Users/alexc/gnuradio/runtime make make install
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Users/alexc/gnuradio/runtime/lib/pkgconfig
GSL
tar xvfz gsl-1.15.tar.gz cd gsl-1.15 ./configure --prefix=/Users/alexc/gnuradio/runtime make make install
Cmake
To be added...
Libusb
To be added...
Building UHD
To be added...
Building GNU Radio
- Ensure that PATH and PKG_CONFIG_PATH are set as instructed above.
- Get GNU Radio from git.
Notes:
- This is without UHD
- Can't build volk (neither static nor dynamic)
cd v3.4.0-113-gc491449c ./bootstrap ./configure --enable-gnuradio-core --enable-gr-audio \ --enable-volk=no --enable-static \ --with-boost=/Users/alexc/gnuradio/runtime \ --with-boost-libdir=/Users/alexc/gnuradio/runtime/lib \ --prefix=/Users/alexc/gnuradio/runtime
Now cross your fingers and pray that you end up with:
********************************************************************* The following GNU Radio components have been successfully configured: config gruel gnuradio-core gr-msdd6000 gr-audio gr-atsc gr-cvsd-vocoder gr-gsm-fr-vocoder gr-noaa gr-pager gr-radio-astronomy gr-trellis gnuradio-examples docs
If make fails with:
libtool: Version mismatch error. This is libtool 2.4, but the libtool: definition of this LT_INIT comes from libtool 2.2.4. libtool: You should recreate aclocal.m4 with macros from libtool 2.4 libtool: and run autoconf again.
delete ltmain.sh and rerun bootstrap and configure.
Finally:
make make install
Building gr-fcd
- Get the latest gr-fcd from https://github.com/csete/gr-fcd
- Apply this patch: https://gist.github.com/1117088
./bootstrap ./configure --enable-static \ --with-boost=/Users/alexc/gnuradio/runtime \ --with-boost-libdir=/Users/alexc/gnuradio/runtime/lib \ --prefix=/Users/alexc/gnuradio/runtime make make install
Building and bundling the application
In order to compile an application the compiler needs to know two things:
- The location of the headers
- The location of the libraries
If we add the PATH and PKG_CONFIG_PATH to the Qt Creator config then we can use the same trick as on Linux:
CONFIG += link_pkgconfig PKGCONFIG += gnuradio-core gnuradio-audio gnuradio-fcd QMAKE_LFLAGS += $$quote(-L/Users/alexc/gnuradio/runtime/lib) # necessary for boost libs
This resulted in a working application http://twitpic.com/5z0f2b but I have no idea how to specify audio device names?
Update:
- I think entering FUNcube Dongle V1.0 is OK, but it is not working because of this issue: http://www.ruby-forum.com/topic/1445451
- dial_tone.cc works well at 96 ksps