You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2006/12/13 17:59:40 UTC

Build instructions on FC6.

The latest updates to the automake system require newer versions of some
packages. Here's what works on FC6

== Setting up on Fedora 6 ==

# yum install apr apr-devel boost boost-devel cppunit cppunit-devel
# yum install pkgconfig doxygen graphviz help2man

Download the latest source distribution of autoconf, automake, libtool
from URLs above and install each with something like:
# ./configure && make && sudo make-install

DO NOT install pkg-config from source! If installed in /usr/local,
pkg-config
cannot find packages installed in /usr. Installing in /usr will mess up
RPM's notion of what's installed. 

Here's the set of versions that works for me:
pkg-config 0.21
doxygen 1.5.1
help2man GNU help2man 1.36
autoconf autoconf (GNU Autoconf) 2.61
automake automake (GNU automake) 1.10
libtool ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18
22:14:06)
apr-1.2.7-10
boost-1.33.1-9.fc6
boost-devel-1.33.1-9.fc6
cppunit-1.12.0-2.fc6
cppunit-devel-1.12.0-2.fc6
graphviz-2.8-5.fc6



Re: Build instructions on FC6.

Posted by Jim Meyering <ji...@meyering.net>.
Kim van der Riet <ki...@redhat.com> wrote:
> Here is one set of URLs:
>
> http://ftp.gnu.org/gnu/autoconf/
> http://ftp.gnu.org/gnu/automake/
> http://www.gnu.org/software/libtool/libtool.html

Here's a preliminary version of the script I proposed yesterday.
It should download and build most of the from-source packages required,
as well as install them into the directory (presumably in your PATH)
that you specify.

Assuming the script is named "qpid-autotools-install",
here's the output of "./qpid-autotools-install --help":

    Usage: ./qpid-autotools-install [OPTION]...
    Download, build, and install some tools.

    Options:
     --prefix=PREFIX    install tools under specified directory
     --skip-check       do not run make check (this can save 50+ min)
     --help             display this help and exit

    For example, to install programs into /usr/local/bin, run this command:

      qpid-autotools-install --prefix=/usr/local

    If you've already verified that your system/environment can build working
    versions of these tools, you can make this script complete in just a
    minute or two (rather than about an hour if you let all make check
    tests run) by invoking it like this:

      qpid-autotools-install --prefix=/usr/local --skip-check

----------------------------
Note the suggestions it gives you at the end about setting
PATH and PKG_CONFIG_PATH.

########################################################################
#!/bin/sh
# Written by Jim Meyering

VERSION='2006-12-13 19:46' # UTC

prog_name=`basename $0`
die () { echo "$prog_name: $*" >&2; exit 1; }

usage() {
  echo >&2 "\
Usage: $0 [OPTION]...
Download, build, and install some tools.

Options:
 --prefix=PREFIX    install tools under specified directory
 --skip-check       do not run "make check" (this can save 50+ min)
 --help             display this help and exit

For example, to install programs into /usr/local/bin, run this command:

  $prog_name --prefix=/usr/local

If you've already verified that your system/environment can build working
versions of these tools, you can make this script complete in just a
minute or two (rather than about an hour if you let all "make check"
tests run) by invoking it like this:

  $prog_name --prefix=/usr/local --skip-check

"
}

# Get the listed tarballs into the current directory.
get_sources()
{
  case `wget --help` in
    *'--no-cache'*)
      WGET_COMMAND='wget -nv --no-cache';;
    *'--cache=on/off'*)
      WGET_COMMAND='wget -nv --cache=off';;
    *'--non-verbose'*)
      WGET_COMMAND='wget -nv';;
    *)
      WGET_COMMAND='';;
  esac

  # FIXME handle case of no WGET

  # Download the following, each along with its signature.
  tarballs='
    http://pkgconfig.freedesktop.org/releases/pkg-config-0.21.tar.gz
    ftp://ftp.gnu.org/gnu/m4/m4-1.4.8.tar.gz
    ftp://ftp.gnu.org/gnu/automake/automake-1.10.tar.gz
    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz
    ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.22.tar.gz
  '
  pkgs=
  for t in $(echo $tarballs); do
    base=$(basename $t)
    pkgs="$pkgs $base"
    test -f $base     || $WGET_COMMAND $t

    # pkg-config has no .sig file.
    case $base in pkg-config*) continue;; esac

    test -f $base.sig || $WGET_COMMAND $t.sig
    # Verify each signature.
    gpg --quiet --verify --trust-model=always	\
        --no-default-keyring			\
        --trusted-key='32419B785D0CDCFC'	\
        --trusted-key='3859C03B2E236E47'	\
        --trusted-key='B93F60C6B5C4CE13'	\
        --trusted-key='F382AE19F4850180'	\
        $base.sig > /dev/null 2>&1		\
      || die "bad signature for $base"
  done
  echo $pkgs
}

#################################################################
set -e

# Parse options.

