Random notes about software installation

From OCG Test Wiki

Jump to: navigation, search

Contents

[edit] BLAS

[edit] Reference BLAS

FC=gfortran
SUFF=gfortran40
wget http://www.netlib.org/blas/blas.tgz
tar xzf blas.tgz
cd BLAS
$FC -c *f
ar cr libblas-$SUFF.a *o


[edit] GotoBLAS

We disable SMP:

tar xzf GotoBLAS-1.05.tar.gz
cd GotoBLAS
# run ./quickbuild.64bit or
make F_COMPILER=PGI BINARY64=1 -j 8

[edit] LAPACK

[edit] AIX

$ cat make.inc
####################################################################
#  LAPACK make include file.                                       #
#  LAPACK, Version 3.1.1                                           #
#  February 2007                                                   #
####################################################################
#
# See the INSTALL/ directory for more examples.
#
SHELL = /bin/sh
#
#  The machine (platform) identifier to append to the library names
#
PLAT = _64
#
#  Modify the FORTRAN and OPTS definitions to refer to the
#  compiler and desired compiler options for your machine.  NOOPT
#  refers to the compiler options desired when NO OPTIMIZATION is
#  selected.  Define LOADER and LOADOPTS to refer to the loader and
#  desired load options for your machine.
#
FORTRAN  = xlf_r
OPTS     = -O3 -q64
DRVOPTS  = $(OPTS)
NOOPT    = -q64
LOADER   = xlf_r
LOADOPTS =  -q64
#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
#TIMER    = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
TIMER    = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
# TIMER    = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
# TIMER    = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER     = NONE
#
#  The archiver and the flag(s) to use when building archive (library)
#  If you system has no ranlib, set RANLIB = echo.
#
ARCH     = ar
ARCHFLAGS= -X 64 cr
RANLIB   = ranlib
#
#  The location of the libraries to which you will link.  (The
#  machine-specific, optimized BLAS library should be used whenever
#  possible.)
#
#BLASLIB      = ../../libblas$(PLAT).a
BLASLIB       = /usr/lib/libblas.a
LAPACKLIB    = liblapack$(PLAT).a
TMGLIB       = libtmglib$(PLAT).a
EIGSRCLIB    = libeigsrc$(PLAT).a
LINSRCLIB    = liblinsrc$(PLAT).a

[edit] AMD64

Enable -fPIC

cp make.inc.example  make.inc
make FORTRAN=gfortran LOADER=gfortran OPTS="-funroll-all-loops -O3 -fPIC" NOOPT=-fPIC PLAT=  LAPACKLIB=liblapack.a  lapacklib


[edit] Linux 32bit

Compile reference lapack with different Fortran compiler

wget -O - http://www.netlib.org/lapack/lapack.tgz | tar zxvf -
cd lapack-*
cp make.inc.example  make.inc
make FORTRAN=gfortran LOADER=gfortran OPTS="-funroll-all-loops -O3" NOOPT= PLAT=  \
 LAPACKLIB=liblapack-gfortran40.a  BLASLIB=libblas-gfortran40.a TIMER=INT_ETIME  blaslib lapacklib
mv -i liblapack-gfortran40.a BLAS/SRC/libblas-gfortran40.a /home/abarth/local/lib/
make clean
make FORTRAN=/home/abarth/local/gfortran-20080206/bin/gfortran LOADER=/home/abarth/local/gfortran-20080206/bin/gfortran \
 OPTS="-funroll-all-loops -O3" NOOPT= PLAT=   \
 LAPACKLIB=liblapack-gfortran43.a  BLASLIB=libblas-gfortran43.a TIMER=INT_ETIME  blaslib lapacklib
mv -i liblapack-gfortran43.a BLAS/SRC/libblas-gfortran43.a /home/abarth/local/lib/
make clean
make FORTRAN=/home/abarth/Download/open64-4.1/binroot/bin/openf95 \
 LOADER=/home/abarth/Download/open64-4.1/binroot/bin/openf95 \
 OPTS="-O3" NOOPT= PLAT=   LAPACKLIB=liblapack-openf95.a  \
 BLASLIB=libblas-openf95.a TIMER=INT_ETIME  blaslib lapacklib
mv -i liblapack-openf95.a BLAS/SRC/libblas-openf95.a /home/abarth/local/lib/
make clean
make FORTRAN=ifort LOADER=ifort OPTS="-O3" NOOPT= PLAT=   \
 LAPACKLIB=liblapack-ifort.a  BLASLIB=libblas-ifort.a TIMER=EXT_ETIME  blaslib lapacklib
