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:

http://gnuradio.org/trac/wiki/BuildConfiguration

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
http://corganenterprises.com/

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
http://gnuradio.org/trac/wiki/BuildConfiguration 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
‘libgromnithread.la’ ‘/usr/adroit/lib/libgromnithread.la’
/usr/bin/install -c .libs/libgromnithread.so.0.0
/usr/adroit/lib/libgromnithread.so.0.0
(cd /usr/adroit/lib && { ln -s -f libgromnithread.so.0.0
libgromnithread.so.0 || { rm -f libgromnithread.so.0 && ln -s
libgromnithread.so.0.0 libgromnithread.so.0; }; })
(cd /usr/adroit/lib && { ln -s -f libgromnithread.so.0.0
libgromnithread.so || { rm -f libgromnithread.so && ln -s
libgromnithread.so.0.0 libgromnithread.so; }; })
/usr/bin/install -c .libs/libgromnithread.lai
/usr/adroit/lib/libgromnithread.la

build script follows:

#!/bin</sh

$Id:

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

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

this is ignored

CONF_DOC_ARGS="
–enable-doxygen
–enable-dot
–enable-latex-docs
"

CONF_DISABLE_ALL=“–disable-all-components”

CONF_ENABLE_ARGS="
–enable-omnithread
–enable-gnuradio-core
–enable-pmt
–enable-mblock
–enable-usrp
–enable-gr-usrp
–enable-gr-audio-oss
–enable-gr-atsc
–enable-gr-wxgui
–enable-gr-utils
–enable-gnuradio-examples
"

CONF_DISABLE_ARGS="
–enable-gr-comedi
–enable-gr-cvsd-vocoder
–enable-gr-gpio
–enable-gr-gsm-fr-vocoder
–enable-gr-pager
–enable-gr-radar-mono
–enable-gr-radio-astronomy
–enable-gr-trellis
–enable-gr-video-sdl
–enable-gr-sounder
"

bootstrap just once

./bootstrap

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
make

# install
sudo make install

done

#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
to
–enable-omnithread
–with-gnuradio-core Use package gnuradio-core if installed in
$prefix/lib/pkgconfig; otherwise revert back
to
–enable-gnuradio-core

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.