make_check=yes
prefix=

for option
do
  case $option in
    --help) usage; exit;;
    --skip-check) make_check=no;;
    --prefix=*) prefix=`expr "$option" : '--prefix=\(.*\)'`;;
    *) die "$option: unknown option";;
  esac
done

test -n "$prefix" \
  || die "you must specify a --prefix"

# Don't run as root.
# Make sure id -u succeeds.
my_uid=`id -u`
test $? = 0 || {
  echo "$0: cannot run \`id -u'" 1>&2
  (exit 1); exit 1
}
test $my_uid = 0 && die "please don't run this program as root"

# Ensure that prefix is not /usr/bin or /bin, /sbin, etc.
case $prefix in
  /bin|/sbin|/usr/bin|/usr/sbin)
    die "don't set PREFIX to a system directory";;
  *) ;;
esac

# FIXME: create temp directory, named e.g., .build-auto-tools
# then cd into it for the rest....

pkgs=$(get_sources)

for pkg in $pkgs; do
  echo building/installing $pkg...
  dir=$(basename $pkg .tar.gz)
  rm -rf dir
  gzip -dc $pkg|tar xf -
  cd $dir
  ./configure CFLAGS=-O2 LDFLAGS=-s --prefix=$prefix	> makerr-config  2>&1
  make -j1						> makerr-build   2>&1
  if test "$make_check" = yes; then
    case $pkg in
      automake*) expected_duration_minutes=40;;
      autoconf*) expected_duration_minutes=15;;
      # libtool*) expected_duration_minutes=3;;
      *);;
    esac
    test -n "$expected_duration_minutes" \
      && echo "running 'make check' for $pkg; NB: this can take over" \
	      "$expected_duration_minutes minutes"
    make -j1 check					> makerr-check   2>&1
  fi
  make -j1 install					> makerr-install 2>&1
  echo done at $(date +%Y-%m-%d.%T)
  cd ..
done

# Without checks (and with existing tarballs), it takes just one minute.
# Including all checks, it takes nearly an hour on an AMD64/3400+

case $PKG_CONFIG_PATH in
  $prefix/lib/pkgconfig:/usr/lib/pkgconfig);;
  *) cat <<EOF ;;
**************************************************************************
Be sure that PKG_CONFIG_PATH is set in your environment, e.g.,
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib/pkgconfig
**************************************************************************
EOF
esac

cat <<EOF
**************************************************************************
Be sure that "$prefix/bin" is earlier in your PATH than /bin, /usr/bin, etc.
**************************************************************************
EOF

## Local Variables:
## eval: (add-hook 'write-file-hooks 'time-stamp)
## time-stamp-start: "VERSION='"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
## time-stamp-time-zone: "UTC"
## time-stamp-end: "' # UTC"
## End:

Re: Build instructions on FC6.

Posted by Kim van der Riet <ki...@redhat.com>.
Here is one set of URLs:

http://ftp.gnu.org/gnu/autoconf/
http://ftp.gnu.org/gnu/automake/
http://www.gnu.org/software/libtool/libtool.html


Kim
On Thu, 2006-12-14 at 09:18 -0500, Kim van der Riet wrote:
> BTW, what is the URL for downloading? You mentioned "URLs above", but
> I
> don't see them.
> 


Re: Build instructions on FC6.

Posted by Kim van der Riet <ki...@redhat.com>.
I assume that these requirements are being checked for in autoconf...
yet I get no warning of the fact that I am using an older version of
automake. Shouldn't there be some sort of warning if automake < 1.10?
Similarly for autoconf itself and libtool, since these must be updated
from source.

BTW, what is the URL for downloading? You mentioned "URLs above", but I
don't see them.

Kim

On Wed, 2006-12-13 at 11:59 -0500, Alan Conway wrote:
> The latest updates to the automake system require newer versions of some
> packages. Here's what works on FC6
> 
> == Setting up on Fedora 6 ==
> 
> # yum install apr apr-devel boost boost-devel cppunit cppunit-devel
> # yum install pkgconfig doxygen graphviz help2man
> 
> Download the latest source distribution of autoconf, automake, libtool
> from URLs above and install each with something like:
> # ./configure && make && sudo make-install
> 
> DO NOT install pkg-config from source! If installed in /usr/local,
> pkg-config
> cannot find packages installed in /usr. Installing in /usr will mess up
> RPM's notion of what's installed. 
> 
> Here's the set of versions that works for me:
> pkg-config 0.21
> doxygen 1.5.1
> help2man GNU help2man 1.36
> autoconf autoconf (GNU Autoconf) 2.61
> automake automake (GNU automake) 1.10
> libtool ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18
> 22:14:06)
> apr-1.2.7-10
> boost-1.33.1-9.fc6
> boost-devel-1.33.1-9.fc6
> cppunit-1.12.0-2.fc6
> cppunit-devel-1.12.0-2.fc6
> graphviz-2.8-5.fc6
> 
>