TEMPO2 Predictor library was not found: (desirable)

0 votes

When compiling with:

 ./configure F77=gfortran --prefix=/home/bgx/local/share/pulsar LIBS=-lgslcblas

Return:
The TEMPO2 Predictor library was not found: (desirable)
  PSRCHIVE applications will not be able to use TEMPO2 predictors.
  Run ./packages/tempo2.csh to automatically install.
 
But tempo2 is installed and TEMPO2 enviorment variable is set.
 
[---|bgx]:~/code/psrchive-2012-12$ echo $TEMPO2
/home/bgx/local/share/tempo2
 
[---|bgx]:~/code/psrchive-2012-12$ ls $TEMPO2/lib
libsofa.a   libsofa.so    libsofa.so.0.0.0  libtempo2.la     libtempo2pred.la  libtempo2pred.so.0      libtempo2.so    libtempo2.so.0.0.0
libsofa.la  libsofa.so.0  libtempo2.a       libtempo2pred.a  libtempo2pred.so  libtempo2pred.so.0.0.0  libtempo2.so.0
 
[---|bgx]:~/code/psrchive-2012-12$ ls $TEMPO2/include
tempo2.h  tempo2pred.h  tempo2pred_int.h
 
What could be failing????
 
Best regards
 
 
asked Sep 19, 2013 by bgx (120 points)

2 Answers

0 votes
Good question: could you please send the (preferably gzipped) config.log file generated by the configure script?
answered Sep 20, 2013 by straten (630 points)
0 votes

This is the result of a bug in the compilation process of tempo2: the libtempo2pred library is linked without the -lm option even though it depends on the standard math library. This is a correctable problem when using gcc to compile as a C program; simply add -lm on the link line after -ltempo2pred. But it does not work with g++, perhaps because of name mangling. I have submitted a patch to the tempo2 mailing list, but it's very simple; just add the line "libtempo2pred_la_LIBADD = -lm" to Makefile.am, then recompile tempo2 (including the bootstrap/prepare step) and reinstall it.

Yes it's a pain. 

[edited to add: this is now in tempo2 CVS]

answered Oct 9, 2013 by peridot (140 points)
edited Oct 9, 2013 by peridot
...