[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GNU Stow and make install (DESTDIR)

From: Alexandru Csete
Subject: Re: [Discuss-gnuradio] GNU Stow and make install (DESTDIR)
Date: Thu, 6 Jan 2011 21:09:44 +0100

Hi Patrick,

I manage multiple versions of GNU Radio manually by simply installing
each under its own prefix and having a symbolic link "current" point
to whichever version I want to use. It is really easy:

1. Update local repository using "git pull"
2. Get unique version for the snapshot "git describe --abbrev=8"
    This gives something like v3.3.1git-817-g66768f6e
3. Build and install GNU Radio using
4. In /opt/gnuradio create a symlink pointing to the new version "ln
-s v3.3.1git-817-g66768f6e current"

I have my environment set up to include the stuff in /opt/gnuradio/current:

export PATH=$PATH:/opt/gnuradio/current/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gnuradio/current/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/gnuradio/current/lib/pkgconfig
export PYTHONPATH=$PYTHONPATH:/opt/gnuradio/current/lib/python2.6/site-packages

This way I can switch between versions by moving the symlink.
Removing an old version is done by deleting the whole folder
/opt/gnuradio/XYZ and does not rely on "make uninstall"

One could do the same with UHD. Until now I have simply installed it
in the same folder as GNU Radio.

This method also works with other software, even those that come as
binary only as long as they can be installed under custom prefix.


On Thu, Jan 6, 2011 at 7:51 PM, Patrick Strasser
<address@hidden> wrote:
> Hello!
> I tried to install GNU Radio with GNU Stow. I'd like to have several
> versions of GNU Radio that I can switch betwenn without rebuild. Stow
> seems to help much in that scenario. And it does a clean uninstall even
> if the build tree has changed since build.
> How install does _not_ work:
> ============================
> The Stow manual recommends[1]:
> ----------------------------
> 6.1.2 Other FSF software
> The Free Software Foundation, the organization behind the GNU project,
> has been unifying the build procedure for its tools for some time.
> Thanks to its tools `autoconf' and `automake', most packages now respond
> well to these simple steps, with no other intervention necessary:
> ./configure options
> make
> make install prefix=/usr/local/stow/package
> Hopefully, these tools can evolve to be aware of Stow-managed packages,
> such that providing an option to `configure' can allow `make' and `make
> install' steps to work correctly without needing to "fool" the build
> process.
> ----------------------------
> Unfortnately libtool does not like this way of installing:
> $ make install prefix=/usr/local/stow/package
> [...]
> test -z "/usr/local/stow/packag/lib" || /bin/mkdir -p
> "/usr/local/stow/packag/lib"
>  /bin/bash ../../../libtool   --mode=install /usr/bin/install -c
> libgnuradio-core.la '/usr/local/stow/packag/lib'
> libtool: install: error: cannot install `libgnuradio-core.la' to a
> directory not ending in /usr/local/lib
> [...]
> How install _does_ work:
> ============================
> You rather need to install with DESTDIR[2]:
> # full version
> STOWDIR=/usr/local/stow
> PACKAGE=gnuradio
> VERSION=3.3git
> PREFIX=/usr/local
> ./configure --prefix=${PREFIX}
> make
> sudo make install DESTDIR=${STOWDIR}/${PACKAGE}-${VERSION}
> stow -d ${STOWDIR} -t / ${PACKAGE}-${VERSION}
> Note: make install with DESTDIR installs everything with DESTDIR
> prepended. If PREFIX=/usr/local/, and DESTDIR=/usr/local/stow/package,
> files will end up under /usr/local/stow/package/usr/local/. Stow just
> moves files out of DESTDIR to the target directory. This is why the
> target has to be /-
> If you install to the standard paths, this can be simplified to
> # simple version
> PACKAGE=gnuradio
> ./configure
> make
> sudo make install DESTDIR=/usr/local/stow/${PACKAGE}-${VERSION}
> sudo stow -d /usr/local -t / ${PACKAGE}-${VERSION}
> If you get conflicts you probably have an old package version installed.
> You need to uninstall first.
> Uninstall:
> ==========
> List your stow packages:
> STOWDIR=/usr/local/stow
> The name of the directory is the name of the package.
> Unstow the currently installed version:
> sudo stow -d $STOWDIR -t/ -D package
> [1] http://www.gnu.org/software/stow/manual.html#SEC8
> [2] http://www.gnu.org/prep/standards/standards.html#DESTDIR
> ========================================
> I hope this information can help others manage their GNU Radio
> installations.
> Regards
> Patrick
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]