mv -i liblapack-ifort.a BLAS/SRC/libblas-ifort.a /home/abarth/local/lib/
make clean

[edit] Python

  • Requirements:
    • BLAS
    • LAPACK

compiled with the system's Fortran compiler

  • Python 2.4.4
./configure --prefix=/opt/python2.4 --enable-shared
make
make install
echo /opt/python2.4/lib >> /etc/ld.so.conf.d/python2.4.conf
ldconfig
  • compile NetCDF --with-pic
./configure --with-pic
make 
make install
python setup.py build
python setup.py install

matplotlib requires png-devel.


python setup.py build
python setup.py install

[edit] scipy

ver=0.5.2
wget -O - "http://prdownloads.sourceforge.net/scipy/scipy-$ver.tar.gz?download" | tar zxvf -
cd scipy-$ver
#perl -pi -e "s/\#config.add_subpackage\('delaunay'\)/config.add_subpackage('delaunay')/" scipy/sandbox/setup.py
perl -pi -e "s/\#config.add_subpackage\('delaunay'\)/config.add_subpackage('delaunay')/" Lib/sandbox/setup.py
cat > site.cfg <<EOF
[fftw3]
library_dirs = /usr/lib64
include_dirs = /usr/include
fftw3_libs = fftw3

[atlas]
library_dirs = /usr/lib64/atlas
include_dirs = /usr/include/atlas
atlas_libs = atlas

[umfpack]
library_dirs = /usr/lib64
include_dirs = /usr/include/suitesparse
umfpack_libs = umfpack
EOF
python setup.py build
python setup.py install # as root


wget -O - 'http://sourcesup.cru.fr/frs/download.php/1034/ScientificPython-2.6.tar.gz' | tar zxvf -
cd ScientificPython-2.6/
python setup.py build
python setup.py install
  • install ipython
