From XastirWiki
Jump to: navigation, search

This HowTo provides a step by step procedure for installing XASTIR from source either using the CVS repository or by downloading a source package from sourceforge. Downloading the source from CVS allows the user to stay on the "bleeding edge" if he so chooses.

Although this write-up covers in detail the procedure that applies to Mandriva One 2007 Spring (2007.1), Mandriva One 2008 (2008.0), and Mandriva One 2008 Spring (2008.1) it is expected that users of other versions of Mandrake/Mandriva can use this procedure as a high level guide and retrieve the equivalent packages for their specific distribution.

Preparing the system

Check Software Installation Sources

1. Launch the rpmdrake package manager either by typing rpmdrake at a command line or using the desktop menu. In KDE, it is under System - Install, Remove & Update Software.

2. In the menu at the top, select Options, then Media Manager. The list of sources used by Yours Truly looks like those shown below:

Main (check both enabled and updates)
Main Updates (check both enabled and updates)
Contrib (check enabled)
Contrib Updates (check both enabled and updates)
Non-free (check enabled)
Non-free Updates (check both enabled and updates)

If any of the above are not checked, check them, and select yes if prompted to update.

Add Libraries

1. Back at the main software management screen in rpmdrake, search for the following packages and mark them for installation if they are not already shown to be installed. Note: you do not have to enter the entire package name in the search.

For Mandriva One 2007 Spring (2007.1):

 gcc-4.1.2-1mdv2007.1.i586
 make-3.81-1mdv2007.0.i586
 automake1.8-1.9.6-4mdv20007.1.noarch
 autoconf2.5-2.61-1mdv2007.1.noarch
 cvs-1.12.13-6mdv2007.1.i586

For Mandriva One 2008 (2008.0) and 2008 Spring (2008.1):

 gcc
 make
 autoconf
 automake1.7
 cvs

2. After all of the above are selected, click the apply button to go ahead and download/install them. Other packages will typically be installed as dependencies and you may be prompted if it is OK. Click YES/OK - whatever it takes to continue to install the required packages. This first set of packages consists of compilers, tools, etc. to be able to download and compile XASTIR.

3. Search for the following package, mark it for installation, and install it by selecting Apply. Note: Yours Truly had a problem with this package being installed automatically as a dependency, so it is being installed here by itself as a prerequisite to the next package.

For Mandriva One 2007 Spring (2007.1):

 libstdc++6-devel-4.1.2-1mdv2007.1.i586

For Mandriva One 2008 (2008.0) and 2008 Spring (2008.1):

N/A - skip to the next step

4. Search for the following package, mark it for installation, and install it by selecting Apply. Note: This package had many dependencies, so yours truly decided it best to install it by itself along with its dependent packages.

For Mandriva One 2007 Spring (2007.1):

 libxorg-xll-devel-7.1.0-6mdv2007.0.i586

For Mandriva One 2008 (2008.0) and 2008 Spring (2008.1):

 libxorg-xll-devel

5. Search for the following set of packages, mark them for installation, and install them by selecting Apply. Note: The first 4 are required for printing from XASTIR, the 5th, OpenMotif, is required, and libax25 is optional (required for I-Gating).

For Mandriva One 2007 Spring (2007.1):

 ImageMagick-6.3.2.9-5mdv2007.1.i586
 ImageMagick-6.3.2.9-5.1mdv2007.1.i586
 gv-3.6.2-1mdv2007.1.i586
 libxp6-devel-1.0.0-3mdv2007.0.i586
 libopenmotif3-devel-2.2.3-11.mdv20007.1.i586
 libax25_0-devel-0.0.11-6mdv2007.0.i586

For Mandriva One 2008 (2008.0) and 2008 Spring (2008.1):

 imagemagick
 gv
 libxp-devel
 libopenmotif3-devel
 libax25_0-devel

Note: Although a newer package, libmotif4-devel is available for Mandriva 2008.1, the user should install the older libmotif3-devel as shown above. The newer version has a known bug that causes the XASTIR menus that use slider controls not to display label text.


6. Search for the following packages, mark them for installation, and install them by selecting Apply. Note: the packages below are not absolutely required, but they are highly recommended.

