From XastirWiki
Jump to: navigation, search

First, let's describe it: This will get Xastir up and running with a few built-in map types. You'll be on the air or on the 'net quickly, then can build upon this working base to add more map libraries and other cool features later.

Configure

In order to complete the configure/compile/install of Xastir, you'll need some of the development tools and headers installed. Here's a list of a few items you'll need to have installed. Look for them in the development tools sections on your Linux distribution:

   autoconf
   automake
   bash
   binutils
   gcc
   gcc development headers
   cpp
   glibc
   glibc development headers?
   freetype2
   freetype2 development headers
   openmotif (or Lesstiff or Motif)
   openmotif development headers (or Lesstiff or Motif)
   XFree86
   XFree86 development headers
   XFree86 fonts
   XFree86 libraries
   make (GNU flavor, not BSD flavor)
   gzip
   m4
   grep

Note: Only install one of the Motif packages and the corresponding development package to go with it. Recommendation: [OpenMotif].

If you'd like to install additional packages at this point that may be needed later, install these as well:

   patch
   diffutils
   perl
   less
   bzip2
   curl
   curl development headers
   cvs
   git
   rcs
   tar
   liblcms
   liblcms development headers
   libtiff
   less
   pcre
   pcre development headers
   tcl
   tcl development headers
   tk
   zip
   unzip
   wget
   ax25-apps
   ax25-doc
   ax25-tools
   libax25
   festival
   festival development headers
   gawk
   ghostscript-x11
   ghostscript-fonts
   ghostview
   gv
   ImageMagick
   ImageMagick development headers


Note that some packages may have dependencies on yet more packages. Hopefully your package installation tool will take care of those for you. It's also common for at least one of these packages to forget to list some of it's dependencies (ImageMagick is known for that). In that case you may have to rely on the compiler to tell you what is missing, then go back and re-install a package or two.

    cd Xastir
    ./bootstrap.sh
    mkdir -p build
    cd build

When you run the "./configure" step from the "Xastir/build" directory, the script will attempt to figure out what facilities are available that Xastir can take advantage of. Sometimes the script guesses wrong and you must disable an option and try again. The correct way to do this is (Festival speech synthesizer is used as an example, not that I'm picking on Festival or anything):

   ../configure --without-festival

That will guarantee that configure will skip Festival entirely, which will set up the Makefiles to skip it, and the Xastir binary will be created without any support for it. Other configure options are:

   --without-ax25
   --without-festival
   --without-gpsman
   --without-shapelib
   --without-imagemagick
   --without-libproj
   --without-geotiff
   --without-gdal
   --without-pcre
   --without-dbfawk
   --without-map-cache
   --with-errorpopups
   --with-rtree

That said, you probably won't have to use any of these! Type "./configure" all by itself and the script should eventually give you a summary of the packages that it will try to compile support into Xastir for. The only time you may want to add some of the above options is if the compile hangs up because of one of them. You can then add the option to configure, re-create the Makefiles to skip that feature, and get Xastir compiled without it. Once you get the problem solved, you can reconfigure and recompile to add that feature back in.

At this point, if some things don't appear in the summary that you'd like/expect to appear, as long as you get to the "Type 'make' to build Xastir" message, you're doing fine. You can work on getting more things in there later.

This is what you'd like to see at the end of the "./configure" run (minimum, there may be more "yes" answers):

 Building with AX25.......... : no
 Building with Festival...... : no
 Building with GPSMan........ : no
 Building with ImageMagick... : no
 Building with libproj....... : no
 Building with GeoTiff....... : no
 Building with GDAL/OGR...... : no
 Building with ShapeLib...... : no
 Building with pcre.......... : no
 Building with dbfawk........ : no
 Building with libgc (Debug). : no

In other words, Xastir should build/compile with NO optional libraries installed! This will still give you USGS GNIS maps, APRSdos maps, WinAPRS maps, and PocketAPRS maps, plus audio alerts if you have a suitable audio player installed on your system. You'll also be able to attach a TNC either in command-line or KISS mode and connect it to Xastir. Mobile support will work with an attached serial GPS. Attached weather stations should work fine too. You won't get online maps or weather alerts with this configuration though. Worry about that stuff later once you get the minimal configuration working.

Make

Type "make". That stage should complete with no errors. You may have a warning or two show up, depending on your compiler version and your operating system. Warnings are generally safe to ignore, but may indicate items that need attention from the developers.

Make install

For this stage you need to have root privileges (also see: Notes:Sudo). "root" is the user on a Unix/Linux box that has the ultimate authority over everything. Follow these steps:

   sudo make install
   sudo chmod 4755 /usr/local/bin/xastir (optional, see below)
   

The sudo command allows you to "do" commands with root user "su" privileges. You will typically need to type in your password when the system asks for it.

The "make install" step installs all of the pieces of Xastir in the appropriate places on your system.

The "chmod" step sets up the Xastir executable so that it can assume root privileges at the points where it needs to, usually when it needs to access serial ports or AX.25 kernel networking ports. Note that if you don't need the above chmod command, don't use it. It will prevent creation of "core" files in case Xastir crashes, which makes debugging to figure out the root cause much more difficult. There are also some security risks in doing "chmod 4755", as it makes Xastir run as the root user at times. We've tried to minimize the risk by giving up root permissions when we don't absolutely require them, so the risks are smaller.

At this point you have a minimal Xastir installed. Jump down to the Operating Xastir.