New build system features

Michael D. has implemented some changes to the build system which
have recently been merged into the GNU Radio trunk. These changes
allow finer control over the build; specifically, they allow compiling
and testing individual components of the GNU Radio source tree while
using already installed GNU Radio libraries.

While they are aimed primarily at distribution/system packagers,
others may be interested in using the new ‘–with-xxx’ options to
‘configure’. Updated documentation is available at:

There should be no changes to existing build functionality; if
something stops working for you, please file a bug in the tracker.

Johnathan C.
Corgan Enterprises LLC

I’m trying to do a build of all the pieces separately, to mimic what
pkgsrc would do. Here’s my script, which seems to build omnithread N
times. I’m a bit tired so may be overlooking something obvious:

The bug seems to be that I’m not specifying where omnithread comes from
during the core build, but it’s in --prefix, and the wiki page didn’t seem to explain.

[build log excerpt; full 250 KB on request]

Component omnithread passed configuration checks, but not building.
Component gnuradio-core requires omnithread, which is not being built or
specified via pre-installed files.
configure: error: Component gnuradio-core has errors, stopping.
make all-recursive
Making all in config
Making all in omnithread
Making install in config
Making install in omnithread
test -z “/usr/adroit/lib” || …/./install-sh -c -d “/usr/adroit/lib”
/bin/ksh …/libtool --mode=install /usr/bin/install -c
‘’ ‘/usr/adroit/lib/’
/usr/bin/install -c .libs/
(cd /usr/adroit/lib && { ln -s -f || { rm -f && ln -s; }; })
(cd /usr/adroit/lib && { ln -s -f || { rm -f && ln -s; }; })
/usr/bin/install -c .libs/libgromnithread.lai

build script follows:



echo -n "README.pkgsrc(gnuradio) START "; date

This file provides an example of how to build GNU Radio under pkgsrc.

this is ignored





bootstrap just once


for arg in $CONF_ENABLE_ARGS; do

echo "BUILDING WITH $arg"

# configure with just one module
LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib -L/usr/adroit/lib 

-R/usr/adroit/lib" CPPFLAGS="-I/usr/pkg/include -I/usr/adroit/include"
./configure --prefix=/usr/adroit $CONF_DISABLE_ALL $arg

# build

# install
sudo make install


#LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib -L/usr/adroit/lib
-R/usr/adroit/lib" CPPFLAGS="-I/usr/pkg/include -I/usr/adroit/include"
make distcheck

echo -n "README.pkgsrc<(gnuradio) FINISH "; date

rereading, I see this:

–with-omnithread Use package omnithread if installed in
$prefix/lib/pkgconfig; otherwise revert back
–with-gnuradio-core Use package gnuradio-core if installed in
$prefix/lib/pkgconfig; otherwise revert back

from a pkgsrc point of view, I’d like to see this be

use it from --prefix, and fail if not there.

the ‘build it if not there’ does not serve the cause of repeatable
builds, where things go exactly as planned, or you notice.
But, I realize that packaging systems may not be the only client.

It would be nice if needed and disabled things were just looked for in
prefix, and an error if not present, but I haven’t really pondered all
the use cases.