Icon Unix installation

These installation instructions assume that you have provided the necessary libraries and C++ compiler discussed in the previous section.

Downloading

You will need the XTide distribution and at least one harmonics file. The harmonics files contain the data that is required for XTide to predict tides for different locations. The distribution and harmonics files are available from http://www.universe.digex.net/~dave/files/ in gzipped tar and gzipped ASCII formats respectively.

If you are unfamiliar with gzip, the following commands should be useful. To unpack the distribution:

gzip -dc xtide-2.0.tar.gz | tar xvf -

To uncompress a harmonics file:

gzip -d harmonics.gz

Note that Netscape might automatically uncompress these files when you download them.

Once you have uncompressed the harmonics files, move them to a permanent location, e.g., /etc, and make them world readable:

chmod 644 harmonics harmonics.anchorage
mv harmonics harmonics.anchorage /etc

Creating a new directory called /usr/local/xtide to hold the harmonics files might not be a bad choice, but it really doesn't matter where you put them.

Configuring

  1. You need to set the environment variable HFILE_PATH to point to your harmonics files. Example:
    export HFILE_PATH=/etc/harmonics:/etc/offsets.xml:\
    /etc/harmonics.anchorage:/etc/harmonics.canadian:\
    /etc/harmonics.admiralty:/etc/harmonics.japan
    
    If you are installing as root, then it is recommended that you add this definition to a system-wide script such as /etc/profile if you have one.
  2. If you will be running xttpd, you may want to set the e-mail address for feedback. You can do this by changing the value of webmasteraddr in config.hh or by setting the environment variable XTTPD_FEEDBACK. You should set it to your e-mail address, and definitely not to my e-mail address.
  3. You can also change the defaults (colors, etc.) set at the top of config.hh if you so choose. However, the easiest way to set all of those things is with the Control Panel in the interactive XTide program.

Compiling

Everybody except Openwin

Type the following at the shell prompt to compile:

xmkmf; make depend; make

If your Imake is properly configured, that should do it. When the compilation is complete, install the binaries and man pages as you see fit, e.g.:

chmod 755 xtide tide xttpd
mv xtide tide xttpd /usr/local/bin
chmod 644 *.1
mv *.1 /usr/local/man/man1

Openwin

The Imake and configuration shipped with Solaris are still broken as of Solaris 2.6, at least for C++. I have produced a hacked Imakefile that appears to work under Solaris 2.6 Openwin, but it's hard to say whether it was a net gain over just writing a plain old hard-coded Makefile.

To compile:

imake -DHasCplusplus -DUseInstalled -I/usr/openwin/lib/config -f Imakefile.openwin

Don't do make depend; it's hopeless. Instead, type make clean before each compilation attempt.

If all else fails

Copy Makefile.std to Makefile, edit as needed, and type make.

If you don't have any version of X11 installed and just want to compile xttpd or tide, type make xttpd or make tide.

Troubleshooting

Q: I get link errors related to the PNG library even though I'm using the latest version.

A: Some Unix vendors (SGI) have stuck crappy old versions of libpng in /usr/lib. If you can't get rid of it, then you need to add the -nostdlib switch to your link line, and add -L/usr/lib at the end.