For Mandriva One 2007 Spring (2007.1):

 libmagick10.7.0-devel-6.3.2.9-5mdv2007.1.i586
 libcurl4-devel-7.16.0-9mdv2007.1.i586m     (online map retrieval - considered better than wget)
 libshapelib1-devel-1.2.10-2mdv2007.0.i586  (for maps in shapefile format)
 libpcre0-devel-7.0-1mdv2007.1.i586         (supports dbfawk to modify shapefile display)
 libdb4.5-devel-4.5.20-1mdv2007.1.i586      (caching for online maps)

For Mandriva One 2008 (2008.0):

 libmagick10.7.0-devel
 libcurl-devel
 libshapelib-devel
 libpcre-devel
 libdb4.5-devel

For Mandriva One 2008 Spring (2008.1):

 libmagick-devel
 libcurl-devel
 libshapelib-devel
 libpcre-devel
 libdb4.6-devel

7. Optionally search for the following packages, mark them for installation, and install them by selecting Apply. Note: the first pair enables support for geotiff maps, the 2nd pair enables XASTIR's limited GDAL support, and the 3rd pair enables text to speech.

For Mandriva One 2007 Spring (2007.1):

 libproj0-devel-4.4.9-2mdv2007.0.i586
 libgeotiff1-devel-1.2.2-6mdv2007.0.i586
 libpq5-devel-8.2.4-0.1mdv2007.1.i586
 libgdal1-devel-1.4.0-1mdv2007.1.i586
 festvox-kallpc8k-1.4.3-2mdv2007.1.noarch
 festival-devel-1.95-2mdv2007.1.i586

For Mandriva One 2008 (2008.0):

 libproj0-devel
 libgeotiff1-devel
 libgdal1-devel
 festvox-kallpc8k
 festival-devel

For Mandriva One 2008 (2008.1):

 libproj0-devel
 libgeotiff-devel
 libgdal-devel
 festvox-kallpc8k
 festival-devel

8. The next optional packages, gpsman and gpsmanshp, were not found by Yours Truly in the Mandriva repositories. Gpsman is for copying tracks from Garmin GPS units to XASTIR for display. Gpsmanshp enables display on shapefile maps. The following instructions apply to either Mandriva One 2007 Spring (2007.1), Mandriva One 2008 (2008.0), or Mandriva One 2008 Spring (2008.1).

For gpsman, go to http://www.ncc.up.pt/gpsman/wGPSMan_4.html and select the link labeled gpsman-6.3.2-1.noarch.rpm. For gpsmanshp, you can download the rpm directly at http://www.ncc.up.pt/gpsmanshp/gpsmanshp-1.1-0.fdr.1.i386.rpm

Yours truly installed the rpm's simply by right-clicking on the rpm file that had been downloaded by Firefox to the desktop and selecting Open with Software Installer.

9. The last library below was required in the summer of 2008 in order to compile properly, but in September, 2008, XASTIR was changed so that it should no longer be required. It is recommended to install it anyway because XASTIR uses Xfontsel as part of it's selectable fonts option. Search for the following package, mark it for installation, and install it by selecting Apply.

For Mandriva One 2008 Spring (2008.1):

 xfontsel

Note: The above has only been tested in Mandriva 2008.1. If anyone can confirm that the xfontsel package is available in 2008.0 and/or 2007.1, please send a message to the XASTIR mailing list (or update this Wiki page if you have an account).

One additional item/task for Mandriva 2008 Spring (2008.1):

It has been found that a portion of ImageMagick is installed in /usr/include/ImageMagick/magick instead of the more typical /usr/include/magick. The Xastir configure script does not look in the former location. Yours Truly solved the problelm using brute force simply by copying the entire magick directory under /usr/include/ImageMagick to /usr/include. A symlink under usr/include should also work. Be sure to either one or the other before moving on.

The next section is taken mostly from the HowTo for Ubuntu 6.10/7.04 as the procedure for retrieving the XASTIR source code is essentially the same.

Get XASTIR source code

From a development snapshot or stable release

