FTOOLS Frequently Asked Questions

There are some new FAQs specifically for people who are writing their own FTOOLS. We should have more of these soon. We'll try to put all Developer oriented FAQs at the end of the list so you can easily find them or easily avoid them depending on your situation.
  1. What is the most recent released version of FTOOLS?
  2. How can I get email notices of future releases of FTOOLS?
  3. How do I obtain and install the current version of FTOOLS?
  4. Despite the fact that building FTOOLS v4.x and up couldn't be easier, do you have an executable distribution?
  5. Is my platform/OS/compiler supported?
  6. How do I use my favorite compiler instead of gcc?
  7. Can I use g77?
  8. How much disk space is required?
  9. How can I turn off optimization in the build process?
  10. How do I build just the "common" tools from FTOOLS 4.2?
  11. How can I build just the FTOOLS subpackages I want?
  12. Once I've installed the FTOOLS, how do I rebuild just one of them?
  13. I'm building my own FTOOLS under SUNOS with SUN's f77 and gcc and I'm having problems.
  14. I get a strange error involving "assertion failed" on a DEC Alpha.
  15. Why do I get runtime warnings from "ld.so"?
  16. Why do I get runtime errors from "ld.so"?
  17. I'm using the Common Desktop Environment (CDE) on my machine and I can't get FTOOLS to work.
  18. When I try to specify a FITS file extension on the command line using square brackets I get an error.
  19. How do I call an FTOOL from a script (perl, sh, etc)?
  20. My ftools keep dying because I didn't remove the output file before starting. This is driving me crazy.
  21. How do I get on-line FTOOLS help information?
  22. ascascreen (or other Perl scripts) is core dumping! Help!
  23. I hate typing long FITS file names.
  24. Why does fparkey not like it when I give a filename as the keyword value?
  25. What are the known bugs in the current version of FTOOLS?
  26. That's all very nice, but where can I ask a real question?

  1. What is the most recent released version of FTOOLS?

    Please refer to the HEASOFT page for information about the latest release.

    Return to the list of questions

  2. How can I get email notices of future releases of FTOOLS?

    Send email to listserv@athena.gsfc.nasa.gov with a blank subject and the words:

       subscribe ftoolsnotes yourname
    

    in the body of the message.

    Return to the list of questions

  3. How do I obtain and install the current version of FTOOLS?

    Point your web browser at the FTOOLS homepage:

    http://heasarc.gsfc.nasa.gov/lheasoft/

    from which you can download FTOOLS (either the source or binary distributions) and will also find an abundance of useful information about installation, usage, etc. However, if you prefer, the main package may be directly downloaded via anonymous ftp:

       ftp heasarc.gsfc.nasa.gov
       Name (heasarc.gsfc.nasa.gov:yourname): anonymous
       Password: yourname@your.email.address
       cd software/lheasoft/release/source
       binary
       get ftools5.3.1src.tar.gz
       quit
    
    With the release of FTOOLS 4.0 the installation became much simpler and a small, text-only installation guide (the file "INSTALL.SOURCE" in the top level directory) is included in the FTOOLS tar file.

    Return to the list of questions

  4. Despite the fact that building FTOOLS couldn't be easier, do you have an executable distribution?

    As a matter of fact, yes! Binary distributions are available for the IRIX, Linux, Mac OS X, OSF and Solaris architectures. There is no binary distribution available for VMS. Sorry. Go to the HEAsoft Release and Download page to download the binaries you need for your architecture. For directions on setting up FTOOLS for your machine, read the HEASOFT-INSTALL file in the created subdirectory.

    Return to the list of questions

  5. Is my platform/OS/compiler supported?

    The FTOOLS are supported in a number of different environments. Basically, if you are running on a SUN Sparcstation (Solaris), DEC Alpha (OSF/1), Mac OS X (Darwin), SGI (IRIX), a PC or Mac running Linux, or a PC running Cygwin, and you have a proprietary C compiler or the gcc compiler, and a FORTRAN compiler, you should be able to install and run FTOOLS without too much trouble.

    Please visit our supported architectures and operating systems web page for more information about building FTOOLS on our supported platforms.

    Native Windows platforms are only supported under version 4.2. A binary distribution, which contains all the necessary tools, is provided, so C and Fortran compilers are not needed. Visit the Windows Download page to learn more about and to obtain the software.

    SunOS 4 and HPUX are no longer supported.

    VMS is no longer supported. FTOOLS 4.0 can be run under OpenVMS on DEC Alphas, though, and remains available.

    Return to the list of questions

  6. How do I use my favorite compiler instead of gcc?

    BEFORE typing "./configure" in your BUILD_DIR set your CC environment variable, eg, setenv CC cc

    Return to the list of questions

  7. Can I use g77?

    For now, using g77 to build FTOOLS is ONLY supported on Linux, Mac OS X, and Cygwin systems and cannot be used on other platforms. We hope to lift this restriction in the future.

    Return to the list of questions

  8. How much disk space is required?

    Approximately 300-350Mb will generally be needed for a full, stand-alone, installation of either the source or binary distribution. The common-FTOOLS-only version is considerably smaller, as is the "dispatch" FTOOLS version. If necessary, you can delete the entire source tree after installation which will save approximately 190Mb. If you do delete the source tree, however, remember that you will not be able to easily apply future updates or patches!

    Return to the list of questions

  9. How can I turn off optimization in the build process?

    AFTER running "./configure" but before "hmake", edit the BUILD_DIR/Makefile and remove the "-O" from FFLAGS and CFLAGS.

    Return to the list of questions

  10. How do I build just the "common" tools?

    To build the "common" ftools only (futils, time, xpiutils, and examples):

    Return to the list of questions

  11. How can I build just the FTOOLS subpackages I want?

    First build the common FTOOLS (using "hmake common"). Then issue the hmake command with the name of the subpackage that you want to add (e.g. "make xronos").

    Return to the list of questions

  12. Once I've installed the FTOOLS, how do I rebuild just one of them (to apply a patch, make my own changes, etc.)?

    Note: This will only work if you already installed from the source code....

    1. Perform a standard Ftools initialization.
      For C-shell variants:

            setenv LHEASOFT /my/full/lheasoft/path/<arch>
            source $LHEAOSFT/lhea-init.csh
      
      or, for Bourne-shell variants:
            FTOOLS=/my/full/lheasoft/path/<arch>
            export LHEASOFT
            . $LHEASOFT/lhea-init.sh
      
      where <arch> is the long architecture-specific directory containing your Ftools installation.

    2. Perform the Ftools developer initialization (only necessary when rebuilding any Ftools.)
      For C-shell variants:

            source $LHEASOFT/BUILD_DIR/devinit.csh
      
      or, for Bourne-shell variants:
            . $LHEASOFT/BUILD_DIR/devinit.sh
      

    3. Go to the directory containing the source code for the tool you wish to build, and use the hmake utility to build it, e.g.:

            cd fdummyftool
            hmake
      
      (You can capture the output to a log file if you wish.)

    4. If step 3 finishes without error, use hmake to install the tool:

            hmake install
      
      This will safely install the new binary, regardless of the build options selected at configure time, such as the dispatch build method.

    Return to the list of questions

  13. I'm building my own FTOOLS under SUNOS with SUN's f77 and gcc and I'm having problems.

    You may be having alignment problems. You need to set the "-f" flag for SUN FORTRAN. Here's a brief description of the problem. On Suns, when a Fortran routine compiled with Sun f77 tries to pass a double-precision number by reference to a C routine compiled with GCC, a bus error may result when the program is run. This is because the SPARC CPU requires doubles to be aligned on 8-byte boundaries, but Sun's compilers use 4-byte alignment and generate extra instructions to manipulate the two halves separately. GCC, however, generates code for 8-byte alignment. The solution is to use `f77 -f', `f77 -dalign', or `gcc -munaligned-doubles'. This affects both SunOS4 and Solaris2, and Sun compilers at least through SC3.0. FTOOLS 3.6 currently compiles all Fortran modules on Suns with `-f'.

    Return to the list of questions

  14. I'm running on a DEC Alpha with OSF/1 v3.2 and get this error:

       Assertion failed: 0, file 
       ./../../../../../src/usr/ccs/lib/libmld/cmrlc_produce.c, line 864
       Fatal error in: /usr/lib/cmplrs/cc/ld IOT/Abort trap - core dumped
    

    The linker (/usr/bin/ld) which was shipped with early versions of OSF/1 v3.2 is apparently buggy and needs to be patched. Have your system administrator contact DEC and get patch ID OSF320-094. You *may* be able to get around this in the meantime by turning off optimization (see earlier question).

    Return to the list of questions

  15. Why do I get runtime warnings which look like this:

       ld.so.1: warning: /usr/lib/libc.so.1.8 has older revision than expected 9
    

    This happens when you run FTOOLS which have been dynamically linked with various system libraries (the default) in a different environment from where they were built (eg, built under SunOS 4.1.3 and running under Solaris). There is now a flag you can give to "./configure" to prevent this. See the INSTALL file for details.

    Return to the list of questions

  16. Why do I get runtime errors like:

       ld.so.1: fatal: libX11.so.5.0: can't open file: errno=2
    

    You need to have the directory with libX11.so* in your LD_LIBRARY_PATH. To do this type

       echo $LD_LIBRARY_PATH
    

    and then look in the different system directories to find libX11.so*. A few suggestions would be

       /usr/openwin/lib
       /usr/X11*/lib
       /usr/local/X11*/lib
       /usr/lib/X11*/lib
    

    or ask your system manager.

    Once you find your libX11.so* you need to add it to your LD_LIBRARY_PATH. The easiest is to edit your .login and change the line where you set LD_LIBRARY_PATH.

    Return to the list of questions

  17. I'm using the Common Desktop Environment (CDE) on my machine and I can't get FTOOLS to work.

    The CDE in its default setup doesn't source your .login file when you login. There are several ways to get around this. The method we currently recommend is to add the following lines to the file .dtprofile in your home directory:

       LHEASOFT=/software/lheasoft/develop/HP-UX_10.10_725/
       export LHEASOFT
       . $LHEASOFT/lhea-init.sh
    

    You will also need to make sure that your path is not set absolutely in your .cshrc but only appended to. It's probably not a good idea to set your path in your .cshrc anyway, do it in your .login, .profile, and/or your .dtprofile files and everything should work.

    With the CDE login manager, it is possible to set up your whole site to use the FTOOLS in the CDE system files. We haven't had enough experience here with the CDE to suggest the best way to do this, but system administrators wishing to do this who need more information about the FTOOLS setup in order to do this are encouraged to send us mail via the FTOOLS Help Desk.

    Return to the list of questions

  18. When I try to specify a FITS file extension using square brackets I get the following error:

       > fcalc rh701760.fits[1]
       fcalc: No match.
    

    Your shell is trying to expand the brackets. You either have to escape the brackets with backslashes (ie, fcalc rh701760.fits\[1\]) or else use the alternate "plus sign" convention (ie, fcalc rh701760.fits+1).

    Return to the list of questions

  19. How do I call an FTOOL from a script (perl, sh, etc)?

    Specify all parameters that you don't want the user prompted for on the command line using the parameter="value" syntax. Specify *all* hidden parameters (you're only going to type it once, so don't whine). For example:

       fparkey value="ROSAT" fitsfile="myfile.fits+1" keyword="MISSION"
       comm="What made this thing" add=yes 
    

    In the past, this FAQ mentioned a way to run FTOOLS using mode=h. While not particularly dangerous when used *interactively* by an experienced user, we no longer recommend this method; it's too easy for inexperienced users to shoot themselves in the foot.

    DO NOT use mode=h, in scripts! DO NOT use 'pset' to set up an FTOOL to run! (This is the number one generator of "bugs which aren't really bugs" on ftoolshelp.) DO always specify *all* parameters on the command line in scripts.

    Return to the list of questions

  20. My ftools keep dying because I didn't remove the output file before starting. This is driving me crazy.

    Most of the FTOOLS now have a clobber parameter. Just set clobber=yes (on the command line or with pset) and your output files will be cheerfully overwritten. In a less hazardous solution, most of the FTOOLS also will clobber an output file if you precede the file name with an exclamation mark. If your favorite FTOOL doesn't obey this convention, let us know, and we'll fix it for the next release.

    Return to the list of questions

  21. How do I get on-line FTOOLS help information?

    From the command line "fhelp ftools" will list all of the FTOOLS and Perl scripts with a short description of each. More and more specific help can be requested; for example "fhelp xte" will list the FTOOLS in the XTE subpackage, and "fhelp fdump" will yield the full help page for the fdump FTOOL.

    Return to the list of questions

  22. ascascreen (or other Perl scripts) are core dumping! Help!

    The official release of Perl 5.001 was very buggy; higher patchlevels of 5.001 are probably ok. If you have trouble you may need to bring your Perl up to version 5.002 (or later). A list of sites at which to obtain Perl may be found at http://perl.com/CPAN/README.html.

    Return to the list of questions

  23. I hate typing long FITS file names.

    So do I. Luckily, the FTOOLS parameter interface (XPI) uses the GNU readline library, so a full set of command line editing features is available (the same as you'd get in bash, for example). A few of the more useful keys:

    Key Action
    TAB Filename completion. (Two tabs will show you a list of possible completions if there's an ambiguity).
    up arrow (or ^p) Recall previously entered line.
    down arrow (or ^n) "Undoes" up arrow.
    right arrow (or ^f) Move cursor right on current line.
    left arrow (or ^b) Move cursor left on current line.
    RETURN Enters the parameter you've just typed. (Your cursor does not need to be at the end of the line.)

    Return to the list of questions

  24. Why does fparkey not like it when I give a filename as the keyword value?

    Due to a feature added to one of the core library routines with FTOOLS v4.1, if a string containing a forward slash ('/') is given as the keyword value (eg, in a unix path), only the characters preceding the slash will be interpreted as the keyword's value while those following it will be the comment. When entered interactively in response to fparkey's prompt, surrounding the string in single quotes prevents this parsing. When entered on the command line, however, 2 sets of quotes are required (one single and one double) because unix strips off one set before passing the string to the program. It thus looks like either this:

      > fparkey
      Keyword value[] '/home/bubba/in.fits'
      Name of FITS file and [ext#][] out.fits
      Keyword name[] RESPFILE
    
    or this:
      fparkey value="'/home/bubba/in.fits'" fitsfile=out.fits keyword=RESPFILE
    
    The single quotes must be the innermost set of quotes on the value string.

    Return to the list of questions

  25. What are the known bugs in the current version of FTOOLS?

    Descriptions of known bugs (and usually solutions) in the current software release can be found on the HEAsoft Known Bugs page.

    Return to the list of questions

  26. That's all very nice, but where can I ask a real question?

    Contact us via the FTOOLS Help Desk

    Return to the list of questions