View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

RVSAO and libsmw.a

enthusediswear wrote on Jan 16, 2009

I'm trying to compile the RVSAO extern, and it fails to link to libsmw.a:

Library librv.a is up to date
check file `librv.a' into `bin'
xc -c -w -p noao x_rvsao.x
x_rvsao.x:
   sys_runtask:
x_rvsao.f:
   sysruk:
move `bin/librv.a' to `librv.a'
xc -Nz -/static -p noao -z x_rvsao.o librv.a -lsmw -lxtools -lcurfit -liminterp -lllsq -o xx_rvsao.e
/usr/bin/ld: cannot find -lsmw
collect2: ld returned 1 exit status
move `librv.a' to `bin/librv.a'
delete file x_rvsao.o
move `xx_rvsao.e' to `bin/x_rvsao.e'
$move: file `xx_rvsao.e' not found
Warning, mkpkg line 13: error moving file xx_rvsao.e
Warning, mkpkg line 9: module `install' not found or returned error


When looking for libsmw.a, i get the following:

>ls -l $iraf/noao/lib/libsmw.a 
lrwxrwxrwx 1 root root 15 2008-06-17 18:19 /usr/lib/iraf/iraf/noao/lib/libsmw.a -> ../bin/libsmw.a


But when following that, it turns out to be a dangling symlink:
>ls -l $iraf/noao/bin/
total 0


I have tried reinstalling and rebuilding the IRAF system, but the results are the same. Any ideas? Thanks.

Mike Fitzpatrick wrote on Jan 16, 2009

The dangling link is normal when the NOAO package is configured generically (i.e. the noao$bin link points to bin.generic). When the compilation is done the path to the library will include the architecture for your system, e.g. noao$bin.redhat/libsmw.a, this is the file you should be looking for.

You can compile with e.g. "mkpkg -dv -p rvsao" to print out verbose debug information including the final gcc call to do the linking that will tell you exactly where its looking for the files. Normally if you don't define the IRAFARCH environment variable you would see many other errors, but perhaps it is just defined incorrectly for your system. What platform is this?

-Mike

enthusediswear wrote on Jan 16, 2009

This is on a debian (etch, x64) system. Here is an output of "mkpkg -dv -p rvsao":

