Monday, October 15, 2012

xtide: Harmonics and shitz.


Done on a Debian 6 system.

Ok, so you've set up xTide, but you don't live in the US of A and you need to compile your own harmonics data. So you need tideEditor:

tideEditor (finally got this to work, with plenty of help from Dave - the guy who wrote tide editor. Thanks, Dave.)

The download site will mention you will need the following software: libtcd and Qt 4.x.
You can do this through Synaptic, if it's easier for you.

For libtcd, you will also need:
libtcd-dev

For Qt4, you will need:
libqt4-dev
... and all its associated dependencies (probably).

= Install both libtcd and Qt4.x before trying to install tideEditor. =

Compiling tideEditor:

The command to link up the CPP libraries will differ for Debian (on the date this post was made). So if you went through the readme and the command there didn't work, try this (it should all be on a single line):

CPPFLAGS="-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support"

The other flags remain the same. Edit the path to the QT4 directory as necessary.

Here's how it went for mine:

user@domin$ ./configure \
CPPFLAGS="-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support" \
LDFLAGS="-L$QT4DIR/lib"
user@domin$  make
user@domin$ su
Password:
user@domin$  make install

Proceed as instructed in the read me. If I get it to work successfully, I will include more detailed instructions here. If you got it working and want to help out on this, feel free to post the associated instructions in the comments section.

If you suddenly realize (to great sadness) you don't have a .tcd file to feed into tide editor, read on.

This is intended to be a more detailed version of the "Expert" section at the xTide website, which, for all intents and purposes, should be considered before whatever I write here.

I will also assume that you already have xTide (and the minimal dependencies) installed. Do it from  or with aptitude/apt-get/Synaptic. No problem there.

Stuff you'll need:

1) Congen 1.6

2) Harmgen3
   which needs to be backed up with:
   2.1) Octave 3.4.3
        - I tried installing one with Octave 3.2x and it worked.
   2.2) Congen 1.6

3) Harmbase2
   which needs to be backed up with:
   3.1) Postgres 9.2.2        Source code here: http://www.postgresql.org/ftp/source/v9.1.2/
   3.2) libtcd (you probably already have this)
         - libtcd0 from the debian repository didn't work for me. Either try libtcd-dev, or compile from source yourself.
   3.3) libdstr
   3.3.1) libecpg-dev (I needed this, but it wasn't listed on xTides)
          - under the impression I installed this through Synaptic

Get it all here:
http://www.flaterco.com/xtide/files.html

Download everything and dump it all somewhere you can easily find it.

1) Compile the source codes and/or install the necessary software as summarized in the table below. Dependencies have to be installed before actual_software, dependencies_2 before dependencies.
So install from up to down and right to left.

==============================================================
Actual_Software |DEPENDENCIES                |DEPENDENCIES_2
================|============================|================
tideEditor      |-libtcd                     |NIL
                |-libtcd-dev                 |NIL
                |-Qt4.x                      |NIL
----------------|----------------------------|----------------
congen-1.6.2    |-libcongen header file      |NIL
----------------|----------------------------|----------------
harmgen-3.1     |-Congen1.6                  |NIL
                |-Octave3.3.4                |-textlive
                |                            |-gpref
                |                            |-glpk
----------------|----------------------------|----------------
harmbase2       |-Postgres9.2.2              |NIL
                |-Congen1.6                  |see above
                |-libtcd(alreadyinstalled)   |NIL
                |-libdstr                    |NIL
===============================================================

Note:

Configure Postgres 9.2.2 with the following command:
./configure --prefix=/usr

as opposed to the usual ./configure.

If all goes well and Postgres installs right, Harmbase2 should configure and install with no issue.

If Harmbase2 complains it can’t find whatever header files, the line below should do it.

./configure CPPFLAGS="-I/usr/local/pgsql/include" LDFLAGS="-L/usr/local/pgsql/lib"

Adjust the path to the header file and its associated library accordingly.

This worked for me. If manage to get a tide file in, i’ll update.

No comments:

Post a Comment