Menu

#459 Additional compilation errors

next release
open
None
5
2022-03-01
2022-02-05
Ryan Lynch
No

When trying to build psrchive with no configure flags other than --prefix I get the following error during compilation. I have seen this on two separate Linux systems (one Red Hat, one Ubuntu).

I did a git pull and seem to be up to date. The git hash I'm on is
fcda37b6b91cc811e4c25e9ff0c5ba79bd3ca5ee

pas.C: In function int main(int, char**):
pas.C:87:9: warning: variable ephase set but not used [-Wunused-but-set-variable]
   87 |   float ephase;
      |         ^~~~~~
pas.C: In function void cross(Reference::To<Pulsar::Archive>, Reference::To<Pulsar::Archive>, bool, bool, char*):
pas.C:667:10: warning: statement has no effect [-Wunused-value]
  667 |   strncmp(line, "", 100);
      |   ~~~~~~~^~~~~~~~~~~~~~~
pas.C:644:15: warning: variable ephase set but not used [-Wunused-but-set-variable]
  644 |   float fmax, ephase, stdphase;
      |               ^~~~~~
/bin/bash ../../libtool  --tag=CXX   --mode=link g++ -std=c++11  -O2 -Wall -pthread  -L/usr/local/lib  -o pas pas.o ../../More/Plotting/libpsrplot.la ../../More/libpsrmore.la ../../Base/libpsrbase.la ../../Util/libpsrutil.la ../../Util/epsic/src/libepsic.la -L/usr/lib/pgplot5 -lcpgplot -lpgplot  -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lgfortran -lm -lquadmath  -lm 
libtool: link: g++ -std=c++11 -O2 -Wall -pthread -o pas pas.o  -L/usr/local/lib ../../More/Plotting/.libs/libpsrplot.a -L/usr/lib/pgplot5 ../../More/.libs/libpsrmore.a ../../Base/.libs/libpsrbase.a ../../Util/.libs/libpsrutil.a -lfftw3f -lreadline -lgsl -lgslcblas /home/rlynch/opt2/src/psrchive/Util/epsic/src/.libs/libepsic.so -lcfitsio -lpthread -L/usr/local/tempo2/lib /usr/local/lib/libtempo2pred.so -L//lib ../../Util/epsic/src/.libs/libepsic.so -lcpgplot -lpgplot -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. -lgfortran -lquadmath -lm -fopenmp -pthread -Wl,-rpath -Wl,/home/rlynch/opt2/src/psrchive/Util/epsic/src/.libs
depbase=`echo psrdiff.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../..  -I../../local_include -I../../Util/epsic/src -I../../Util/epsic/src/util -I../../Util/epsic/src/util  -I/usr/lib/pgplot5 -I/usr/include  -I. -I. -I. -I. -I/usr/local/include   -O2 -Wall -pthread -MT psrdiff.o -MD -MP -MF $depbase.Tpo -c -o psrdiff.o psrdiff.C &&\
mv -f $depbase.Tpo $depbase.Po
psrdiff.C:413:17: error: BinaryStatistics is not a namespace-name
  413 | using namespace BinaryStatistics;
      |                 ^~~~~~~~~~~~~~~~
psrdiff.C:416:47: error: ArchiveComparisons has not been declared
  416 | vector<double> log_likelihood (Archive* data, ArchiveComparisons* model)
      |                                               ^~~~~~~~~~~~~~~~~~
psrdiff.C: In function std::vector<double> log_likelihood(Pulsar::Archive*, int*):
psrdiff.C:418:10: error: request for member set_Archive in * model, which is of non-class type int
  418 |   model->set_Archive (data);
      |          ^~~~~~~~~~~
psrdiff.C:431:12: error: request for member set_subint in * model, which is of non-class type int
  431 |     model->set_subint (isubint);
      |            ^~~~~~~~~~
psrdiff.C:438:14: error: request for member set_chan in * model, which is of non-class type int
  438 |       model->set_chan (ichan);
      |              ^~~~~~~~
psrdiff.C:439:32: error: request for member get in * model, which is of non-class type int
  439 |       result.push_back (model->get());
      |                                ^~~
make[4]: *** [Makefile:1646: psrdiff.o] Error 1
make[4]: Leaving directory '/home/rlynch/opt2/src/psrchive/More/Applications'
make[3]: *** [Makefile:1682: all-recursive] Error 1
make[3]: Leaving directory '/home/rlynch/opt2/src/psrchive/More/Applications'
make[2]: *** [Makefile:595: all-recursive] Error 1
make[2]: Leaving directory '/home/rlynch/opt2/src/psrchive/More'
make[1]: *** [Makefile:520: all-recursive] Error 1
make[1]: Leaving directory '/home/rlynch/opt2/src/psrchive'
make: *** [Makefile:451: all] Error 2

Discussion

  • Willem van Straten

    • assigned_to: Willem van Straten
     
  • Willem van Straten

    Hi Ryan,

    I've also checked in a fix for this bug ... please let me know if if works on your end.

    Cheers,
    Willem

     

Log in to post a comment.

Auth0 Logo