udunits-2.2.26.md 1.23 KB
Newer Older
1
# Installation instructions for udunits-2.2.26
Martin Claus's avatar
Martin Claus committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

## Prerequisites
You need to have libexpat installed in `$EXPAT_DIR`. See [UDUNITS documentation](https://www.unidata.ucar.edu/software/udunits/udunits-current/doc/udunits/udunits2.html#Prerequisites) for details.

## Download Source

First download the source into directory `$DIR` (placeholder for the directory of your choice).

```bash
cd $DIR
wget wget ftp://ftp.unidata.ucar.edu/pub/udunits/udunits-2.2.26.tar.gz
tar -xzf udunits-2.2.26.tar.gz

# Fix autoconf scripts for SX AURORA
cd udunits-2.2.26/build-aux
rm config.sub config.guess
wget \
https://raw.githubusercontent.com/SX-Aurora/autoconf-helper/master/config.guess \
https://raw.githubusercontent.com/SX-Aurora/autoconf-helper/master/config.sub
```

## Build and install

On the front-end, we can cross-compile. Remember to replace `$PREFIX` with your installation directory.

```bash
cd $DIR/udunits-2.2.26
# configure the package
./configure \
CC=ncc CXX=nc++ FC=nfort F90=nfort LD=nld AR=nar RANLIB=nranlib \
CFLAGS=-O3 CPPFLAGS=-I$EXPAT_DIR/include LDFLAGS=-L$EXPAT_DIR/lib \
--host=ve-nec-linux-gnu --prefix=$PREFIX

# build
make

# test
qlogin -q veinteractive -l elapstim_req=1800
cd $PBS_O_WORKDIR
make check
exit

# install
make install
```