errors compiling MSCRED for redhat
Robert Knop wrote on Jan 11, 1999
I'm trying to compile mscred on a Redhat 5.2 system, as there are no precompiled redhat binaries available. I'm running into trouble. I've already got tables installed (I installed the binaries), though I haven't tested it. At the command "mkpkg -p mscred -p tables", I get a large number of errors: (1) cor.c gives a lot of errors. (2) x_ccdred.f gives errors: x_ccdred.f: sysruk: xc -Nz -p mscred -p tables x_ccdred.o libpkg.a -lxtools -lcurfit -lgsurfit -lncar -lgks -o xx_ccdred.e libpkg.a(t_combine.o): In function `icombe_': t_combine.o(.text+0x3b6b): undefined reference to `icombs_' t_combine.o(.text+0x3bc7): undefined reference to `icombr_' libpkg.a(doproc.o): In function `doproc_': doproc.o(.text+0x32): undefined reference to `proc1s_' doproc.o(.text+0x42): undefined reference to `proc1r_' doproc.o(.text+0x72): undefined reference to `proc2s_' doproc.o(.text+0x82): undefined reference to `proc2r_' libpkg.a(icscale.o): In function `icscae_': icscale.o(.text+0xa95): undefined reference to `icstar_' libpkg.a(icscale.o): In function `mefscs_': icscale.o(.text+0x22b9): undefined reference to `icstar_' libpkg.a(ccdmean.o): In function `ccdmen_': ccdmean.o(.text+0x126): undefined reference to `procmr_' Warning, mkpkg line 13: module `ccdred' not found or returned error Warning, mkpkg line 7: module `relink' not found or returned error move `xx_ccdred.e' to `mscbin$x_ccdred.e' $move: file `xx_ccdred.e' not found Warning, mkpkg line 17: error moving file xx_ccdred.e Warning, mkpkg line 8: module `install' not found or returned error Warning, mkpkg line 8: module `update@ccdred' not found or returned error warning: library `libpkg.a' not found xc -c -w -p mscred -p tables akavg.x ampset.x gamma.x linebias.x maxmin.x migl2.x mignl.x migs2.x miproc.x mitemplate.x mkoverscan.x mosmap.x mosqproc.x mscg.x proc.x sigm2.x t_mosqproc.x t_mscdisplay.x t_mscrtdisp.x Any suggestions would be appreciated. Thanks, -Rob =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ==== Rob Knop ===== rknop@lbl.gov ====== http://panisse.lbl.gov/~rknop ======
Mike Fitzpatrick wrote on Jan 11, 1999
> I'm trying to compile mscred on a Redhat 5.2 system, as there are no
> precompiled redhat binaries available. I'm running into trouble.
> :
> (1) cor.c gives a lot of errors.
> (2) x_ccdred.f gives errors:
>
> x_ccdred.f:
> sysruk:
> xc -Nz -p mscred -p tables x_ccdred.o libpkg.a -lxtools -lcurfit
> -lgsurfit -lncar -lgks -o xx_ccdred.e
> libpkg.a(t_combine.o): In function `icombe_':
> t_combine.o(.text+0x3b6b): undefined reference to `icombs_'
> :
All of the errors cascade from the failure to compile the cor.x
file, which in turn punts on the compilation of later files resulting in
the many unresolved references. The exact cause is an obscure bug in
the hlib$f77.sh script used to drive the F2C/GCC compilation of SPP source
files. First there are three workarounds:
1) install the redhat binaries for MSCRED V2.0 I've just put in
the archive directory.
2) before doing the main package compilations, compile the file
mscred$src/ccdred/src/generic/cor.x by hand using the commands
% xc -F cor.x # produce a cor.f file
% xc -c cor.f # compile it to a .o file
3) Edit line 157 of hlib$f77.sh to read
sed -e "s/$b\\.f/$b.x/" < $b.c > $b.t; mv $b.t $b.c
and compile the package normally. This last option fixes the
bug mentioned above.
Analysis:
In compiling the cor.x file, as with all SPP files, spp variables
are shortened to 6 characters by eliminating the underscores and using the
first five plus the last character to form the final name. A new set of
procedures called e.g. 'cor1flats' was added to the file in this version,
the resulting name in the intermediate cor.c file is then 'cor1fs'. When
this file is compiled the f77.sh script edits the file to change the
filename as it appears in the program comments ('cor.f' in this case), but
the sed script mistakenly uses the '.' as a wildcard character. In this
case the filename 'cor.f', with the wildcard, matches the 'cor1fs'
variable name produced and changes this variable to then be 'cor.fs' which
is causing the compilation errors.
This bug is pretty obscure due to the special filename
requirements to trigger it and has only been seen once before. The f77.sh
script has been fixed for the next release of PC-IRAF. If you still have
problems let us know.
Mike Fitzpatrick
Last post on Jan 11, 1999