If you're not into living dangerously, your easiest way to get the Xastir source code is from one of the "tarballs" available for download at the Xastir sourceforge site (see the top level of the xastir web site for a link to it).

In order to be consistent with the steps below, create directories inside your home directory via the following commands:

 mkdir src
 mkdir src/XASTIR

If you haven't downloaded the tarball already, download it into the ~/src/XASTIR directory (or move it there if you already downloaded it) and extract it there. Extraction is easy with either the KDE or Gnome versions of Mandriva - navigate to the tar.gz file via Konqueror or Nautilus, right click, and select "extract here". Extracting the tarball will result in a new directory being created underneath ~/src/XASTIR. Rename it to xastir (all lower case) in order to be consistent with the naming used below. Then skip to the section labeled Build Xastir.

From the "bleeding edge" CVS repository

If you really want the latest developments of xastir immediately upon their being made, CVS is the approach for you. In this method, you get your source code directly from the "repository" that the developers use to work on the software. See Notes:CVS for details. Here's the step-by-step method for getting it this way.

In the steps below, you might have to change the "cd" and "mkdir" commands to suit your taste. I like to keep my projects separated rather rigidly into directories, and the steps below reflect my personal style. This does tend to make rather deep directory trees, but makes clean-up easy because everything's separate. Your mileage may vary.

  • Prepare your .cvsrc if you don't have one (I prefer to do this in my home directory.)
 ls -l ~/.cvsrc
 # DO NOT DO THE STEPS BELOW IF THE COMMAND ABOVE SHOWS THAT YOU ALREADY HAVE ONE
 cat > ~/.cvsrc
 cvs -z3
 update -P -d
 status -v
 diff -u
 type control-D to finish creating the file
  • Get the source code per README.CVS or Notes:CVS:

You can make different choices here for where you want to store your code. The example puts it in a tree under the home directory:

  mkdir src
  mkdir src/XASTIR
  cd src/XASTIR
  cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir login
  cvs -d:pserver:anonymous@xastir.cvs.sourceforge.net:/cvsroot/xastir co xastir

The "login" line will result in a prompt for a password. Simply hit "Enter" here, as there is no password.

The last command could take a while to finish if you're on a slow link, as there are a lot of files to download.

  • Run bootstrap to generate Makefile.am and configure:
  cd xastir
  ./bootstrap.sh

Build XASTIR

It is recommended to build the code in a separate directory from the source code so as to keep the source code tree clean at all times: (the name of the directory in the example uses a date of 10-31-07 - future builds can be labeled with future dates)

 cd ~/src/XASTIR
 mkdir build-103107
 cd build-103107
 ../xastir/configure

Among other text, the following list will be displayed after running configure: If all of the libraries above have been installed, the output will look like what is shown below.

options and external libraries:

 MINIMUM OPTIONS:
   ShapeLib (Vector maps) ................. : yes

 RECOMMENDED OPTIONS:
   GraphicsMagick/ImageMagick (Raster maps) : yes (ImageMagick)
   pcre (Shapefile customization) ......... : yes
   dbfawk (Shapefile customization) ....... : yes
   rtree indexing (Shapefile speedups) .... : yes
   map caching (Raster map speedups) ...... : yes
   internet map retrieval ................. : yes (libcurl)

 FOR THE ADVENTUROUS:
   AX25 (Linux Kernel I/O Drivers) ........ : yes
   libproj (USGS Topos & Aerial Photos) ... : yes
   GeoTiff (USGS Topos & Aerial Photos) ... : yes
   Festival (Text-to-speech) .............. : yes
   GDAL/OGR (Obtuse map formats) .......... : yes
   GPSMan/gpsmanshp (GPS downloads) ....... : yes

 xastir will be installed in /usr/local/bin.

Note: it is not necessary to load all of the libraries in order to exactly match the list above.

After configure finishes (assuming with no errors), type the following:

 make

After the build completes and assuming no errors, give yourself root privileges by typing in su and then your root password when prompted, then type...

 make install

Next type exit in order to get back to your normal user account (in other words, exit out of root mode)

That's it, at a command line, type the following to launch XASTIR:

 xastir &