wiki:jazz/rmpi_deb

Rebuild Rmpi package for MPICH2

  • Default debian package r-cran-rmpi is depended on lam4 not mpich/mpich2
    Source: rmpi
    Section: math
    Priority: optional
    Maintainer: Dirk Eddelbuettel <edd@debian.org>
    Build-Depends: debhelper (>> 4.1.0), cdbs, r-base-dev (>= 2.4.0), lam-runtime, lam4-dev (>= 7.1.1-3.2)
    Standards-Version: 3.7.2
    
  • First, download source of rmpi package. Use apt-get build-dep to check the build dependence. Since LAN/MPI will confuse the configure of rmpi package, here we remove the related package which is installed by apt-get build-dep command.
    # apt-get source rmpi
    # apt-get build-dep rmpi
    # apt-get remove --purge lam-runtime lam4-dev
    # apt-get install autoconf automake
    # cd rmpi-0.5-3/
    ~rmpi-0.5-3# 
    
  • modified configure.in
    • rmpi-0.5-3/configure.in

      old new  
      1010)
      1111
      1212if test -z "$MPI_ROOT"; then
      13   for d in /opt/lib /usr/local/lib /usr/lib; do
       13  for d in /opt/lib /usr/local/lib /usr/lib /usr; do
      1414    if test -f $d/lam/include/mpi.h && test -f $d/lam/lib/libmpi.a; then
      1515      echo "I am here $d/lam"
      1616      MPI_ROOT=$d/lam
       
      2323      echo "I am here $d/mpich"
      2424      MPI_ROOT=$d/mpich
      2525      break
       26    elif test -f $d/include/mpich2/mpi.h; then
       27      echo "I am here $d/include/mpich2"
       28      MPI_ROOT=$d
       29      break
      2630    fi
      2731  done
      2832fi
       
      3842    elif test -f /usr/local/include/mpi.h; then
      3943         echo "Found in /usr/local/include"
      4044         MPI_INCLUDE="-I/usr/local/include"
       45    elif test -f /usr/include/mpich2/mpi.h; then
       46         echo "Found in /usr/include/mpich2"
       47         MPI_INCLUDE="-I/usr/include/mpich2"
      4148    else
      4249         echo "Cannot find mpi head file"
      4350         echo "Please use --with-mpi=/path/to/mpi or specify the environment variable MPI_ROOT"
  • run autoreconf to regenerate the configure file
    ~/rmpi-0.5-3# autoreconf
    
  • modified debian/control
    • rmpi-0.5-3/debian/control

      old new  
      22Section: math
      33Priority: optional
      44Maintainer: Dirk Eddelbuettel <edd@debian.org>
      5 Build-Depends: debhelper (>> 4.1.0), cdbs, r-base-dev (>= 2.4.0), lam-runtime, lam4-dev (>= 7.1.1-3.2)
       5Build-Depends: debhelper (>> 4.1.0), cdbs, r-base-dev (>= 2.4.0), libmpich2-1.0-dev
      66Standards-Version: 3.7.2
      77
      88Package: r-cran-rmpi
  • run dch -i for editing changlog
    ~/rmpi-0.5-3# export DEBFULLNAME="Jazz Yao-Tsung Wang"
    ~/rmpi-0.5-3# export DEBEMAIL="XXX@NCHC.ORG.TW"
    ~/rmpi-0.5-3# dch -i
    
    • debian/changelog

      old new  
       1rmpi (0.5-3-2mpich2) unstable; urgency=low
       2
       3  * modified configure.in and debian/control for mpich2
       4
       5 -- Jazz Yao-Tsung Wang <jazz@nchc.org.tw>  Thu, 10 Jul 2008 11:54:53 -0700
       6
  • run dpkg-buildpackage to build the new package
    ~/rmpi-0.5-3# dpkg-buildpackage
    
Last modified 15 years ago Last modified on Jan 31, 2010, 12:33:01 PM