FTOOLS v4.0 Bug List
The following is an incomplete list of known bugs in v4.0 of FTOOLS. (Current version is v4.2.)
- fltime: This tool will crash when it tries to report an error. Download this fixed version and save it as ftools/time/src/fltime/fltime.f, replacing the current version. Now rebuild the 'time' package as described in the FAQ's rebuild instructions.
-
fimgtrim: A faulty logic test prevents this tool from working. To fix, edit line 180 of ftools/fimage/src/fimgtrim/fimgtrim.c to read
if((type[0] != 'p') && (type[0] != 'a'))
The original line has a '||' instead of the '&&' inbetween the two type[0] comparisons. Now rebuild the 'image' package as described in the FAQ's rebuild instructions. - Failed install: Ftools installation makes use of the command "install" to install itself. It expects to be running the standard system version, but IDL has its own install script which is sometimes found first. This causes the 'make install' step of the installation to fail. If this occurs, change your path variable so that the location of the regular install (eg, /usr/bin or something similar) comes first... check this with "which install"... then redo the install step.
- IRIX64 support: At the time of the FTOOLS 4.0 release, IRIX64 machines were not in as widespread use (and we had no access to one), so the release was never built on that platform and the configure scripts do not even recognize it. If you do not plan on using the tcl/tk graphical tools (fv, flaunch, xselect2), the easiest solution is to just grab the IRIX binary release which we built under IRIX 5.3, but should still work under IRIX 6.*. FTOOLS 4.1 does support IRIX64 systems.
-
hriexpmap: The output exposure map has incorrectly set pixel size and dummy RA and DEC keywords. The map itself is correct, though. If necessary, you can fix all the values by hand using the fparkey tool:
fparkey 0.00138889 file.fits+0 CDELT1 fparkey 0.00138889 file.fits+0 CDELT2 fparkey (RA value) file.fits+0 CRVAL1 fparkey (DEC value) file.fits+0 CRVAL2
BTW, all the values have to be in decimal degrees and the '+0' in the filename is necessary to specify the primary array of the fits file. If you need a better solution, grab this fixed file, save it as ftools/rosat/src/hriexpmap/hriexpmap.f, and rebuild the 'rosat' package as described in the FAQ's rebuild instructions. hriexpmap will now correctly set all these keywords. -
quzcif (and maybe others) on HPs: This tool will crash with a bus error under HP-UX because of an incorrect data type in a function call. (It doesn't appear to affect any other machines, but if you haven't already built FTOOLS, it wouldn't hurt to fix this error for other machines, too.) The call is within one of the FTOOLS core libraries, so to make sure the error gets fixed everywhere (not just this one tool) after making the following edits, you will need to scrap your HP-UX_10... directory and rebuild the FTOOLS from scratch. The error is present in two files located in the ftools/library/utilities/gen/ directory. Change line 934 of gtcal.f to read:
call ftgcvd(unit,refcol,i,1,1,0.D0,refval,ljunk,errstat)
The only change is that parameter 6 goes from "0" to "0.D0". Also change the following 3 lines in qzcif.f:Line # Correction ----------------------v 284 call ftgcvd(unit,refcol,i,1,1,0.D0,refval, 286 call ftgcvj(unit,qulcol,i,1,1, 0 ,qulval, 309 call ftgcvj(unit,extcol,i,1,1, 0 ,
-
saextrct on HPs: The same problem affecting quzcif above also affects the XTE tool saextrct. Fix as follows...
- Correct the following lines in ftools/xte/src/saextrct/saextrct.f:
Line # Correction -----v (insert d) 4063 & ,nultyp,nulvald,darray,flgval,anynul,status) 4476 & ,nultyp,nulvald,darray,flgval,anynul,status)
- delete the saextrct executable in ${FTOOLS}/bin
- rebuild the 'xte' package as described in the FAQ's rebuild instructions.
- Correct the following lines in ftools/xte/src/saextrct/saextrct.f:
-
Bad Dates on HPs: As currently set up, the wrong version of Fortran's get date function is being selected by the f77 compiler, resulting in garbage dates being returned from FITSIO's ftgsdt function. It primarily affects HISTORY keywords written as time stamps, but it can also cause problems in tools in which "now" is entered as a time parameter. One such case, which exposed this issue, is quzcif. Because changing the compiler flags, so that the correct date function is selected, causes problems with other tools, fixing the problem requires rebuilding the FTOOLS package in 2 steps:
- Go to the ftools/host directory and edit the Makefile there. (If it isn't currently set up for the HP, run ./configure first.) Line 54 contains the following definition for FFLAGS:
FFLAGS = -O +e +ppu +U77 +es
Edit the line to readFFLAGS = -O +E2E4E5E6E7 -K +ppu +U77 +es
(ie, replace +e with +E2E4E5E6E7 -K). Still in the host directory, domake libfitsio.a >& build1.log &
- When the make finishes (it should only take a few minutes), re-edit the Makefile, restoring the FFLAGS to its original form. Then, do a regular
make >& build2.log &
If all goes well, finish the installation withmake install >& install.log &
- Go to the ftools/host directory and edit the Makefile there. (If it isn't currently set up for the HP, run ./configure first.) Line 54 contains the following definition for FFLAGS:
-
sisrmg: Under Linux, sisrmg gives faulty results due to some as-yet unknown problem with the gcc/g77 compilers. The problem can be fixed, though, by compiling the program with optimization off. This requires doing the following:
- Edit the file ftools/asca/src/sisrmg/Makefile. Add "-O0" (that is dash, capital letter oh, numeral zero) to lines 128 and 130 so that they read, respectively,
$(FC) $(LOC_FFLAGS) $(FFLAGS) -O0 -c $< $(CC) $(LOC_CFLAGS) $(CFLAGS) -O0 $(CPPFLAGS) -c $<
If you have not already compiled FTOOLS, follow the installation instructions which came with it. Otherwise, follow the remaining instructions here. - delete the sisrmg executable in ${FTOOLS}/bin
- rebuild the 'asca' package as described in the FAQ's rebuild instructions.
- Edit the file ftools/asca/src/sisrmg/Makefile. Add "-O0" (that is dash, capital letter oh, numeral zero) to lines 128 and 130 so that they read, respectively,
-
pquery: Due to changes made to the XPI library for FTOOLS 4.0, pquery, which returns selected parameter values in an ftool's .par file, would fail to return a value for hidden parameters. To correct this bug, do the following:
- download this new pquery file and put it in the ftools/xanlib/xpi/ directory as pquery.c
- remove pquery.o from that same directory.
- in ftools/host/Makefile change the line:
FTOOLS_LIB=${FTOOLS_SRC}/lib.tmp
to:FTOOLS_LIB=${FTOOLS}/lib
- make xpiutils
- copy the resulting pquery executable from ftools/bin.host to ${FTOOLS}/bin
- IRAF FTOOLS: When built under IRAF, a bug in fitsio resulted in faulty Ftools executables. This is fixed in the release tarfile dated 16:04 EST Aug 5, 1997. This does not affect the host (UNIX) version of Ftools at all.
-
mgtime: Mgtime has a bug in the OR operator: when an interval ends before an overlapping, earlier one does, the output interval has the earlier end time, instead of the later. The result is that the output GTI will be too short. Here is a patch for the FTOOLS 4.0 file ${FTOOLS_SRC}/time/src/mgtime/mgtime.f:
24a25 > C 8/1/1997 Jeff Guerber - In fimerg, fix bug in OR section 55c56 < taskname = 'mgtime2.3' --- > taskname = 'mgtime2.4' 687a689,690 > C 8/ 1/1997 Jeff Guerber - Fix bug in OR section: Compare start with > C tmp_stop not stop, and set tmp_stop to max(stop,tmp_stop) not just stop 835,836c838,839 < if(start(i) .le. stop(i-1)) then < tmp_stop(nngti) = stop(i) --- > if( start(i) .le. tmp_stop(nngti) ) then > tmp_stop(nngti) = max(stop(i), tmp_stop(nngti)) 1099d1101 <
- FTP download: Users from the UK (and possibly other places in Europe) have had trouble ftping the ascadata.v4.0.tar.gz file. If your ftp connection resets itself while downloading this file, see the instructions in the README file for our "split" distribution directory.
-
Extractor: Extractor fails if a phase bin selection is used without any other time selections. This bug causes xselect to fail on the extract (or bin) command if "filter phase" has been set but no other time selections have been specified. The fix is to get new versions of the files xselect/extractor/times.f and xselect/extractor/exwin.inc and rebuild the extractor. To rebuild the extractor, replace the line in host/Makefile that reads:
FTOOLS_LIB=${FTOOLS_SRC}/lib.tmp
with:FTOOLS_LIB=${FTOOLS}/lib
Then type 'make xselall'. Note: it is not necessary to apply this fix if you obtained the release tarfile after 16:04 EST Aug 5, 1997. See the ASCA known bugs page for additional bug fixes in this package. -
tcl/tk Linux build (prob 1): On some versions of Linux, configure can fail to figure out how to build dynamic libraries in the "tcltk2" section of the build. Usually, the failure will look like:
> checking for dld.h... (cached) no > cfitsio: == Using gcc version 2.7.2 > checking whether cross-compiling... (cached) no > checking for ANSI C header files... (cached) yes > checking for working alloca.h... (cached) yes > checking for alloca... (cached) yes > checking for alloca.h... (cached) yes > creating ./config.status > creating Makefile > make[2]: Entering directory > `/usr/local/src/FTOOLS/ftools/tcltk2/fitsTcl' > fitsInit.o fitsUtils.o fitsTcl.o cfitsio/*.o tclShared.o -o > libfitstcl.so > /bin/sh: ./fitsInit.o: Permission denied > make[2]: *** [libfitstcl.so] Error 126 > make[2]: Leaving directory `/usr/local/src/FTOOLS/ftools/tcltk2/fitsTcl' > make[1]: *** [fitstcl1] Error 2 > make[1]: Leaving directory `/usr/local/src/FTOOLS/ftools/tcltk2' > make: *** [tcltk] Error 2
The problem is that configure doesn't find /lib/libdl.so, and tcltk requires dynamic loading. Take a look in /lib at the various libdl.so files and symbolic links. You'll find something like /lib/libdl.so.1.7.14 there and probably a symbolic link from it to libdl.so.1. What you need, however, is an additional symbolic link such that /lib/libdl.so -> /lib/libdl.so.1Create the link ('ln -s /lib/libdl.so.1 /lib/libdl.so' ) . In the ftools/tcltk2 directory type 'make clean'. Then restart the tcltk build over again by doing a "make tcltk" in ftools/host.
- tcl/tk Linux build (prob 2): One of the tcl/tk Makefiles included in FTOOLS is not fully compatible with the Debian Linux Bourne shell. A fixed version should be downloaded and replace the file ftools/tcltk2/itcl2.2/Makefile.in.
Once I've installed the FTOOLS, how do I rebuild just one of them (to apply a patch, make my own changes, etc.)?
- Set your FTOOLS variable and execute the initialization script. (That is finit.sh for Bourne shell or finit.csh for Cshell.)
- Go to the directory <ftools>/host, where I use <ftools> to refer to the full path to your ftools source directory.
Note: Do not do steps 3 and 4 unless you built multiple architectures from the same source tree.
- Type "make distclean". This will make sure the source tree is in pristine condition to do the rebuild, and will not affect any installed Ftools (unless someone tampered with the Makefile). Note that this step removes the Makefile, so if you already typed make distclean before, you will get an error.
- Re-run configure to create a Makefile appropriate to your architecture. If you used any custom switches, such as --prefix=, when you first ran configure and installed your Ftools, you should use the same switches again.
- Remove or rename the old executable, which is in $FTOOLS/bin
- Finally, type:
make <pkg> "FTOOLS_BIN=$FTOOLS/bin" "FTOOLS_LIB=$FTOOLS/lib"
where <pkg> is the ftools package your tool belongs to (e.g. heasarc, xte, etc.).
If no errors occur, this should have reinstalled the tool which changed. Note that you do not need to type 'make install'!
Note 1: to rebuild the extractor or xselect, follow the above instructions and use 'xselall' as <pkg> to do the recompile.
Note 2: to rebuild a library, follow the above instructions, except delete the library from the library directory $FTOOLS/lib/ and use 'libname.a' as <pkg>, where 'libname.a' is the same as the actual library being deleted (not a package name). Now you have to rebuild any tools which depend on this library (or at least the change being made). If it is a core library (libfitsio.a or libftools.a) you may be better off rebuilding everything from scratch as described in the INSTALL directions.