Here are the instructions used for building the 2021A REV1 CentOS7 build. They are a combination of the Jenkins nightly build instructions and the instructions at StarlinkRelease. The shell is assumed to be tcsh:

# Log into stardev-el7 as yourself, then become user jenkins
ssh stardev-el7
sudo -u jenkins tcsh

# The only locally mounted directory with significant free space that is writable by 
# jenkins is /star-2018A. The contents of this directory seem to be a temporary 
# marshalling area for 2018A, which is presumably no longer needed. Therefore I take 
# the liberty of using this directory for the 2021A-REV1 build.
setenv WORK /star-2018A/future-builds
mkdir -p $WORK
cd $WORK
rm -rf * 

# Following line needed because github has switched off the anonymous git protocol. 
# So need to use https instead of git when cloning submodules.
git config --global url."https://".insteadOf git://

# Clone the starlink repo and checkout the required branch and tag
git clone starlink
cd starlink
git checkout tags/2021A-REV1 -b 2021A

# We will install the built starlink into a suitably named subdirectory.
setenv STARLINK_DIR $WORK/star-2021A-REV1

# Ensure other environment variables are correct. Note, gcc and g++ on 
# pc0054 are links to clang. gfortran is part of GCC 11.2.
unsetenv STARLINK
unsetenv INSTALL
unsetenv CFLAGS
unsetenv CXXFLAGS
unsetenv FFLAGS
unsetenv DISPLAY
setenv LC_ALL C
setenv FC gfortran
setenv F77 gfortran
setenv CC gcc
setenv CXX g++
setenv PATH $STARLINK_DIR/bin/startcl\:$STARLINK_DIR/bin\:$STARLINK_DIR/buildsupport/bin\:$PATH
setenv PERL_CPANM_HOME $HOME/starcpanm

#  bootstrap, configure and build
make configure-deps
./configure -C
make world

# For some unknown reason, building thirdparty/mesa always seems to fail on the first 
# make world, but succeeds if make world is run a second time (this only seems to 
# happen on CentOS7)
make world
make componentset.html

# Build perl modules. build_modules had intermittent web access 
# timeouts. It took several attempts for this to complete successfully.
cd thirdparty/perlsys/perlmods


This assumes that the above instructions have been executed:

cd $WORK

#  Identify the JDK 8 to be used.
setenv JAVA_HOME /net/scubadev/export/data2/star/Java8/jdk1.8.0_202
setenv STAR_JAVA $JAVA_HOME/bin/java
setenv PATH $JAVA_HOME/bin\:$PATH

#  Ensure the target install directory exists and is empty.
touch $STARLINK_DIR/starjava
rm -rf $STARLINK_DIR/starjava 
mkdir $STARLINK_DIR/starjava

# Clone the starjava repo and checkout the required branch and tag 
touch starjava-2021A-REV1
rm -rf starjava-2021A-REV1
git clone starjava-2021A-REV1
cd starjava-2021A-REV1
git checkout --track origin/2021A
git checkout tags/2021A-REV1

#  build and install the starlink version of ant
cd ant
setenv PATH `pwd`/bin\:$PATH
ant install -Dstar.dir=$STARLINK_DIR/starjava
ant clean
setenv PATH $STARLINK_DIR/starjava/bin\:$PATH
cd ..

# Adjust locale settings to avoid errors from special characters in the documentation
setenv LC_ALL en_US.UTF-8
setenv LANG en_US.UTF-8
setenv LANGUAGE en_US.UTF-8

# Allow access to the JAI classes (otherwise starjava will not build). JAI is not 
# actually included in the release though, so JSKY and SOG will not function.
setenv CLASSPATH $JAVA_HOME/../jai-1_1_2_01/lib/jai_codec.jar\:$JAVA_HOME/../jai-1_1_2_01/lib/jai_core.jar

# Build and install starjava
ant -Dstardev=$STARLINK_DIR -Dstar.dir=$STARLINK_DIR/starjava build
ant -Dstardev=$STARLINK_DIR -Dstar.dir=$STARLINK_DIR/starjava install

#  Now build the native JNI libraries
foreach lib (jniast jnihds splat)
   cd $lib
   ant -Dstardev=$STARLINK_DIR -Dstar.dir=$STARLINK_DIR/starjava build-native
   ant -Dstardev=$STARLINK_DIR -Dstar.dir=$STARLINK_DIR/starjava install
   ant -Dstardev=$STARLINK_DIR -Dstar.dir=$STARLINK_DIR/starjava test
   cd ..   


cd $WORK

source $STARLINK_DIR/etc/login
source $STARLINK_DIR/etc/cshrc

touch oracdr
rm -rf oracdr

git clone oracdr

cd oracdr
git checkout 2021A

cd src/docs
make install

git clean -fdx

Tidying up

# Clean up unnecessary bits of document tree.
rm docs/*.htx/*.dvi
rm docs/*.htx/*.idv
rm docs/*.htx/*.log
rm docs/*.htx/*.lg
rm docs/*.htx/*.4ct
rm docs/*.htx/*.4tc
cd ..

#  Tar up the whole release and copy it to the FTP directory.
tar -czf starlink-2021A-CentOS7-REV1.tar.gz star-2021A-REV1
scp starlink-2021A-CentOS7-REV1.tar.gz \

Starlink: method used for building the 2021A-REV1 CentOS7 build (last edited 2022-04-19 12:12:54 by DavidBerry)