./configure --with-apxs=/usr/sbin/apxs2 --with-python=/opt/python2.4/bin/python
make 
make install
  • Appamor in /usr/bbin/httpd2-prefork:
    • add mr permission for files /opt/python2.4/**.{py,pyc,pth,so}
    • add mr permission for directory /opt/python2.4/site-packages

[edit] MPI

[edit] LAM/MPI

[edit] pgi

 ./configure --prefix=/home/abarth/local/lam-pgi CC=pgcc CXX=pgCC FC=pgf90 F77=pgf77

with

$ pgf90 -V
pgf90 6.1-2 64-bit target on x86-64 Linux

[edit] g95

./configure FC=g95 --prefix=/home/abarth/local64/lam-g95 && make && make install

with

$ g95 --version
G95 (GCC 4.0.3 (g95!) Jul  2 2006)
Copyright (C) 2002-2005 Free Software Foundation, Inc.

use this library with

 F90FLAGS += -I$(HOME)/local64/lam-g95/include
 LIBS +=   -L$(HOME)/local64/lam-g95/lib -llamf77mpi -lmpi -llam -lutil -lpthread -ldl

[edit] Intel Compiler

Source intel compilers:

. /opt/intel/cce/9.1.047/bin/iccvars.sh
. /opt/intel/fce/9.1.043/bin/ifortvars.sh

Compile

./configure --prefix=/opt/lam-intel FC=ifort F77=ifort CC=icc CXX=icpc
make -j 8
make install

with:

icc (ICC) 9.1 20070215
ifort (IFORT) 9.1 20070215

[edit] openmpi

Fortran interface with g95

./configure F77=g95 FC=g95 --prefix=/home/abarth/local64/openmpi-1.2.2-g95

Fortran interface with gfortran

./configure F77=gfortran FC=gfortran --prefix=/home/abarth/local-gcc

But openmpi-1.2.5 did not work on cpr.

./configure F77=gfortran FC=gfortran --prefix=/home/abarth/opt-gcc/openmpi-1.1.5

openmpi-1.1.5 did work on cpr


[edit] PGI

wget -O - http://www.open-mpi.org/software/ompi/v1.2/downloads/openmpi-1.2.6.tar.bz2 | tar jxvf -
cd openmpi-*
./configure F77=pgf90 FC=pgf90 --prefix=/home/abarth/local-pgf90 && make

[edit] OPeNDAP

Client library

export VER=3.7.10
wget -O - http://www.opendap.org/pub/source/libdap-$VER.tar.gz | tar zxvf -
cd libdap-$VER
./configure --prefix=$HOME/local/libdap-$VER
make
make check
make install
export PATH="/home/abarth/local/libdap-$VER/bin:$PATH"

NetCDF wrapper. dap-config must be in PATH.


export VER=3.7.0
wget -O - http://www.opendap.org/pub/source/libnc-dap-$VER.tar.gz | tar zxvf -
cd libnc-dap-$VER
./configure --prefix=$HOME/local/libnc-dap-$VER
make
make check
make install

[edit] Octave

Octave depends on gnuplot, qhull, curl, sparsesuite,...

[edit] gnuplot

export PREFIX=$HOME/local
wget http://downloads.sourceforge.net/gnuplot/gnuplot-4.2.3.tar.gz
tar zvxf  gnuplot-4.2.3.tar.gz 
cd gnuplot-4.2.3/
./configure --prefix=$PREFIX && make -j $JOBS
make install


On Fedora:

export ver=2.9.10
wget -O - ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-$ver.tar.bz2 | tar jxvf -
cd octave-$ver
./configure F77=gfortran --enable-shared --enable-dl --disable-static --prefix=/opt/octave-$ver && make -j 4
make install

If sparse suite is on non default location:

./configure F77=gfortran \
CPPFLAGS="-I$HOME/Download/UFconfig -I$HOME/Download/AMD/Include -I$HOME/Download/UMFPACK/Include -I$HOME/Download/CHOLMOD/Include -I$HOME/Download/COLAMD -I$HOME/Download/CCOLAMD -I$HOME/Download/CXSparse/Source " \
CFLAGS=-fPIC CXXFLAGS=-fPIC FFLAGS=-fPIC LDFLAGS="-L$HOME/Download/AMD/Lib -L$HOME/Download/UMFPACK/Lib -L$HOME/Download/CHOLMOD/Lib -L$HOME/Download/COLAMD -L$HOME/Download/CCOLAMD -L$HOME/Download/CXSparse/Source -lg2c -lpthread" \
--enable-shared --enable-dl --disable-static --prefix=$HOME/local64/octave-2.9.9 --with-blas=$HOME/Download/GotoBLAS/libgoto.a

[edit] qhull

Download and install qhull:

wget -O - http://www.qhull.org/download/qhull-2003.1.tar.gz | tar zxvf -
cd qhull-2003.1/
./configure F77=gfortran
make
make install


octave --eval 'pkg install geometry-1.0.2.tar.gz'

[edit] Install Octave in home directory

These are instruction to install octave including dependencies locally. The option -fPIC is necessary on AMD64 machines since octave uses shared libraries. Remove all non-gcc compiler from PATH.

# install location
export PREFIX=$HOME/local
export PREFIX=$HOME/local-gcc
export PICFLAG=-fPIC
export JOBS=8
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
# Download
wget http://www.fftw.org/fftw-3.1.2.tar.gz
wget http://www.qhull.org/download/qhull-2003.1.tar.gz
wget ftp://ftp.hdfgroup.org/HDF5/current/src/hdf5-1.8.0.tar.gz
wget ftp://ftp.gnu.org/gnu/glpk/glpk-4.9.tar.gz
wget http://curl.haxx.se/download/curl-7.18.2.tar.bz2
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz
wget http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.1.0.tar.gz
wget ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-3.0.1.tar.bz2

# Unpacking, compiling and installation

tar zxf fftw-3.1.2.tar.gz
cd fftw-3.1.2
./configure --disable-fortran --enable-shared --disable-static --prefix=$PREFIX && make -j $JOBS && make install
cd ..

tar zxf qhull-2003.1.tar.gz 
cd qhull-2003.1/
./configure --prefix=$PREFIX && make -j $JOBS && make install
cd ..
 
tar zxf hdf5-1.8.0.tar.gz
cd hdf5-1.8.0/
./configure --enable-shared --disable-static --prefix=$PREFIX --with-default-api-version=v16 && make -j $JOBS && make install 
cd ..

tar zxvf glpk-4.9.tar.gz
cd glpk-4.9
CFLAGS="-O2 $PICFLAG" ./configure  --prefix=$PREFIX && make -j $JOBS && make install
cd ..

tar jxf curl-*.tar.bz2
cd curl-*
./configure --enable-shared --disable-static --prefix=$PREFIX && make -j $JOBS && make install
cd ..

# now it gets complicated 
tar zxf SuiteSparse-*.tar.gz
cd SuiteSparse/
tar xzf ../metis-4.0.tar.gz
export "LD_LIBRARY_PATH=/u/software/acml3.6.0/gnu64/lib/:$LD_LIBRARY_PATH"
echo "CFLAGS=$PICFLAG -O" >> UFconfig/UFconfig.mk
echo "F77FLAGS=$PICFLAG -O" >> UFconfig/UFconfig.mk
echo "BLAS=-L/u/software/acml3.6.0/gnu64/lib/ -lacml -lacml_mv -lg2c -lm' >> UFconfig/UFconfig.mk
echo "LAPACK=" >> UFconfig/UFconfig.mk
echo "OPTFLAGS = -O2 $PICFLAG" >> metis-4.0/Makefile.in
echo "CFLAGS = -O3 $PICFLAG" >> CXSparse/Lib/Makefile
make -j $JOBS
mkdir $PREFIX/include/suitesparse
cp {AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,CXSparse,UMFPACK}/Lib/lib*a metis-4.0/libmetis.a $PREFIX/lib/
cp {AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,CXSparse,UMFPACK}/Include/*h UFconfig/UFconfig.h  $PREFIX/include/suitesparse
cd ..

tar jxf octave-*.tar.bz2
cd octave-*
./configure CPPFLAGS="-I$PREFIX/include" LDFLAGS="-L$PREFIX/lib -lmetis -L/u/software/acml3.6.0/gnu64/lib/ -lacml -lacml_mv -lg2c -lm" --prefix=$PREFIX
make  -j $JOBS && make install
cd ..

[edit] Packages

Some useful packages:

[edit] octcdf

tar zxf netcdf.tar.gz
cd netcdf-3.6.2 
./configure FC=ifort F77=ifort --with-pic --prefix=$PREFIX && make -j 3 && make check
make install

octave --eval 'pkg install -global -verbose octcdf-1.0.7.tar.gz '


[edit] arpack

For ARPACK: http://modb.oce.ulg.ac.be/mediawiki/index.php/How_to_compile_ARPACK

cd $HOME
wget -O - http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz | tar xzvf - 
wget -O - http://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz | tar xzvf -
cd ARPACK
make FC=gfortran FFLAGS=-fPIC MAKE=/usr/bin/make ARPACKLIB=$HOME/ARPACK/libarpack.a lib
octave --eval 'pkg install -global -verbose arpack-1.0.4.tar.gz '
octave --eval 'pkg install -global -verbose mapping-1.0.1.tar.gz'
octave --eval 'pkg install -global -verbose statistics-1.0.2.tar.gz'
module load pgi
export DL_LD="pgf90 -fPIC"
export F77="pgf90 -fPIC"
octave --eval 'pkg install -global -verbose optiminterp-0.2.4.tar.gz '
unset DL_LD
unset F77

octave --eval 'pkg install -global -verbose yapso-0.3.2.tar.gz '

[edit] Matlab

[edit] NetCDF in matlab

[edit] NetCDF

see http://ocgmod2.marine.usf.edu/mediawiki/index.php/NetCDF_installation

./configure CFLAGS=-fPIC CXXFLAGS=-fPIC FCFLAGS=-fPIC CPPFLAGS="-DNDEBUG -DpgiFortran"
make
make check
make install

[edit] mexnc

wget http://superb-west.dl.sourceforge.net/sourceforge/mexcdf/mexnc-2.0.19.tar.gz
tar xzf mexnc-2.0.19.tar.gz
cd mexnc
cp /usr/local/matlab2006a/bin/mexopts.sh .

add at the end of mexopts.sh

CFLAGS="$CFLAGS -I/home/oi/netcdf-3.6.1/include"
CLIBS="$CLIBS -L/home/oi/netcdf-3.6.1/lib -lnetcdf"

compile

make all

in matlab test mexnc

mexnc ( 'inq_libvers' )

[edit] NetCDF toolbox

wget http://easynews.dl.sourceforge.net/sourceforge/mexcdf/netcdf_toolbox-1.0.11.tar.gz
tar zxf netcdf_toolbox-1.0.11.tar.gz

add to startup.m

addpath /home/oi/matlab/mexnc
addpath /home/oi/matlab/netcdf_toolbox/netcdf -end
addpath /home/oi/matlab/netcdf_toolbox/netcdf/nctype -end
addpath /home/oi/matlab/netcdf_toolbox/netcdf/ncutility -end

test the toolbox in matlab

nc = netcdf('toto.nc','c');
nc('dim') = 10;
close(nc)
quit

look at the created file:

ncdump toto.nc

[edit] WFS ROMS Benchmarks

[edit] Microway

ocgcluster: 8 dual cores (16 cores total) AMD Opteron


Cores Compiler Time
8 cores (forced to run only on 4 dual-core CPUs) PGI 210.27 s
8 cores (allowed to run on any 8 dual-core CPUs) PGI 197.12 s
16 cores PGI 97.66 s


[edit] SGI

sgi: 2 quad core (8 cores total) Intel Xeon

Cores Compiler Time
8 cores Intel 83.963 s
8 cores gfortran 108.47 s

[edit] ASPSYS

2 quad core per node = 8 cores per node Intel(R) Xeon(R) CPU X5350 @ 2.66GHz

Cores Compiler Time
8 cores Intel -O3 -ip 156.39 s
32 cores Intel -O3 -ip

[edit] Linux Standard Base

Install LSB build environement from

wget http://ftp.linux-foundation.org/pub/lsb/lsbdev/released-3.1.0/binary/amd64/lsb-buildenv-3.1.1-1.x86_64.rpm
rpm -i lsb-buildenv-3.1.1-1.x86_64.rpm

see http://www.linux-foundation.org/en/Developers/LSB_Tutorial chroot to the build environment

chroot /opt/lsb-buildenv-x86_64 /bin/bash
bash -l

[edit] Download

cd /opt/lsb-buildenv-x86_64/tmp/work
wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.1.tar.bz2
wget http://www.mpfr.org/mpfr-current/mpfr-2.2.1.tar.bz2
wget ftp://ftp.dti.ad.jp/pub/lang/gcc/releases/gcc-4.2.1/gcc-4.2.1.tar.bz2
wget ftp://ftp.octave.org/pub/octave/bleeding-edge/octave-2.9.13.tar.bz2
wget http://www.fftw.org/fftw-3.1.2.tar.gz
wget ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
wget ftp://ftp.hdfgroup.org/HDF5/current/src/hdf5-1.6.5.tar.gz
wget  http://www.netlib.org/lapack/lapack-3.1.1.tgz
wget http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.0.0.tar.gz

[edit] Compile

export PREFIX_STATIC=/opt/static
export PREFIX=/opt/octave/
export LDFLAGS="-L$PREFIX/lib -L$PREFIX/lib64 -L$PREFIX_STATIC/lib -L$PREFIX_STATIC/lib64"
export CPPFLAGS="-I$PREFIX/include"
export LD_LIBRARY_PATH=/opt/octave/lib:/opt/octave/lib64/

# Static Libraries

tar jxf gmp-4.2.1.tar.bz2
cd gmp-4.2.1
./configure --disable-shared --enable-static --prefix=$PREFIX && make && make install

tar jxf mpfr-2.2.1.tar.bz2
cd mpfr-2.2.1
./configure --disable-shared --enable-static --prefix=$PREFIX && make && make install
 
tar jzf gcc-4.2.1.tar.bz2
mkdir gcc-obj
cd gcc-obj
../gcc-4.2.1/configure -enable-languages=c,c++,fortran --disable-multilib --prefix=$PREFIX && make
make install
  
export F77=$PREFIX/bin/gfortran
export FC=$PREFIX/bin/gfortran
export CC=$PREFIX/bin/gcc
export CXX=$PREFIX/bin/g++

tar zxvf lapack-3.1.1.tgz
cd lapack-3.1.1
cd BLAS/SRC
gfortran -fPIC -shared -Wl,-soname,libblas.so.3 -o libblas.so.3.1.1 *.f
cp libblas.so.3.1.1 ../..
cd ../..
ln -s libblas.so.3.1.1 libblas.so
cd SRC
cp /usr/src/rpm/SOURCES/Makefile.lapack .
make -f Makefile.lapack  FFLAGS="-fPIC -O" shared -j 2
cp liblapack.so.3.1.1 ..
cd ..
ln -s liblapack.so.3.1.1 liblapack.so
cp liblapack.so* libblas.so* $PREFIX/lib64/
tar zxf SuiteSparse-3.0.0.tar.gz 
cd SuiteSparse
tar zxf fftw-3.1.2.tar.gz
cd fftw-3.1.2
./configure --disable-fortran --enable-shared --disable-static --prefix=$PREFIX && make
make install

tar zxf readline-5.2.tar.gz 
cd readline-5.2
./configure  --enable-shared --disable-static --prefix=$PREFIX && make
make install

tar zxf hdf5-1.6.5.tar.gz
cd hdf5-1.6.5
./configure --disable-shared --enable-static --prefix=$PREFIX && make
make install

tar jzf octave-2.9.13.tar.bz2
cd octave-2.9.13
./configure  --enable-shared --enable-dl --disable-static --prefix=$PREFIX &&  make
make install

[edit] OpenGL

[edit] Mesa

On AMD64:

wget http://downloads.sourceforge.net/mesa3d/MesaLib-7.0.2.tar.bz2
tar jxf MesaLib-7.0.2.tar.bz2
cd Mesa-7.0.2/
make linux-x86-64-static
make install INSTALL_DIR=$HOME/local-gcc/

On Intel 32-bit:

tar jxf MesaLib-7.0.1.tar.bz2
cd Mesa-7.0.1/
make linux-x86-static
sudo mkdir /opt/mesa-7.0.1
sudo chown abarth.abarth /opt/mesa-7.0.1
make install INSTALL_DIR=/opt/mesa-7.0.1

[edit] FreeGLUT

wget -O - http://prdownloads.sourceforge.net/freeglut/freeglut-2.4.0.tar.gz | tar zxvf -
cd freeglut-2.4.0
./configure --prefix $HOME/local-gcc CPPFLAGS="-I$HOME/local/gcc/include" LDFLAGS="-L$HOME/local/gcc/lib64"
make
make install

[edit] Source RPM

Create envirionement

echo "%_topdir $HOME/rpm" > $HOME/.rpmmacros
mkdir $HOME/rpm
cd $HOME/rpm
mkdir SOURCES SPECS BUILD SRPMS
mkdir -p RPMS/i386 RPMS/x86_64 RPMS/i486 RPMS/i586 RPMS/i686 RPMS/noarch


Install of srpm

rpm -i somepackage-1.0-1.src.rpm

Start the build

cd $HOME/rpm/SPECS
rpmbuild -bb somepackage.spec

More info at: http://perso.b2b2c.ca/sarrazip/dev/rpm-building-crash-course.html

Example ATLAS

wget http://download.fedora.redhat.com/pub/fedora/linux/extras/6/SRPMS/atlas-3.6.0-11.fc6.src.rpm
rpm -i atlas-3.6.0-11.fc6.src.rpm
cd $HOME/rpm/SPECS
rpmbuild -bb atlas.spec

as root:

cd ~/rpm/RPMS/x86_64
rpm -i atlas-3.6.0-11.x86_64.rpm 
rpm -i atlas-devel-3.6.0-11.x86_64.rpm

[edit] GCC

export PREFIX=$HOME/opt-gcc/gcc-4.3.0
export JOBS=8

wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.3.0/gcc-4.3.0.tar.bz2
wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.bz2
wget http://www.mpfr.org/mpfr-current/mpfr-2.3.1.tar.bz2
 
tar jxf gmp-4.2.2.tar.bz2
cd gmp-4.2.2
./configure --disable-shared --enable-static --prefix $PREFIX
make -j $JOBS
make check
make install
cd ..
 
tar jxf mpfr-2.3.1.tar.bz2
cd mpfr-2.3.1
./configure --disable-shared --enable-static --prefix $PREFIX --with-gmp-include=$PREFIX/include --with-gmp-lib=$PREFIX/lib
make -j $JOBS
make check
make install 

tar jxf gcc-4.3.0.tar.bz2
mkdir gcc-objdir
cd gcc-objdir/
../gcc-4.3.0/configure --help
../gcc-4.3.0/configure --prefix $PREFIX --enable-languages=c,c++,fortran --enable-targets=x86_64-linux --with-gmp=$PREFIX --with-mpfr=$PREFIX
make -j $JOBS
make  install

[edit] Concurrent Versions System (CVS)

[edit] Import Source into CVS

  • First backup your sources
  • remove all non-source files (.o,.pyc,...)
  • Then:
export CVSROOT=:pserver:abarth@ocgmod1.marine.usf.edu:/var/cvs
cvs import -m "Python scripts for ocean model results" pyocean sample start
cd ..
cvs checkout pyocean