- 1 Xastir by RPM
- 2 Install Xastir from CVS
- 3 Install required RPM packages
- 4 Tar balls
- 5 Get and compile Xastir from CVS
- 6 Use it!!
- 7 Notes, Errors and Questions
Xastir by RPM
Xastir is now included in the Fedora Distribution!
Thanks to the efforts of the guys over at the Fedora Amateur Radio Special Interest Group, Xastir is included in the Fedora repositories. You can install Xastir simply by using the command:
sudo yum install xastir
See the Sudo notes for help in setting up sudo.
If you're not familiar with sudo, See links and notes below
- This will install all the requisite libraries and the Xastir binaries.
- If you want to use more than the default maps and online maps, you'll need to download maps as described in README.MAPS .
- Regardless of using the RPM or CVS version, you'll need to configure Xastir for your use - see the built in 'help' system for details.
- If you want the latest possible version of Xastir, follow the instructions here to install the CVS version.
Install Xastir from CVS
Notes and privileges
- It is strongly suggested you read the entire INSTALL file first.
- This how-to assumes your system has a working connection to the Internet.
- First, you'll need a console (terminal). You can open a console via: Application -> Accessories -> Terminal (Depending on your desktop, you may also find it at: Applications -> System Tools -> Terminal)
- Many commands used to install software require root privileges.
This is not meant to be a replacement for INSTALL - but simply a distro-centric abridgment.
A sort of 'check-list' if you will.
This link will take you to a current copy of Xastir's INSTALL file.
Two ways to gain root privileges (other than logging in as root) are:
su will elevate you to 'root' privileges and leave you in the current directory, but retains the user's environment. Return to 'normal user' privileges by typing 'exit'. If you encounter environment based erros, try "su -" instead. Just be sure to change to your working directory!
sudo followed by a command will grant privileges for just that command, automatically dropping you back to normal privileges when that command is completed. Sudo is generally considered safer than su, but it does need to be setup before you can use it. See the Sudo notes for instructions on setting up sudo. Using sudo respects the same Unix tradition of not logging in as root except when necessary. The Fedora Unity project also has a sudo howto.
'su' is immediately available without any setup, but does - conceivably - carry some risks. Any command you give after using 'su' will be performed with root privileges - until you type exit to return to normal privileges. It's possible you may forget you have root privileges and inadvertently damage your system, it's installed programs or even expose your system to exploit. If you follow this how-to and don't issue any extra commands, you should be fine.
Check your Development Setup
- For help installing Fedora see The Fedora 20 install guide - available in several formats. There are also several 'personal setup' guides online, that will help you to customize and configure your Fedora install. One of the more popular ones is mjmwired.net's Personal installation guides,
- If by chance, you didn't install Fedora with the required development tools, you'll have to add them in now.
To see if you have them or not. Simply run:
sudo yum grouplist [user@localhost ~]$ sudo yum grouplist Loaded plugins: fastestmirror, presto, refresh-packagekit Setting up Group Process Loading mirror speeds from cached hostfile updates/metalink | 17 kB 00:00 * fedora: astromirror.uchicago.edu * rpmfusion-free: mirror.web-ster.com * rpmfusion-free-updates: mirror.web-ster.com * rpmfusion-nonfree: mirror.web-ster.com * rpmfusion-nonfree-updates: mirror.web-ster.com * updates: astromirror.uchicago.edu rpmfusion-free-updates | 3.3 kB 00:00 rpmfusion-nonfree-updates | 3.3 kB 00:00 Installed Groups: ::snipped:: Available Groups: ::snipped:: Done
I've removed the actual group listings from that output and replaced them with ::sinpped::. It will be different for every install.
You'll see what groups you have installed. Look through the first part, "Installed Groups". You want to find these 1 group (Fortunately, they're listed in alphabetical order):
- Development Tools
If it's not there, install the group with:
sudo yum groupinstall "Development Tools" <enter>
Now, to work...
Install required RPM packages
These packages are included in the Fedora repositories and can be installed using Fedora's package management tools. They will also be automatically updated as new versions become available.
- To be used with Xastir, all application packages will require their associated 'devel' packages to be installed. Libraries, by their nature, do not require 'devel' packages.
- The 'install' commands require root privileges.
- Enter the command 'su' and then give the root password and continue.
- Or after setting up sudo (suggested), add sudo to the beginning of each command line.
This first package's install line would become:
sudo rpm -q GraphicsMagick <enter>
- [user@localhost ~]$ (user prompt)
- [root@localhost ~]# (root prompt)
You can use either GraphicsMagick or ImageMagick. GraphicsMagick is the Fedora default and currently preferred.
rpm -q GraphicsMagick <enter>
You should get a response similar to:
This tells you GraphicsMagick is installed and exactly what version it is. Exact numbers in the version string may be different
If you get this instead:
Package GraphicsMagick is not installed
Then install it with:
yum -y install GraphicsMagick <enter>
yum -y install GraphicsMagick-devel <enter>
- You can combine these steps into one.
If you didn't have GraphicsMagick, you surely don't have GraphicsMagick-devel. Get both like this:
yum -y install GraphicsMagick GraphicsMagick-devel <enter>
I'll be leaving out the <enter> for the rest of the commands. You can safely assume it's there
Note added by KM5VY: If you chose a minimal installation above and left out the Gnome Software Development group (which is large and mostly unnecessary), then you must also install "lcms" and "lcms-devel" here, as they are required by GraphicsMagick and for some reason not pulled in as an automatic dependency.
Optional: festival provides speech synthesis allowing Xastir to 'talk' to you. Of course, you'll also need a working sound card and speakers.
Install Festival and Festival-devel, if not already present.
rpm -q festival
If not installed, then install festival and it's devel package.
yum -y install festival festival-devel
Verify presence of the libtiff development libraries
rpm -q libtiff-devel
If not installed, install it
yum -y install libtiff-devel
note: In the past, Fedora included OpenMotif, but due to an incompatible license from OpenMotif, Fedora now includes lesstif instead. CentOS does use openmotif - don't force the install of the lestif-devel libraries or you'll break other things. Just use openmotif-devel on CentOS - works fine.
Verify presence of lesstif
rpm -q lesstif
If present, verify presence of lestif development package
rpm -q lesstif-devel
If either are not present, install whatever is missing
yum -y install lesstif lesstif-devel
The DBFAWK capability of xastir requires PCRE. We do not recommend building xastir without DBFAWK capability if you plan on using shapefiles. PCRE will probably not be installed already, so just install it:
yum -y install pcre pcre-devel
These packages are not included in the Fedora repositories, so must be manually installed and updated.
Setup and Preparation
- Create/Choose working directory
Change to your to your working directory of choice.
Tradition would suggest /usr/local/src. I use my home directory /home/<username>. You may also make a /source or /src directory most anywhere in the filesystem and use that. Totally up to you where you do this or what you call it. To continue, just make it is your current directory. Use the "pwd" to show your current directly.
- ld.so.conf is the configuration file for ldconfig. Find it in the /etc directory.
- Use vi, gedit or your favorite text editor to check /etc/ld.so.conf and make any changes as needed.
- Verify that /usr/local/lib, /usr/lib, and /usr/X11R6/lib are all listed.
If not, just add each to it's own line. Something like:
/usr/local/lib /usr/lib /usr/X11R6/lib include ld.so.conf.d/*.conf
That last line include ld.so.conf.d/* should already be there. After all the 'tar ball' sourced libraries are installed, execute ldconfig to update the library cache.
This will allow the compiler to find the required libraries on your system.
Get, Compile and install libraries
- Some of the following examples include the sudo command. If you already have root privleges, maybe by using su, just leave sudo off the lines below.
- The scripts directory in the Xastir source tree (~/xastir/scripts) contains shell scripts that can automate some of these and other functions. Once you have Xastir up and running I suggest exploring those scripts.
- The following lines will download the required 'tarball' into your current directory, extract them, build and install the libraries. You can "cut and paste" each line - one at a time - to your console and execute.
- Install libproj
- Install libgeotiff
Change to your working directory. Verify with 'pwd'. Then, execute:
wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz tar xzvf proj-4*.gz cd proj* cd nad wget http://download.osgeo.org/proj/proj-datumgrid-1.6RC1.zip unzip *.zip cd ../ ./configure make sudo make install
The proj-datumgrid file must be extracted into the nad directory before libproj is compiled, as indicated in the steps above.
Change to your working directory. Verify with 'pwd'. Then, execute:
wget ftp://ftp.remotesensing.org/pub/geotiff/libgeotiff/libgeotiff-1.4.0.tar.gz tar xzvf libgeotiff*.gz cd libgeotiff* ./configure make sudo make install
- libgeotiff and libgeotiff-devel are available in the Fedora repositories, but are at version 1.2.5.
You may install them using "sudo yum install libgeotiff-devel", instead of installing from source.
- If you intend to install the GDAL map tools via yum (not covered in this howto), it is suggested you also use yum to install libgeotiff and NOT via source as described here
- I was unable to get Xastir to compile after removing libgeotiff 1.3.0 and installing 1.2.5 from the repositories. libgeotiff is listed as a dependency for GDAL. You'll have to find
a way around this 'limitation' to use GDAL from the repositories. It may be 'cleaner' to install GDAL from source as well.
Change to your working directory. Verify with 'pwd'. Then, execute:
wget http://dl.maptools.org/dl/shapelib/shapelib-1.2.10.tar.gz tar xzvf shapelib*.gz cd shapelib* make lib sudo make lib_install
- Once all libraries are installed, you may safely delete the tarballs and their source directories.
Get and compile Xastir from CVS
- If you're using su, just leave off each instance of sudo that follows.
- See the CVS Notes page for information on using and configuring CVS for your system.
- Checkout Xastir source from CVS
- Build Xastir
cd ~ <enter>
Enter this full line and hit enter (you can cut 'n paste it from here)
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/xastir login
When asked for a password, just hit the 'enter' key - leave it blank. Then enter this full line and hit enter:
cvs -z3 -d:pserver:email@example.com:/cvsroot/xastir co -P xastir
This will create the ~/xastir directory and place the current source tree there. To update, in the future cd into this directory (cd ~/xastir) and then run 'cvs update -d'.
cd ~/xastir ./bootstrap.sh ./configure make sudo make install
- When ./configure finishes, it'll give you a list of what is going to be built into Xastir.
Following this guide, you'll have:
xastir 2.0.5 has been configured to use the following options and external libraries: MINIMUM OPTIONS: ShapeLib (Vector maps) ................. : yes RECOMMENDED OPTIONS: GraphicsMagick/ImageMagick (Raster maps) : yes (GraphicsMagick) 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) ........ : no libproj (USGS Topos & Aerial Photos) ... : yes GeoTiff (USGS Topos & Aerial Photos) ... : yes Festival (Text-to-speech) .............. : yes GDAL/OGR (Obtuse map formats) .......... : no GPSMan/gpsmanshp (GPS downloads) ....... : no xastir will be installed in /usr/local/bin. Type 'make' to build Xastir (Use 'gmake' instead on some systems)
Now, do as instructed and run 'make' to actually build Xastir, then run 'make install' to install Xastir to your system.
Yup - that's it!
- Xastir's support files are now installed to /usr/local/share/xastir.
- The Xastir executable is now in /usr/local/bin
- Xastir libraries are now in /usr/local/lib.
Start Xastir by typing:
- This will allow you to see any error messages or problems in the console.
- First time you start Xastir, it'll make a ~/.xastir directory and create several files.
- ~/.xastir is where your log files, snapshots and configurations reside.
Now, setup your station and enjoy!
File > Configure > Station
Notes, Errors and Questions
- dbfawk will not be enabled unless you installed pcre and pcre-dev.
- If you plan to use shapefiles, we do not recommend installing Xastir without dbfawk support
A way to fix this is to set the User ID bit on the xastir binary. Do that with this command:
sudo chmod 4755 /usr/local/bin/xastir
This allows Xastir to run with the privileges of the file owner, root - if you've followed this guide.
Read the INSTALL file found in your xastir source directory. Everything is pretty much is spelled out.
If you're using a serial TNC, your serial ports are:
/dev/ttyS0 (what windows would call 'COM1') /dev/ttyS1 (what windows would call 'COM2')
- Character \xx not supported in font
- Make errors on Print.h
- Other "No such file or directory" errors from 'make'
You may see an error in the console similar to:
"Character '\55' not supported in font"
No biggy and you can safely ignore it. However, if you'd like to correct this, see the appropriate section in the FAQ, find the FAQ in your xastir source directory. You're looking for:
4.13 Why do I see "Character '\55' not supported in font"?
You can read it online at: Xastir FAQ
If you receive an error after running "make", similar to:
gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/include -DXASTIR_DATA_BASE=\"/usr/local/share/xastir\" -g -O2 -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes -Wno-unused-parameter -pthread -I/usr/include -MT alert.o -MD -MP -MF .deps/alert.Tpo -c -o alert.o alert.c In file included from /usr/include/Xm/XmAll.h:46, from alert.c:308: /usr/include/Xm/Xm.h:76:34: error: X11/extensions/Print.h: No such file or directory In file included from /usr/include/Xm/XmAll.h:46, from alert.c:308: /usr/include/Xm/Xm.h:858: error: expected specifier-qualifier-list before âXPContextâ In file included from /usr/include/Xm/XmAll.h:88, from alert.c:308: /usr/include/Xm/Print.h:46: error: expected declaration specifiers or â...â before âXPFinishProcâ
Just install the missing libraries:
yum install libXp libXp-devel <enter>
and try "make" again - no need to re-run configure. libXp-devel contains the missing Print.h header.
If you get some other 'make' error about a missing header or file. try:
yum whatprovides <missing header name>
and then install the package and package-devel indicated.
Any questions? Ask on the reflector. http://www.xastir.org/mailman/listinfo/xastir