On Mon, 10 Jan 2011, Luca Rizzi wrote:
>>> If Luca is going to do what Brad did and update these for the JAC
>>> platforms then that's fine and I'm finished and we should branch
>>> (assumes Luca has and is following Brad's instructions). If not then
>>> we could hold off while I build the JNI libraries (which I intend to
>>> do using the oldest OSes I can get to easily so we have the most
>>> backwards compatibility, I'll do this anyway and commit these to the
>>> main trunk).
>>>
>>> Luca?
>>
>
> Hello
>
> all the instructions I have from Brad are listed in the page that he
> prepared on how to prepare a new release, and you can read them here:
>
> http://starlink.jach.hawaii.edu/starlink/StarlinkRelease
>
> There is no mention of how to update the libraries, I think... Sorry, I
> haven't had time to look into starjava because just updating the perl
> modules is proving to be a demanding task.
Hi Luca,
OK, no worries. I've attached a README I created for building the whole
distribution at Durham (it assumes you have a checkout tree ready to go).
Feel free to make use of it, it describes how to update the JNI libraries,
so that stage should be recorded somewhere for posterity.
Cheers,
Peter.
(PS, I'll press on updating JNI libraries for the moment, although
progress will have to slow as I need to do some other work).
Durham Starlink Build
---------------------
This README and directory tree are used to build the full Starlink release
from source code. The source code is currently all held on servers at the JAC
Hawaii. The recipe described here is generally not automatic and may need some
intervention (which is why a single wrapper build system hasn't been
developed). Help with build issues can be obtained from the Starlink users and
developers mailing lists at [log in to unmask] and
[log in to unmask], or from knowledgeable users at Durham (me).
The various source code elements required are:
Starlink classic - the starlink applications and libraries
STARJAVA - the starlink Java applications and libraries
Perlmods - perl modules used by ORAC-DR
ORAC-DR - the JAC pipeline software
These should be built in the given order, but with a Java system installed
after the classic build.
Pre-build actions
-----------------
1) Inspect and source the "setup" script in this directory. That defines
PATHs, compilers etc., and the installation directory. The installation
directory should be "/star-<release-name>", so that this may be
used together with previous builds (the current release being a "/star"
softlink to this directory). Note that if the platform changes then
the compilers will also need to be changed.
Starlink will build using g77, g95 and gfortran and the associated
versions of gcc and g++. In general prefer gfortran if using GCC 4.3
or later, g95 for GCC 4.0 through 4.2 and g77 when using GCC 3.
2) Update all the sources, if needed.
Currently I use my account at JAC to get all these using "ssh" access,
but in principle these can also be accessed using readonly HTTP(s)
equivalents. XXX when this is all stable switch to that.
An issue is which sources to use, generally there are two options,
the current development state, or the state associated with a
specific release. See below in wanting to build for a specific release.
To update the "starlink_git/starlink", "perl-modules_git/perl-modules"
and "oracdr_git/oracdr" git sources you just need to cd into the
those directories and issue the command:
% git pull
To check if there are any local modifications (shouldn't be) do:
% git status
To return the source trees to their just checked out state (removing all
built files) do:
% git clean -fdx
and in the starlink classic sources:
% ./clean-modules
To update the STARJAVA sources in "starjava_svn/source", the equivalent
commands are:
% svn update
% svn status
There is no equivalent command to clean, but there is a generally
available script "svn-clean" that will do this.
Naturally all this assumes you have the "git", "svn" and "svn-clean"
commands available, if not you can update the repositories from another
machine that has these commands (a recent Linux), as this stage does not
have to be done on the build machine.
For reference the URLs to browse the sources and the initialising
checkout commands are:
Starlink classic:
http://starlink.jach.hawaii.edu/git/?p=starlink.git
% git clone http://starlink.jach.hawaii.edu/starlink.git
STARJAVA:
http://starjava.jach.hawaii.edu/viewvc/trunk/
% svn checkout https://starjava.jach.hawaii.edu/svn/trunk source
Perl-modules:
http://starlink.jach.hawaii.edu/git/?p=perl-modules.git
% git clone http://starlink.jach.hawaii.edu/perl-modules.git
ORAC-DR:
http://starlink.jach.hawaii.edu/git/?p=oracdr.git
% git clone http://starlink.jach.hawaii.edu/oracdr.git
The checkout command should be run from the source parent directories
("starlink_git" for classic etc.).
Specific releases
-----------------
Some of the repositories have specific release "branches" that should be
used when building (and maintaining patches) for a specific release. In the
STARJAVA checkout these are individual directories, for instance:
% svn checkout https://starjava.jach.hawaii.edu/svn/branches/hawaiki hawaiki
was used to get the Hawaiki branch. For the git repositories, mainly just
starlink_git, releases are on branches which are part of the main repository
itself. So switch to the Hawaiki branch the following should be used:
% git pull
% git branch origin/hawaiki
% git checkout hawaiki
The main branch is called "master" and can also be checked out. Remember
to clean out all the built files when moving between branches with
non-trivial changes (when you can build the component rather than the
whole tree). In principle ORAC-DR and Perl-modules could have release
branches, but not at the Hawaiki build.
Starlink classic build
----------------------
1) From the starlink_git" directory issue the following commands:
% cd starlink
% ./do_build
2) To test this initialise the Starlink environment and run some examples
in an empty directory:
% source $STARCONF_DEFAULT_PREFIX/etc/login
% source $STARCONF_DEFAULT_PREFIX/etc/cshrc
% gaia
- open demo item in Image-Analysis menu and run
% pisa
% pisa_demo
Java installation
-----------------
1) Copy the contents of "java" to the $STARCONF_DEFAULT_PREFIX
directory:
% cd java
% cp -ax * $STARCONF_DEFAULT_PREFIX
% rehash
That should give a softlink "java" to the release. Note if you
update this a JAI is also required.
STARJAVA build
--------------
1) From the "starjava_svn" directory do the following commands
("cd source" could be "cd hawaiki" to build the release branch):
% cd source
% cd ant
% ./bin/ant build
% ./bin/ant install
% rehash
% cd ..
% ant build
% ant install
1a) Extra step - build the JNI libraries for this platform:
% cd jniast
% ant build-native
% ant install
% ant test
repeat this recipe for jnihds and splat directories. Note this may
not be necessary try the "ant test" target first, if that works in
these directories you're probably OK and can skip this stage.
2) Test by running up TOPCAT and SPLAT and loading their example
datasets (set the TOPCAT open dialog and the SPLAT "Options" menu)
% source $STARCONF_DEFAULT_PREFIX/etc/login
% source $STARCONF_DEFAULT_PREFIX/etc/cshrc
% splat
% topcat
Perl-modules build
------------------
1) Following the instructions in the perlmods_git README, we
needed to do from "perl-modules_git":
% cd perl-modules
% starperl bin/shipwright-builder --install-base /tmp/starlink-perl -skip-test
% cd /tmp/starlink-perl/lib/perl5
% cp -r * $STARCONF_DEFAULT_PREFIX/Perl/lib/perl5/site_perl/5.10.1
% cd ../../bin-wrapped
% cp * $STARCONF_DEFAULT_PREFIX/Perl/bin
% cd ../man
% cp -r * $STARCONF_DEFAULT_PREFIX/Perl/man
% cd $STARCONF_DEFAULT_PREFIX/bin
% ln -s ../Perl/bin/starversion .
Some Perl-Tk tests fail unreasonably, so use -skip-test. If you have
other problems look in the README for how to diagnose these. Note the
"5.10.1" will change when the Perl build has been updated.
A problem in cpan-tk-zinc stops compilation under SL/4.5. Need to edit
the Makefile.PL to change "/usr/X11R6/lib" to "/usr/X11R6/lib64" must be
a better way to do that.
ORAC-DR build
-------------
1) From the top-level source directory "oracdr_git":
% cd oracdr
% setenv ORAC_ROOT $STARCONF_DEFAULT_PREFIX/bin/oracdr
% mkdir $ORAC_ROOT
% cp -r * $ORAC_ROOT
This should copy the whole tree into place. If this concerns you
copy the whole tree to some staging directory and make the following
modifications there and then do the above.
2) Fix up in place.
% cd $ORAC_ROOT
% sh src/version.sh > oracdr.version
% setenv ORAC_DIR $ORAC_ROOT/src
% setenv ORAC_PERL5LIB $ORAC_DIR/lib/perl5
% cd src/docs/sun230
% setenv ORAC_INSTRUMENT UFTI2
% starperl sun230.pl
% star2html sun230
% cp -r *.tex *.ps *.eps *.htx $STARCONF_DEFAULT_PREFIX/docs
% cd ..
% cd sun233
% ./mkinclude.csh
% star2html sun233
% cp -r *.tex *.ps *.eps *.htx $STARCONF_DEFAULT_PREFIX/docs
% cd ../..
% rm -rf docs/ t/ uml/
% ./admin/nongeneric_imaging.csh
% rm -rf admin/
Peter W. Draper 21th January 2010.
|