> mkpkg -dv -p rvsao 
mkpkg -dv -p rvsao
push_context (module=BOF, newdir=, fname=hlib$mkpkg.inc)
do_mkpkg (file=hlib$mkpkg.inc, library=, islib=0)
search_mkpkgfile (file=hlib$mkpkg.inc, library=)
set MACH = `linux'
put symbol MACH = `linux'
set HOSTID = `unix'
put symbol HOSTID = `unix'
set SITEID = `noao'
put symbol SITEID = `noao'
$ifeq (MACH, freebsd) -> NO
$ifeq (MACH, linux) -> YES
set XFLAGS = `-c -w'
put symbol XFLAGS = `-c -w'
set XVFLAGS = `-c -w'
put symbol XVFLAGS = `-c -w'
set LFLAGS = `-Nz -/static'
put symbol LFLAGS = `-Nz -/static'
set USE_LIBMAIN = `yes'
put symbol USE_LIBMAIN = `yes'
set USE_KNET = `yes'
put symbol USE_KNET = `yes'
set USE_SHLIB = `no'
put symbol USE_SHLIB = `no'
set USE_CCOMPILER = `yes'
put symbol USE_CCOMPILER = `yes'
set USE_GENERIC = `yes'
put symbol USE_GENERIC = `yes'
set USE_NSPP = `no'
put symbol USE_NSPP = `no'
set USE_IIS = `no'
put symbol USE_IIS = `no'
set USE_CALCOMP = `no'
put symbol USE_CALCOMP = `no'
set LIB_CALCOMP = `-lcalcomp'
put symbol LIB_CALCOMP = `-lcalcomp'
$ifeq (MACH, linux, redhat, macosx, macintel) -> YES
push_context (module=BOF, newdir=, fname=hlib$mkpkg.sf.MACX)
do_mkpkg (file=hlib$mkpkg.sf.MACX, library=, islib=0)
search_mkpkgfile (file=hlib$mkpkg.sf.MACX, library=)
scan special file list for directory sys$osb/
search sflist for directory /usr/lib/iraf/iraf/sys/osb/
file aclrb.c -> as$aclrb.c, mkobj = `'
file bytmov.c -> as$bytmov.c, mkobj = `'
file ieeer.x -> as$ieeer.x, mkobj = `'
file ieeed.x -> as$ieeed.x, mkobj = `'
4 special files added; total ndirs=1, nfiles=4
scan special file list for directory sys$vops/ak/
search sflist for directory /usr/lib/iraf/iraf/sys/vops/ak/
file aclrc.x -> as$aclrc.c, mkobj = `'
file aclrs.x -> as$aclrs.c, mkobj = `'
file aclri.x -> as$aclri.c, mkobj = `'
file aclrl.x -> as$aclrl.c, mkobj = `'
file aclrr.x -> as$aclrr.c, mkobj = `'
file aclrd.x -> as$aclrd.c, mkobj = `'
6 special files added; total ndirs=2, nfiles=10
scan special file list for directory sys$vops/lz/
search sflist for directory /usr/lib/iraf/iraf/sys/vops/lz/
file amovc.x -> as$amovc.c, mkobj = `'
file amovs.x -> as$amovs.c, mkobj = `'
file amovi.x -> as$amovi.c, mkobj = `'
file amovl.x -> as$amovl.c, mkobj = `'
file amovr.x -> as$amovr.c, mkobj = `'
file amovd.x -> as$amovd.c, mkobj = `'
6 special files added; total ndirs=3, nfiles=16
set XBIG = `& "$xc -c -w -/Nx512 -/Ns2048 &"'
put symbol XBIG = `& "$xc -c -w -/Nx512 -/Ns2048 &"'
scan special file list for directory sys$fmtio/
search sflist for directory /usr/lib/iraf/iraf/sys/fmtio/
file evvexpr.x -> evvexpr.x, mkobj = `$xc -c -w -/Nx512 -/Ns2048 evvexpr.x'
1 special files added; total ndirs=4, nfiles=17
set XNL = `& "$xc -c -/NL400 &"'
put symbol XNL = `& "$xc -c -/NL400 &"'
scan special file list for directory math$slalib/
search sflist for directory /usr/lib/iraf/iraf/math/slalib/
file obs.f -> obs.f, mkobj = `$xc -c -/NL400 obs.f'
1 special files added; total ndirs=5, nfiles=18
pop_context (library=)
pop_context (library=)
push_context (module=BOF, newdir=, fname=rvsao$lib/mkpkg.inc)
do_mkpkg (file=rvsao$lib/mkpkg.inc, library=, islib=0)
search_mkpkgfile (file=rvsao$lib/mkpkg.inc, library=)
set XFLAGS = `-c -w -c -O -q -p noao'
put symbol XFLAGS = `-c -w -c -O -q -p noao'
set XVFLAGS = `-c -w -p noao'
put symbol XVFLAGS = `-c -w -p noao'
set LFLAGS = `-Nz -/static -O -q -p noao'
put symbol LFLAGS = `-Nz -/static -O -q -p noao'
pop_context (library=)
do_mkpkg (file=mkpkg, library=, islib=0)
search_mkpkgfile (file=mkpkg, library=)
$call relink
push_context (module=relink, newdir=, fname=)
do_mkpkg (file=mkpkg, library=relink, islib=0)
search_mkpkgfile (file=mkpkg, library=relink)
goto relink
scan_modlist (file=mkpkg, line=17, library=relink, islib=0)
search sflist for directory /usr/lib/iraf/externs/rvsao/
!mkpkg -p noao nrelink
check out file `librv.a = bin/librv.a'
Subdirectory Util is up to date
Subdirectory Xcsao is up to date
Subdirectory Emsao is up to date
Subdirectory Linespec is up to date
Subdirectory Sumspec is up to date
Subdirectory Eqwidth is up to date
Library librv.a is up to date
check file `librv.a' into `bin'
xc -c -w -p noao x_rvsao.x
x_rvsao.x:
   sys_runtask:
x_rvsao.f:
   sysruk:
move `bin/librv.a' to `librv.a'
xc -Nz -/static -p noao -z x_rvsao.o librv.a -lsmw -lxtools -lcurfit -liminterp -lllsq -o xx_rvsao.e
/usr/bin/ld: cannot find -lsmw
collect2: ld returned 1 exit status
move `librv.a' to `bin/librv.a'
delete file x_rvsao.o
not root library; return to higher level
pop_context (library=relink)
file name cache: 0 hits, 0 misses, 0% of 0
file date cache: 0 hits, 0 misses, 0% of 0

Mike Fitzpatrick wrote on Jan 16, 2009

In that case, the file should be $iraf/noao/bin.linux/libsmw.a and your IRAFARCH should be 'linux'. However, compilation on a 64-bit system isn't supported, so if the file exists it may be that the compiler isn't recognizing the 32-bit library as compatible and quitting at that point.

In any case, I've put tarballs of the latest RVSAO source and binaries in the downloads area (http://iraf.net/ftp/iraf/extern).

-Mike

enthusediswear wrote on Jan 16, 2009

Many thanks for the binaries. They solve the original problem I had, but now I get this error:

rvsao> linespec emtemp.dat emtemp2a
IRAF rvsao.linespec 2.6.9 bersuder@induce  21-Jan-2009 17:31
INDEFA - INDEFA by INDEFA: INDEF points in spectrum
Spread by 2.00A

ERROR: floating point overflow


Any ideas? I've tried this on machines both 32 and 64 bit.

Thanks so much for your help.

Mike Fitzpatrick wrote on Jan 16, 2009

Your best bet may be to contact the package author (Doug Mink at CfA, dmink@cfa.harvard.edu). Overflow errors can sometimes happen if e.g. the data are flux calibrated, but could also be a coding error of some kind or a misinterpretation of the header information. The binaries I built were for the latest release of the package, Doug may want to see your data and parameters to reproduce the problem.

-Mike

enthusediswear wrote on Jan 16, 2009

Will do, thanks very much for all your help.

Last post on Jan 16, 2009