These installation instructions assume that you are building from sources obtained from http://www.flaterco.com/xtide/files.html. However, some users may be able to shortcut this process: binary packages for some platforms are available under contrib files. (Thanks to the relevant package maintainers.)
In addition to the minimal set of X11 libraries that pretty much everyone has, you need the following libraries:
The interactive client requires that the Schumacher fonts be installed with X11. These fonts are always included with the X11 distribution, but their installation is frequently optional.
tide and xttpd can be compiled in the absence of X11 libraries and libXpm. However, you still need the other stuff.
New for XTide 2.13: Configure will look for Xaw3dXft (≥ 1.6.2), Xaw3d, or Xaw, in that order. (XTide 2.12 and prior versions supported only plain Athena Widgets.)
![]() | Plain Athena Widgets (Xaw) can be forced using ––disable-3d. | |
![]() | Xaw3d is a fork from an old version of Athena Widgets that offers improved scrollbars and a different look for buttons. Versions 1.6 through 1.6.2 appeared in Q1 2012; prior to that, version 1.5E had been frozen since 2003. Some issues that were subsequently fixed in Athena Widgets, such as long menus running off the screen, were fixed differently in Xaw3d. (This affects the Set Time dialog, where the list of years to choose from can be quite long.) | |
![]() | Xaw3dXft is a fork from Xaw3d 1.5E that uses FreeType fonts. The primary site is http://sourceforge.net/projects/sf-xpaint/files/libxaw3dxft/. XTide enables a tweak in version 1.6.2 that fixes the problem with long menus in the Set Time dialog. If font quality is important, Xaw3dXft is the best choice. |
XTide will link with libgps (version 3.x or newer compatible version) if it is found on the system. If a GPS is present and working, XTide will zoom in on your current location automatically.
XTide will link with libdstr (version 20080124 or compatible) if it is found on the system. If it is not present, XTide will link statically with a bundled copy of Dstr.
Mandatory: You need the XTide source code distribution, available in bzipped tar format at http://www.flaterco.com/xtide/files.html#xtide.
Mandatory: You need at least one harmonics file. Harmonics files contain the data that are required for XTide to predict tides for different locations. Harmonics files are available at http://www.flaterco.com/xtide/files.html#harmonicsfiles.
Optional: If you want to enable XTide to draw coastlines on the map, you will also have to download the World Vector Shoreline (WVS) files, which are available in bzipped tar format at http://www.flaterco.com/xtide/files.html#WVS.
You will download a file with a name similar to harmonics-dwf-YYYYMMDD-free.tar.bz2. With GNU tar, you can unpack it as follows:
tar xvjf harmonics-dwf-YYYYMMDD-free.tar.bz2
With another tar that does not include builtin support for bzip2, you need to do this instead:
bzip2 -dc harmonics-dwf-YYYYMMDD-free.tar.bz2 | tar xvf -
Unpack the archive in a temporary directory, then move the TCD file to a permanent location, e.g., /usr/local/share/xtide, and make it world readable:
mkdir /usr/local/share/xtide chmod 755 /usr/local/share/xtide chmod 644 harmonics-dwf-YYYYMMDD-free.tcd mv harmonics-dwf-YYYYMMDD-free.tcd /usr/local/share/xtide
The tar file also includes a change log and the disclaimers and terms applying to the data.
Under Linux and any other system with GNU tar:
tar xvjf wvs.tar.bz2
Elsewhere:
bzip2 -dc wvs.tar.bz2 | tar xvf -
Under Linux and any other system with GNU tar:
tar xvjf xtide-2.xyz.tar.bz2
Elsewhere:
bzip2 -dc xtide-2.xyz.tar.bz2 | tar xvf -
There are two ways to do this.
The first way is by setting the environment variable HFILE_PATH.
export HFILE_PATH=/usr/local/share/xtide/harmonics.tcd
In the event that you have more than one harmonics file that you wish to use simultaneously, list them separated by colons.
export HFILE_PATH=/usr/local/share/xtide/harmonics-free.tcd:/usr/local/share/xtide/harmonics-nonfree.tcd
Alternately, make sure that they are by themselves in a special directory and specify that directory as the value of HFILE_PATH. If an element of HFILE_PATH is a directory, XTide will attempt to load every file in that directory (so be sure that they are all harmonics files!)
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.
The other way is by creating the file /etc/xtide.conf. The environment variable, if set, takes precedence over the config file.
If a configuration file is used, the first line should consist of the value that would be assigned to HFILE_PATH:
/usr/local/share/xtide/harmonics-free.tcd:/usr/local/share/xtide/harmonics-nonfree.tcd
Either set the environment variable WVS_DIR to the name of that directory or supply the directory name as the second line of the configuration file /etc/xtide.conf.
bash-3.1$ ./configure
XTide is packaged with the popular and portable GNU
automake, so all usual GNU tricks should work. Help
on configuration options can be found in the CONFIGURE-HELP file or
obtained by entering ./configure --help.
If building with Xaw3dXft, it is advisable to specify its directory in the runtime library search path to avoid a clash with Xaw3d:
bash-3.1$ ./configure LDFLAGS="-L/usr/local/libXaw3dXft-1.6.2/lib -Wl,-rpath,/usr/local/libXaw3dXft-1.6.2/lib"
The web server xttpd is not necessary to use tide or xtide, so most users needn't worry about it. However, if you plan to run it, there is additional configuration at this point.
To change the user and/or group under which xttpd tries to
run (the defaults are nobody/nobody), provide the options
--with-xttpd-user=user and/or
--with-xttpd-group=group to configure. If you want to
run xttpd but you don't
have root, you will have to set these to your own username and the
name of some group to which you belong.
bash-3.1$ ./configure --with-xttpd-user=xttpd --with-xttpd-group==scarydæmons
You can also set the webmaster address for xttpd this way.
bash-3.1$ ./configure --with-webmaster="somebody@somewehere.else"
--enable-time-workaround | Work around Y2038 problem; disable time zones. See Appendix A — Historical predictions and Y2038 compliance. |
--enable-gnu-attributes | Use with g++ –Wall –Wextra to make warnings smarter. |
--enable-semicolon-pathsep | Use ; instead of : to separate names in HFILE_PATH (good idea if they begin with C:\) |
--enable-local-files | Locate xtide.conf, .xtide.xml, and
.disableXTidedisclaimer files in current working
directory |
--disable-3d | Use only genuine Athena Widgets. |
You can change the compile-time defaults (colors, etc.) set in
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.
The e-mail address for feedback in xttpd can also be changed by setting the environment variable XTTPD_FEEDBACK, in lieu of the configure option mentioned above.
bash-3.1$ make bash-3.1$ su bash-3.1# make install
As of version 1.6.2, the result of building libXaw3dXft is called
libXaw3d.so.8.0.1, which clashes with any version of libXaw3d that is
installed on the same system. To avoid dynamic linking problems, pass
LDFLAGS="-L/usr/local/libXaw3dXft-1.6.2/lib
-Wl,-rpath,/usr/local/libXaw3dXft-1.6.2/lib" (substituting whatever
path to libXaw3dXft) to the configure script.
If you don't have any version of X11 installed and just want to compile xttpd or tide, generate a Makefile using ./configure and then type 'make xttpd' or 'make tide'. You will probably need to install the binaries by hand.
I succeeded in building XTide 2.13 on a 166 MHz Pentium PC with 96 MiB of RAM using the stock compiler package gcc-g++-4.5.2-i486-2 from Slackware 13.37, but it took hours and I had to set CXXFLAGS to –O1 instead of –O2 to avoid running out of memory. (Building without X running probably would have helped too.)
There are some CPU bottlenecks to be aware of. Real time estimates in the following are from the 166 MHz Pentium:
The –aa setting that formerly could be used to speed up drawing on true color displays by disabling anti-aliasing was retired in XTide version 2.12.
XTide can be compiled and run using Cygwin, which is an emulated Unix environment for Windows that is free for typical non-commercial users. The Cygwin distribution and its full license terms are available from http://www.cygwin.com/.
Cygwin packages are all versioned separately, so there is no baseline "Cygwin version" against which to test XTide. Testing was most recently performed with XTide 2.13 RC1 using the collection of packages that was current as of 2012-02-21. As of then, the quirks apparent after brief testing were as follows:
--disable-3d.LDFLAGS="-L/usr/local/lib" even
though /usr/local/include was found automatically.Cygwin used to have much worse problems than that, so if your Cygwin installation is old, it is highly advisable to update it before compiling XTide.
[Preface: The following instructions were last validated on 2011-11-27 with XTide 2.12.1 and Visual C++ 2010 Express Edition under Windows XP SP3. XTide 2.13 will not build under Visual C++ 2010 because Visual C++ 2010 does not support C++11 extended initializer lists. I don't know yet if it would build under Visual C++ 2012 because it won't install (fail screen, fail log).]
A native Windows binary for the command-line client tide can be built using Visual C++ Express Edition. However, you will still need a Cygwin environment to run the build process. GCC is not required, but you'll need the bash shell, GNU make, etc.
The source distribution of libpng 1.5.6 includes a Visual Studio project under projects/vstudio that builds both zlib and libpng.
Visual C++ ignores most of the standard command-line switches that the autoconf build process tries to use. These instructions include a minimal set of workarounds so that tide will compile anyway.
export LIB="${LIB}C:\\FunkyLibs\\lib;"
export LIBPATH="${LIB}C:\\FunkyLibs\\lib;"
export INCLUDE="${INCLUDE}C:\\FunkyLibs\\include;"
./configure CC=cl CXX=cl LD=cl CPP="cl /E" and do make../configure CC=cl CXX=cl LD=cl CPP="cl /E" LDFLAGS="zlib.lib libpng15.lib libtcd.lib" --enable-semicolon-pathsep --enable-local-files and do make tide.exe.You will get a lot of warnings.
The following behaviors will differ from the default Unix behaviors:
For example, you could put the following in an xtide.conf file in the current working directory:
C:\Documents and Settings\Mumble\Foo\harmonics-free.tcd;C:\Documents and Settings\Mumble\Foo\harmonics-nonfree.tcd
The following old information has not been validated any time recently and might no longer apply.
If the PNG package is installed via Fink (http://fink.sourceforge.net/),
use CPPFLAGS="-I/sw/include" and
LDFLAGS="-L/sw/lib" to find
the Fink-installed PNG files.
A native port to OS X is also available.
If compiling with Sun's own compiler, use
CXX="CC -fast -library=stlport4" and CPPFLAGS="-I.".
Use CPPFLAGS="-I/opt/csw/include" and
LDFLAGS="-R/opt/csw/lib/ -L/opt/csw/lib" to find libraries
from Blastwave installed under /opt/csw.
Some SGI machines come with a broken make program. Use GNU make.
Long ago, a user submitted the following flags to get XTide to compile using the aCC compiler under HP-UX:
bash-3.1$ CXX="aCC" CXXFLAGS="-Wc,-koenig_lookup,on +DAportable" LDFLAGS="-lPW" ./configure
Q: When compiling XTide, I get thousands of warnings of the form "warning: 'auto_ptr' is deprecated".
A: To suppress these nuisance warnings in GCC, use CPPFLAGS="–Wno-deprecated-declarations" or upgrade to GCC 4.6 or newer.
Q: XTide compiles, but when I try to run it I get an error like
error while loading shared libraries: libtcd.so.0: cannot open shared object file: No such file or directory
A: Somehow, g++ found the shared library but your dynamic linker didn't. To get the dynamic linker to find the library, you can just add its directory to the environment variable LD_LIBRARY_PATH. For example, if you find the library in /usr/local/lib, you would add this to your .bashrc (if using bash):
export LD_LIBRARY_PATH=/usr/local/libOr you would add this to your .cshrc (if using csh or tcsh):
setenv LD_LIBRARY_PATH /usr/local/lib
Another workaround is to hard-code the directory into the executable using magic GNU linker switches: configure with LDFLAGS="–Wl,–rpath,/usr/local/lib". Finally, you could just link statically with libtcd.
Q: When compiling XTide, I get an error involving xml-something or lex.xml.c.
A: Do make xmlclean and then try again.
Q: Trying to compile tide using Visual C++, the configure script complains that it can't find a library, and the following error messages appear in config.log. Alternately, these errors can occur when linking tide.exe.
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj) MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj) LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library conftest.exe : fatal error LNK1169: one or more multiply defined symbols found
A: These errors occur when libraries are compiled with conflicting settings of the Visual C++ compiler switches /MT, /MD and /LD. Try recompiling the libraries without using any such switches (the default appears to be /MT). In Visual Studio, the relevant option is buried under View → Property Pages, Configuration Properties → C/C++ → Code Generation.
Q: Trying to compile XTide using Sun compilers, the following error occurs:
"/opt/SUNWspro/prod/include/CC/Cstd/./map", line 251: Error: Multiple declaration for std::map<const Dstr, Configurable, std::less<const Dstr>, std::allocator<std::pair<const Dstr, Configurable>>>::insert(const std::pair<const Dstr, Configurable>&). "BetterMap.hh", line 28: Where: While specializing "std::map<const Dstr, Configurable, std::less<const Dstr>, std::allocator<std::pair<const Dstr, Configurable>>>". "BetterMap.hh", line 28: Where: Specialized in BetterMap<const Dstr, Configurable>. "Settings.hh", line 30: Where: Specialized in non-template code.
A: This problem is resolved by the -library=stlport4 compiler
switch.