Menu

#458 Compilation error with --enable-lean

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

I'm trying to compile with the --enable-lean flag in the configure command. I get the following error when making:

libtool: compile:  /opt/rh/devtoolset-7/root/usr/bin/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. -I. -I. -I. -I/home/cycspec/opt/include -O2 -Wall -pthread -MT standard_shell.lo -MD -MP -MF .deps/standard_shell.Tpo -c standard_shell.C -o standard_shell.o
standard_shell.C:12:10: fatal error: Pulsar/ZapInterpreter.h: No such file or directory
 #include "Pulsar/ZapInterpreter.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:530: standard_shell.lo] Error 1
make[3]: Leaving directory '/home/cycspec/opt/src/psrchive/More/Resources'
make[2]: *** [Makefile:583: all-recursive] Error 1
make[2]: Leaving directory '/home/cycspec/opt/src/psrchive/More'
make[1]: *** [Makefile:508: all-recursive] Error 1
make[1]: Leaving directory '/home/cycspec/opt/src/psrchive'
make: *** [Makefile:438: all] Error 2

If I copy ./More/RFIMitigation/Pulsar/ZapInterpreter.h to More/ResourcesPulsar/ZapInterpreter.h it solves this particular error, but it still complains at this step about a bunch of other missing header files.

Discussion

  • Ryan Lynch

    Ryan Lynch - 2022-02-05

    I was able to copy over all the header files to get around this problem, but I still run into a compilation error when trying to use the --enable-lean option

    /bin/sh ../../libtool  --tag=CXX   --mode=link /opt/rh/devtoolset-7/root/usr/bin/g++ -std=c++11  -O2 -Wall -pthread  -L/home/cycspec/opt/lib -L/usr/lib64 -o pam pam.o ../../More/libpsrmore.la ../../Base/libpsrbase.la ../../Util/libpsrutil.la ../../Util/epsic/src/libepsic.la -lm 
    libtool: link: /opt/rh/devtoolset-7/root/usr/bin/g++ -std=c++11 -O2 -Wall -pthread -o pam pam.o  -L/home/cycspec/opt/lib -L/usr/lib64 ../../More/.libs/libpsrmore.a ../../Base/.libs/libpsrbase.a ../../Util/.libs/libpsrutil.a -L/home/cycspec/opt/tempo2/lib -L//lib -L/opt/local/lib -L/usr/local/lib /home/cycspec/opt/lib/libfftw3f.so -lreadline -lgsl -lgslcblas /home/cycspec/opt/src/psrchive/Util/epsic/src/.libs/libepsic.so -lgfortran -lquadmath -lcfitsio /home/cycspec/opt/lib/libtempo2pred.so -ldl ../../Util/epsic/src/.libs/libepsic.so -lm -fopenmp -pthread -Wl,-rpath -Wl,/home/cycspec/opt/lib -Wl,-rpath -Wl,/home/cycspec/opt/src/psrchive/Util/epsic/src/.libs -Wl,-rpath -Wl,/home/cycspec/opt/lib
    /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: warning: libgfortran.so.3, needed by //usr/lib64/atlas/libsatlas.so.3, may conflict with libgfortran.so.4
    ../../More/.libs/libpsrmore.a(Archive_defaraday.o): In function `Pulsar::Archive::defaraday()':
    Archive_defaraday.C:(.text+0x71): undefined reference to `Pulsar::Integration::defaraday()'
    ../../More/.libs/libpsrmore.a(Integration_convert_state.o): In function `Pulsar::Integration::poln_convert(Signal::State)':
    Integration_convert_state.C:(.text+0x94): undefined reference to `Pulsar::PolnProfile::PolnProfile(Signal::Basis, Signal::State, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*)'
    Integration_convert_state.C:(.text+0xa4): undefined reference to `Pulsar::PolnProfile::convert_state(Signal::State)'
    Integration_convert_state.C:(.text+0xb1): undefined reference to `Pulsar::PolnProfile::~PolnProfile()'
    Integration_convert_state.C:(.text+0xde): undefined reference to `Pulsar::PolnProfile::~PolnProfile()'
    ../../More/.libs/libpsrmore.a(Integration_invint.o): In function `Pulsar::Integration::invint()':
    Integration_invint.C:(.text+0x88): undefined reference to `Pulsar::PolnProfile::set_baseline(Pulsar::PhaseWeight*)'
    Integration_invint.C:(.text+0xa9): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int)'
    Integration_invint.C:(.text+0xb9): undefined reference to `Pulsar::PolnProfile::invint(Pulsar::Profile*, bool) const'
    ../../More/.libs/libpsrmore.a(Integration_invint.o): In function `Reference::To<Pulsar::PolnProfile, true>::get() const':
    Integration_invint.C:(.text._ZNK9Reference2ToIN6Pulsar11PolnProfileELb1EE3getEv[_ZNK9Reference2ToIN6Pulsar11PolnProfileELb1EE3getEv]+0x25): undefined reference to `typeinfo for Pulsar::PolnProfile'
    ../../More/.libs/libpsrmore.a(Integration_new_PolnProfile.o): In function `Pulsar::Integration::new_PolnProfile(unsigned int)':
    Integration_new_PolnProfile.C:(.text+0xc9): undefined reference to `Pulsar::PolnProfile::PolnProfile(Signal::Basis, Signal::State, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*)'
    ../../More/.libs/libpsrmore.a(Integration_new_PolnProfile.o): In function `Pulsar::Integration::new_PolnProfile(unsigned int) const':
    Integration_new_PolnProfile.C:(.text+0x30d): undefined reference to `Pulsar::PolnProfile::PolnProfile(Signal::Basis, Signal::State, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*)'
    ../../More/.libs/libpsrmore.a(TimeIntegrate.o): In function `Pulsar::TimeIntegrate::transform(Pulsar::Archive*)':
    TimeIntegrate.C:(.text+0xb77): undefined reference to `Pulsar::Integration::defaraday(unsigned int, unsigned int, double)'
    ../../More/.libs/libpsrmore.a(FrequencyIntegrate.o): In function `Pulsar::FrequencyIntegrate::transform(Pulsar::Integration*)':
    FrequencyIntegrate.C:(.text+0x509): undefined reference to `Pulsar::Integration::defaraday(unsigned int, unsigned int, double)'
    ../../More/.libs/libpsrmore.a(Index.o): In function `Pulsar::get_Stokes(Pulsar::Integration const*, Pulsar::Index)':
    Index.C:(.text+0x1416): undefined reference to `Pulsar::PolnProfile::convert_state(Signal::State)'
    ../../More/.libs/libpsrmore.a(Index.o): In function `Reference::To<Pulsar::PolnProfile const, true>::release()':
    Index.C:(.text._ZN9Reference2ToIKN6Pulsar11PolnProfileELb1EE7releaseEv[_ZN9Reference2ToIKN6Pulsar11PolnProfileELb1EE7releaseEv]+0x43): undefined reference to `typeinfo for Pulsar::PolnProfile'
    ../../More/.libs/libpsrmore.a(Index.o): In function `Reference::To<Pulsar::PolnProfile const, true>::get() const':
    Index.C:(.text._ZNK9Reference2ToIKN6Pulsar11PolnProfileELb1EE3getEv[_ZNK9Reference2ToIKN6Pulsar11PolnProfileELb1EE3getEv]+0x25): undefined reference to `typeinfo for Pulsar::PolnProfile'
    ../../More/.libs/libpsrmore.a(Fourier.o): In function `Pulsar::detect(Pulsar::PolnProfile*)':
    Fourier.C:(.text+0x1a1): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int)'
    ../../More/.libs/libpsrmore.a(Fourier.o): In function `Pulsar::phase(Pulsar::PolnProfile*)':
    Fourier.C:(.text+0x3d1): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int)'
    ../../More/.libs/libpsrmore.a(Fourier.o): In function `Pulsar::fourier_transform(Pulsar::PolnProfile const*, FTransform::Plan*)':
    Fourier.C:(.text+0x694): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0x6af): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0x6ca): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0x6e9): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0x726): undefined reference to `Pulsar::PolnProfile::PolnProfile(Signal::Basis, Signal::State, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*)'
    ../../More/.libs/libpsrmore.a(Fourier.o): In function `Pulsar::complex_fourier_transform(Pulsar::PolnProfile const*, FTransform::Plan*)':
    Fourier.C:(.text+0xa74): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0xa8f): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0xaaa): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0xac9): undefined reference to `Pulsar::PolnProfile::get_Profile(unsigned int) const'
    Fourier.C:(.text+0xb06): undefined reference to `Pulsar::PolnProfile::PolnProfile(Signal::Basis, Signal::State, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*, Pulsar::Profile*)'
    pam.o: In function `correct_auxiliary_rm(Pulsar::Archive*, double)':
    pam.C:(.text+0xd0c): undefined reference to `Pulsar::FaradayRotation::FaradayRotation()'
    pam.C:(.text+0xd37): undefined reference to `Calibration::Faraday::set_measure(double)'
    pam.C:(.text+0xd4e): undefined reference to `Calibration::Faraday::set_reference_wavelength(double)'
    pam.o: In function `Reference::To<Pulsar::FaradayRotation, true>::get() const':
    pam.C:(.text._ZNK9Reference2ToIN6Pulsar15FaradayRotationELb1EE3getEv[_ZNK9Reference2ToIN6Pulsar15FaradayRotationELb1EE3getEv]+0x25): undefined reference to `typeinfo for Pulsar::FaradayRotation'
    pam.o: In function `Pulsar::ColdPlasma<Calibration::Faraday, Pulsar::DeFaraday>::range(Pulsar::Integration*, unsigned int, unsigned int)':
    pam.C:(.text._ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj[_ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj]+0xcd): undefined reference to `Calibration::Faraday::get_measure() const'
    pam.C:(.text._ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj[_ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj]+0xf2): undefined reference to `Calibration::Faraday::get_reference_wavelength() const'
    pam.C:(.text._ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj[_ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj]+0x224): undefined reference to `Calibration::Faraday::get_measure() const'
    pam.C:(.text._ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj[_ZN6Pulsar10ColdPlasmaIN11Calibration7FaradayENS_9DeFaradayEE5rangeEPNS_11IntegrationEjj]+0x26e): undefined reference to `Calibration::Faraday::set_frequency(double)'
    pam.o: In function `main':
    pam.C:(.text.startup+0x15c): undefined reference to `Pulsar::ReflectStokes::ReflectStokes()'
    pam.C:(.text.startup+0x122a): undefined reference to `Pulsar::ReflectStokes::add_reflection(char)'
    pam.C:(.text.startup+0x17c3): undefined reference to `Pulsar::ReflectStokes::transform(Pulsar::Archive*)'
    collect2: error: ld returned 1 exit status
    make[4]: *** [Makefile:1335: pam] Error 1
    make[4]: Leaving directory '/home/cycspec/opt/src/psrchive/More/Applications'
    make[3]: *** [Makefile:1637: all-recursive] Error 1
    make[3]: Leaving directory '/home/cycspec/opt/src/psrchive/More/Applications'
    make[2]: *** [Makefile:583: all-recursive] Error 1
    make[2]: Leaving directory '/home/cycspec/opt/src/psrchive/More'
    make[1]: *** [Makefile:508: all-recursive] Error 1
    make[1]: Leaving directory '/home/cycspec/opt/src/psrchive'
    make: *** [Makefile:438: all] Error 2
    
     
  • Willem van Straten

    • assigned_to: Willem van Straten
     
  • Willem van Straten

    Hi Ryan,

    I've checked in a bug fix. Could you please give it a try?

    Cheers,
    Willem

     

Log in to post a comment.

Auth0 Logo