Cyrus 2.3.9: Errors compiling outside source directory

Bron Gondwana brong at fastmail.fm
Sat Sep 22 23:57:03 EDT 2007


On Sat, Sep 22, 2007 at 08:02:34PM -0700, Vincent Fox wrote:
> Bron Gondwana wrote:
> > Do you have the 'makedepend' utility on your system?  I found
> > that if it wasn't there, "make depend" would not get all the
> > dependencies in place.
> >   
> In Solaris, there is a makedepend in /usr/openwin/bin.  Hence my including
> that directory in PATH at top of script.  I suppose it might not be a 
> suitable
> version but I don't see anything going obviously wrong during the makedepend
> part of the compile.
> > Also, I agree that I've had problems with "make -j 5" and
> > fallen back to not parallelising, so there are probably other
> > missing dependencies too.  I guess the trick might be to run
> > "make clean" and then try building each target by hand (erm, by
> > which I mean script of course.  Who likes doing things by hand?)
> > and see what breaks!
> >
> >   
> 
> Yes, I also had make -j 2 in the previous version but removed that as one of
> the steps in trying to get it to build.  No dice.
> 
> I'll keep poking at it.  Building into a shared source directory leads to
> an undesirable messy situation when you have multiple hardware
> platforms and OS versions.

Here's what the cyrus specific bit of our build script looks like:

function build_package {
  get_file cyrus-imapd-$CYRUS_VERSION.tar.gz ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
  tar -zxf /src/cyrus-imapd-$CYRUS_VERSION.tar.gz
  cd cyrus-imapd-$CYRUS_VERSION
  svn co svn://svn.internal/$SVN_BRANCH/hm/conf/patches/cyrus_quilt patches
  quilt push -a || exit
  patch -p1 < /home/mod_perl/hm/conf/patches/cyrus-fastmailsecrets.diff || exit
  autoheader || exit
  autoconf || exit

  ./configure --with-auth=unix --without-krb \
    --with-perl=/usr/bin/perl \
    --enable-idled --with-idle=idled \
    --with-extraident=fmsvn$SVN_VERSION \
    --prefix=/usr/cyrus \
    --with-cyrus-prefix=/usr/cyrus \
    --with-com_err=/usr \
    --without-snmp \
    --enable-replication \
    --enable-pcreposix

  make depend || exit
  make all CFLAGS="-O2 -g" || exit
  make -C sieve test || exit

  make install DESTDIR=$BASEDIR/target
  install -o root -m 755 sieve/test $BASEDIR/target/usr/cyrus/bin/sieve-test
  install -o root -m 755 tools/rehash $BASEDIR/target/usr/cyrus/bin/rehash
  install -o root -m 755 tools/mkimap $BASEDIR/target/usr/cyrus/bin/mkimap
  install -o root -m 755 tools/translatesieve $BASEDIR/target/usr/cyrus/bin/translatesieve
  install -o root -m 755 tools/upgradesieve $BASEDIR/target/usr/cyrus/bin/upgradesieve

  cd $BASEDIR

  mkdir -p $BASEDIR/target/usr/src
  mv cyrus-imapd-$CYRUS_VERSION $BASEDIR/target/usr/src/

  tar -zc -f target/cyrus-fastmail.tar.gz -C $BASEDIR/target usr/cyrus
  tar -zc -f target/cyrus-fastmail-build.tar.gz -C $BASEDIR/target usr/src/cyrus-imapd-$CYRUS_VERSION

  alien --version="0fmsvn$SVN_VERSION" -k $BASEDIR/target/cyrus-fastmail.tar.gz
  alien --version="0fmsvn$SVN_VERSION" -k $BASEDIR/target/cyrus-fastmail-build.tar.gz
}

This generates the Debian packages we then install (yeah, hardly better
than tarballs, but at least our dependency tracking system handles them
nicely.  I do intend to build a _real_ Debian package one day.

get_file is a function which caches a copy of the package locally and
only re-fetches it if it's not present.  Very handy for building
somewhere random where you don't have a copy lying around - so long as
you have access to the subversion server it's all good (in some places
this is 127.0.0.1 and an ssh tunnel to the apropriate machine.  Mostly
it's just a VPN connection or the internal network)

Bron.


More information about the Info-cyrus mailing list