Compiling Davinci

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
 
(45 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{DavinciWiki_Download|Compiling Instructions|
+
=== Source ===
  
'''Standard Linux Building Procedure'''
+
* SVN: http://oss.mars.asu.edu/svn/davinci/davinci/trunk/
./configure
+
make
+
make install
+
  
  
'''Operating System: Mac OS X 10.4.8'''
+
== Dependencies ==
 +
Davinci has the following optional dependencies it will search for. Davinci will operate without these but some functions may not be available.
 +
* Readline
 +
* X11/Xt
 +
* Motif
 +
* HDF5
 +
* Vicar
 +
* libisis
 +
* FITS
 +
* QMV
 +
* libisis3
 +
* Qt4
  
'''Dependencies'''
+
It may also be useful to set the display program with --with-viewer=foo, the text editor with --with-editor=foo, and the plotting program with --with-gnuplot=foo
*Mac OS X 10.4.X
+
 
*Xcode2
+
== Standard Linux Building Procedure ==
*Apple X11 or XDarwin
+
 
 +
As root type the following commands.
 +
$ ./configure
 +
$ make
 +
$ make install
 +
 
 +
If you are installing Davinci for the first time, you may need to set your .dvrc file to load the Davinci Scripts Library as detailed in [[Installation_FAQ]].
 +
 
 +
 
 +
== Operating System: Mac OS X 10.6.4 ==
 +
 
 +
=== Dependencies ===
 +
*Mac OS X 10.6.x
 +
*Xcode 3.2 (with X11)
 +
*MacPorts ([http://www.macports.org/install.php Download])
 
*xv ([http://homepage.mac.com/eric.lee/xv/xv-3.10a-darwin.zip binary])
 
*xv ([http://homepage.mac.com/eric.lee/xv/xv-3.10a-darwin.zip binary])
*#Unzip and move to /usr/local
+
**Unzip and move to /usr/local/bin or /opt/local/bin
*gnuplot  
+
*gnuplot
*# download and install aquaterm ([http://downloads.sourceforge.net/aquaterm/AquaTerm1.0.0.dmg?modtime&#611126972696&big_mirror=0 source])
+
$ sudo port install gnuplot
*# download and install gnuplot ([http://downloads.sourceforge.net/gnuplot/Gnuplot-4.0.0.dmg?modtime=1098884180&big_mirror=0 source])
+
*hdf5
*hdf5 ([ftp://ftp.hdfgroup.org/HDF5/current/src source])
+
$ sudo port install hdf5
*#configure with "./configure --enable-hdf5v1_4=yes --prefix=/usr/local"
+
 
*#make  
+
=== Installation Procedure ===
*#sudo make install
+
# Download the most recent davinci [[Download_Davinci|source]]
**NOTE: also requires zlib (should already be installed [ftp://ftp.hdfgroup.org/lib-external/zlib/1.2/src source])
+
$ tar zxf davinci-x.xx
 +
$ cd davinci-x.xx/
 +
$ env CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ./configure
 +
$ make
 +
$ sudo make install
  
'''Installation Procedure'''
+
=== Installation Procedure ===
 
# Download the most recent davinci [[Download_Davinci|source]] -- This includes iomedley and readline
 
# Download the most recent davinci [[Download_Davinci|source]] -- This includes iomedley and readline
 
# unpack by either double clicking on the zipped tarball or by typing tar -xzpf davinci-1.xx in the directory where davinci was downloaded  
 
# unpack by either double clicking on the zipped tarball or by typing tar -xzpf davinci-1.xx in the directory where davinci was downloaded  
# change in to the davinci-1.xx directory.  The steps below will compile davinci for mac without aqua (with X11).  Remove "--disable-aqua"
+
# change in to the davinci-1.xx directory.  The steps below will compile davinci for mac without aqua (with X11).  Remove "--disable-aqua" for a non-X11 compile.  The --prefix allows the user to specify the installation directory.
# for a non-X11 compile.  The --prefix allows the user to specify the  
+
$ ./configure --prefix="INSTALL DIRECTORY"
# ./configure --prefix="INSTALL DIRECTORY"
+
$ make
# make
+
$ sudo make install
# sudo make install -- if you want to install it into your standard bin directory
+
  
 +
== Operating System: Solaris 10 (Sparc) 64-bit Ultra 4==
  
'''Operating System: Mandriva Linux 2007'''
+
The method was tested in 64 bit Solaris 10 (SPARC) Ultra 4.
  
'''Dependencies'''
+
Davinci is installed using GNU gcc although some dependencies like HDF5 are easier installed using [http://developers.sun.com/sunstudio/downloads/index.jsp|Sun Studio 12].
  
*libhdf5, libhdf5-devel (HDF support)
+
=== Dependencies Installation (Not required, but highly recommended) ===
*libltdl, ltdl-devel (fixes error regarding ltdl, or "libtool dynamic linking")
+
 
*libxorg-x11, libxorg-x11-devel (X11 support - for GUI module)
+
* [http://tiswww.case.edu/php/chet/readline/rltop.html| Readline]
*lesstif, lesstif-devel (Motif development files - for GUI module)
+
You can install a pre-built version of readline in [http://www.sunfreeware.com Freeware for Solaris website] .
*libreadline, libreadline-devel (might not be necessary, but no harm in trying)
+
The easiest way to install readline is through [http://www.bolthole.com/solaris/pkg-get.html pkg-get]. First you install pkg-get (Typically in /opt/csw ) and then you can install the readline as follows:
*libtermcap, libtermcap-devel (related to readline)
+
pkg-get install readline
*libncurses, libncurses-devel (also related to readline)
+
 
+
* [http://www.gnuplot.info| Gnuplot]
'''Installation Procedure'''
+
You can install a pre-built version of Gnuplot in [http://www.sunfreeware.com Freeware for Solaris website] .
   
+
The easiest way to install readline is through [http://www.bolthole.com/solaris/pkg-get.html pkg-get]. First you install pkg-get (Typically in /opt/csw ) and then you can install the readline as follows:
#As root, type "urpmi [name]" to install, or use drakrpm for a menu interface):
+
pkg-get install gnuplot
#Install all dependencies listed above
+
 
#Reboot after installing dependencies, (this may have fixed an error that occurred while making readline)
+
* [ftp://ftp.hdfgroup.org/HDF5 HDF5] (Version 1.82)
#change into the iomedley directory
+
HDF5 can be built using  [http://developers.sun.com/sunstudio/downloads/index.jsp Sun Studio 12]
#"./configure"
+
 
#"make"
+
Once Sun Studio is installed, set the environment variables CC and CXX as follows (Assuming C Shell)
#change to the davinci directory
+
setenv CC cc
#"./configure"
+
  setenv CXX cc
#"make"
+
#"make install"
+
   
+
 
   
 
   
 +
./configure
 +
make
  
 +
make install
  
''' Building Davinci for Linux in 64-bit AMD Opteron(tm) '''
+
=== Davinci Installation ===
 +
Davinci can be installed using GCC  so the CC variables have to be changed back to gcc
 +
This configuration was used on a test Solaris 10 Sparc 64-bit system and Davinci was built successfully. You may not necessarily follow these steps.
 +
 
 +
'''Building Utilities'''
 +
 
 +
- gcc: /usr/sfw/bin/gcc
 +
 
 +
- make: /usr/sfw/bin/make -> /usr/sfw/bin/gmake
 +
 
 +
setenv PATH ${PATH}:/usr/sfw/bin
 +
setenv PATH ${PATH}:/usr/csw/bin
 +
setenv PATH ${PATH}:/usr/ccs/bin
 +
 
 +
setenv CC /usr/sfw/bin/gcc
 +
setenv CXX /usr/sfw/bin/gcc
 +
 
 +
Assuming davinci is installed under /opt/local
 +
 
 +
mkdir /opt/local/davinci-{version}
 +
mkdir /opt/local/davinci-{version}/share
 +
mkdir /opt/local/davinci-{version}/include
 +
mkdir /opt/local/davinci-{version}/lib
 +
mkdir /opt/local/davinci-{version}/bin
 +
 
 +
Configure and Make (as a user)
 +
  ./configure -prefix=/opt/local/davinci-{version} \
 +
--with-help=/opt/local/davinci-{version}/share/davinci/docs/dv.gih  \
 +
--with-modpath=/opt/local/davinci-{version}/lib/davinci \
 +
 
 +
If readline is installed in some location not found by the configure  set the path to it (For example if installed under /opt/csw add '''--with-readline=/opt/csw''' )
 +
 
 +
If HDF5 is installed in some location not found by the configure  set the path to it (For example if installed under /opt/local add  '''--with-hdf5=/opt/local''')
 +
 
 +
If Gnuplot is installed in some location not found by the configure  set the path to it (For example if the binary ois located in /opt/csw/bin/gnuplot add  '''--with-gnuplot=/opt/csw/bin/gnuplot''')
 +
 
 +
make
 +
 
 +
If the "install" script is missing from your path, use /usr/ucb/install
 +
setenv PATH /usr/ucb:${PATH}
 +
 
 +
At the  end perform the installation as root
 +
make install
 +
 
 +
== Building Davinci for Linux 64-bit ==
  
 
The position independent code needs to be enabled. For example
 
The position independent code needs to be enabled. For example
  ./configure CFLAGS="-fpic"
+
  ./configure
 
  make
 
  make
  make install  
+
  make install
  
 +
To add ISIS3 reading (and eventually write) support:
 +
./configure --with-isis3=/mars/common/isis3/x86_64/isis \
 +
CFLAGS="-fpic" QTDIR=/usr/lib64/qt4
 +
make
 +
make install
  
''' Building Davinci for Mars Space Flight Facility '''
+
For a more complete build, configure with
 +
./configure --with-isis3=/mars/common/isis3/x86_64_Linux/isis \
 +
CFLAGS="-fpic" QTDIR=/usr/lib64/qt4 \
 +
--enable-libisis=/mars/common/isis/isisr/
 +
--with-qmv=/mars/common/qmv/ \
 +
--with-readline=/usr/lib64
 +
make
 +
make install
 +
 
 +
 
 +
For the latest versions of ubuntu this command has woreked well:
 +
./configure --prefix=/usr \
 +
--disable-libisis \
 +
--with-modpath=/usr/lib64/davinci \
 +
--with-help=/usr/share/davinci/docs/dv.gih \
 +
CFLAGS=-fPIC CXXFLAGS=-fPIC \
 +
--disable-jbig --disable-lzma
 +
make
 +
make install
  
 +
== Building Davinci for Mars Space Flight Facility ==
  
 +
For CentOS5 machines
  
 +
To isolate each Davinci version from other versions, separate directories are created under /mars/common/ as follows:
  
To isolate each Davinci version from other versions, separate directories are created under /usr/local/. For example if you're building davinci 1.69
+
Create new Directories. Replace {version} with new version number (e.g. 1.70)
  $ mkdir /usr/local/davinci-1.69
+
mkdir /mars/common/davinci-{version}
 +
  mkdir /mars/common/davinci-{version}/share
 +
mkdir /mars/common/davinci-{version}/include
 +
mkdir /mars/common/davinci-{version}/lib
 +
mkdir /mars/common/davinci-{version}/bin
  
$ ./configure --prefix=/usr/local/davinci-1.69 \
+
Build and Install
  --with-help=/usr/local/davinci-1.69/share/davinci/docs/dv.gih  \
+
  ./configure --prefix=/mars/common/davinci-{version} \
  --with-modpath=/usr/local/davinci-1.69/lib/davinci  
+
  --with-help=/mars/common/davinci-{version}/share/davinci/docs/dv.gih  \
 +
  --with-modpath=/mars/common/davinci-{version}/lib/davinci \
 +
--enable-libisis=/mars/common/isis/isisr \
 +
--with-qmv=/mars/common/qmv
  
 
  $ make
 
  $ make
Line 86: Line 190:
 
  $ make install
 
  $ make install
  
 +
Test it out by running
 +
/mars/common/davinci-{version}/bin/davinci
 +
dv>install_check()
  
 +
If you see no significant errors, Then (make it official) by create new symlinks
 +
ln -sni /mars/common/davinci-{version}  /mars/common/davinci
 +
 +
Make it davinci group writable
 +
chgrp -R davinci /mars/common/davinci
 +
chmod -R 775 /mars/common/davinci
 +
 +
== Building RPM ==
 +
 +
'''This is outdated and wrong'''
  
''' Building RPM '''
 
  
 
Before you start building rpms, make sure you have rpmbuild installed.  
 
Before you start building rpms, make sure you have rpmbuild installed.  
Line 97: Line 213:
 
Building process as non-root user:
 
Building process as non-root user:
  
  $ mkdir davinci
+
  mkdir davinci
  $ svn checkout file:///tes/svn/dev/davinci/trunk davinci
+
  svn checkout http://oss.mars.asu.edu/svn/davinci/davinci/trunk davinci
  $ svn checkout file:///tes/svn/dev/davinci_build/trunk/linux davinci/build_utils
+
  svn checkout http://oss.mars.asu.edu/svn/davinci/davinci_build/trunk/linux davinci/build_utils
  $ cd davinci/build_utils
+
  cd davinci/build_utils
  $ ./build_rpm
+
  ./build_rpm
  
 
If everything went alright, the rpm files should be created on the  davinci/build_utils directory.
 
If everything went alright, the rpm files should be created on the  davinci/build_utils directory.
Line 121: Line 237:
 
*Examples /usr/share/davinci/examples
 
*Examples /usr/share/davinci/examples
 
*Library Scripts /usr/share/davinci/library
 
*Library Scripts /usr/share/davinci/library
 
}}
 

Latest revision as of 08:41, 21 August 2019

Contents

[edit] Source


[edit] Dependencies

Davinci has the following optional dependencies it will search for. Davinci will operate without these but some functions may not be available.

* Readline
* X11/Xt
* Motif
* HDF5
* Vicar
* libisis
* FITS
* QMV
* libisis3
* Qt4

It may also be useful to set the display program with --with-viewer=foo, the text editor with --with-editor=foo, and the plotting program with --with-gnuplot=foo

[edit] Standard Linux Building Procedure

As root type the following commands.

$ ./configure
$ make
$ make install

If you are installing Davinci for the first time, you may need to set your .dvrc file to load the Davinci Scripts Library as detailed in Installation_FAQ.


[edit] Operating System: Mac OS X 10.6.4

[edit] Dependencies

  • Mac OS X 10.6.x
  • Xcode 3.2 (with X11)
  • MacPorts (Download)
  • xv (binary)
    • Unzip and move to /usr/local/bin or /opt/local/bin
  • gnuplot
$ sudo port install gnuplot
  • hdf5
$ sudo port install hdf5

[edit] Installation Procedure

  1. Download the most recent davinci source
$ tar zxf davinci-x.xx
$ cd davinci-x.xx/
$ env CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ./configure
$ make
$ sudo make install

[edit] Installation Procedure

  1. Download the most recent davinci source -- This includes iomedley and readline
  2. unpack by either double clicking on the zipped tarball or by typing tar -xzpf davinci-1.xx in the directory where davinci was downloaded
  3. change in to the davinci-1.xx directory. The steps below will compile davinci for mac without aqua (with X11). Remove "--disable-aqua" for a non-X11 compile. The --prefix allows the user to specify the installation directory.
$ ./configure --prefix="INSTALL DIRECTORY"
$ make
$ sudo make install

[edit] Operating System: Solaris 10 (Sparc) 64-bit Ultra 4

The method was tested in 64 bit Solaris 10 (SPARC) Ultra 4.

Davinci is installed using GNU gcc although some dependencies like HDF5 are easier installed using Studio 12.

[edit] Dependencies Installation (Not required, but highly recommended)

You can install a pre-built version of readline in Freeware for Solaris website . The easiest way to install readline is through pkg-get. First you install pkg-get (Typically in /opt/csw ) and then you can install the readline as follows:

pkg-get install readline

You can install a pre-built version of Gnuplot in Freeware for Solaris website . The easiest way to install readline is through pkg-get. First you install pkg-get (Typically in /opt/csw ) and then you can install the readline as follows:

pkg-get install gnuplot
  • HDF5 (Version 1.82)

HDF5 can be built using Sun Studio 12

Once Sun Studio is installed, set the environment variables CC and CXX as follows (Assuming C Shell)

setenv CC cc
setenv CXX cc

./configure
make
make install

[edit] Davinci Installation

Davinci can be installed using GCC so the CC variables have to be changed back to gcc This configuration was used on a test Solaris 10 Sparc 64-bit system and Davinci was built successfully. You may not necessarily follow these steps.

Building Utilities

- gcc: /usr/sfw/bin/gcc

- make: /usr/sfw/bin/make -> /usr/sfw/bin/gmake

setenv PATH ${PATH}:/usr/sfw/bin
setenv PATH ${PATH}:/usr/csw/bin
setenv PATH ${PATH}:/usr/ccs/bin
 
setenv CC /usr/sfw/bin/gcc
setenv CXX /usr/sfw/bin/gcc

Assuming davinci is installed under /opt/local

mkdir /opt/local/davinci-{version}
mkdir /opt/local/davinci-{version}/share
mkdir /opt/local/davinci-{version}/include
mkdir /opt/local/davinci-{version}/lib
mkdir /opt/local/davinci-{version}/bin

Configure and Make (as a user)

 ./configure -prefix=/opt/local/davinci-{version} \
--with-help=/opt/local/davinci-{version}/share/davinci/docs/dv.gih  \
--with-modpath=/opt/local/davinci-{version}/lib/davinci \

If readline is installed in some location not found by the configure set the path to it (For example if installed under /opt/csw add --with-readline=/opt/csw )

If HDF5 is installed in some location not found by the configure set the path to it (For example if installed under /opt/local add --with-hdf5=/opt/local)

If Gnuplot is installed in some location not found by the configure set the path to it (For example if the binary ois located in /opt/csw/bin/gnuplot add --with-gnuplot=/opt/csw/bin/gnuplot)

make

If the "install" script is missing from your path, use /usr/ucb/install

setenv PATH /usr/ucb:${PATH}

At the end perform the installation as root

make install

[edit] Building Davinci for Linux 64-bit

The position independent code needs to be enabled. For example

./configure
make
make install

To add ISIS3 reading (and eventually write) support:

./configure --with-isis3=/mars/common/isis3/x86_64/isis \
CFLAGS="-fpic" QTDIR=/usr/lib64/qt4
make
make install

For a more complete build, configure with

./configure --with-isis3=/mars/common/isis3/x86_64_Linux/isis \
CFLAGS="-fpic" QTDIR=/usr/lib64/qt4 \
--enable-libisis=/mars/common/isis/isisr/
--with-qmv=/mars/common/qmv/ \
--with-readline=/usr/lib64
make
make install


For the latest versions of ubuntu this command has woreked well:

./configure --prefix=/usr \
--disable-libisis \
--with-modpath=/usr/lib64/davinci \
--with-help=/usr/share/davinci/docs/dv.gih \
CFLAGS=-fPIC CXXFLAGS=-fPIC \
--disable-jbig --disable-lzma
make
make install

[edit] Building Davinci for Mars Space Flight Facility

For CentOS5 machines

To isolate each Davinci version from other versions, separate directories are created under /mars/common/ as follows:

Create new Directories. Replace {version} with new version number (e.g. 1.70)

mkdir /mars/common/davinci-{version}
mkdir /mars/common/davinci-{version}/share
mkdir /mars/common/davinci-{version}/include
mkdir /mars/common/davinci-{version}/lib
mkdir /mars/common/davinci-{version}/bin

Build and Install

 ./configure --prefix=/mars/common/davinci-{version} \
--with-help=/mars/common/davinci-{version}/share/davinci/docs/dv.gih  \
--with-modpath=/mars/common/davinci-{version}/lib/davinci \
--enable-libisis=/mars/common/isis/isisr \
--with-qmv=/mars/common/qmv
$ make
$ make install

Test it out by running

/mars/common/davinci-{version}/bin/davinci
dv>install_check()

If you see no significant errors, Then (make it official) by create new symlinks

ln -sni /mars/common/davinci-{version}  /mars/common/davinci

Make it davinci group writable

chgrp -R davinci /mars/common/davinci
chmod -R 775 /mars/common/davinci

[edit] Building RPM

This is outdated and wrong


Before you start building rpms, make sure you have rpmbuild installed. Probably you want to have a FITS and HDF5 support. You can either get them in the official websites, or just easier in http://www.rpmfind.net. Package names: cfitsio, cfitsio-devel, hdf5, hdf5-devel. If you want to use GUI module, lesstif and lesstif-devel are also required.

Building process as non-root user:

mkdir davinci
svn checkout http://oss.mars.asu.edu/svn/davinci/davinci/trunk davinci
svn checkout http://oss.mars.asu.edu/svn/davinci/davinci_build/trunk/linux davinci/build_utils
cd davinci/build_utils
./build_rpm

If everything went alright, the rpm files should be created on the davinci/build_utils directory.


Technical Info about building rpms: The building process is performed by build_rpm.sh script. This script will perform the following steps:

  • Create rpm building environment (devault ~/rpm)
  • Copy the spec file contrib/davinci.spec to the ~/rpm/SPECS and inject the latest davinci version (from version.h).
  • Copy the source file to ~/rpm/SOURCES
  • Create the appropriate directory name.
  • Invoke rpmbuild

When rpm is installed the files are installed as follows:

  • Binary /usr/bin/davinci
  • Libraries /usr/lib/libdavinci* /usr/lib/libiomedley*
  • Modules /usr/lib/davinci
  • Docs /usr/share/davinci/docs
  • Examples /usr/share/davinci/examples
  • Library Scripts /usr/share/davinci/library
Personal tools