Menu

#424 linking error

next release
closed
None
5
2019-06-15
2019-02-11
No

Compiling the most recent git pull gives a linking error when compiling:

../../Base/.libs/libpsrbase.so: undefined reference to `Signal::operator<<(std::ostream&, Signal::Argument)'
../../Base/.libs/libpsrbase.so: undefined reference to `Signal::operator>>(std::istream&, Signal::Argument&)'
../../Base/.libs/libpsrbase.so: undefined reference to `Pauli::basis()'
../../Base/.libs/libpsrbase.so: undefined reference to `Signal::operator>>(std::istream&, Signal::Hand&)'
../../Base/.libs/libpsrbase.so: undefined reference to `Signal::operator<<(std::ostream&, Signal::Hand)'
../../Base/.libs/libpsrbase.so: undefined reference to `Signal::operator>>(std::istream&, Signal::Basis&)'
../../Base/.libs/libpsrbase.so: undefined reference to `Signal::operator<<(std::ostream&, Signal::Basis)'

and while I can find a few reference to Signal::operator in Types.C, that seems to be it, and I can't find it in any of the object files. Any clues as to what might have changed?

Discussion

  • Willem van Straten

    • assigned_to: Willem van Straten
     
  • Willem van Straten

    Hi Nate,

    This compilation problem is most likely related to a recent change; I moved a bunch of functionality from psrchive to epsic. Could you please tell me if, when you last did a "git pull" and "make",

    a. the configure script was executed;
    b. it instructed you to install epsic and provided the script to do it?
    c. epsic installation was sucessful?

    If all of the above proceeded without any difficulty, is there any chance that epsic could have been configured to use a different version of the C++ compiler compared to what psrchive was configured to use?

    To assist with debugging, could you please gzip and attach the config.log file that was last created in your psrchive build directory?

    Cheers,
    Willem

     
  • Marcel Loose

    Marcel Loose - 2019-02-18

    Hi Nate, Willem,

    I ran into this issue very recently. I have a patch available that solves the issue. I will attach it to this ticket.

    Cheers,
    Marcel Loose (ASTRON)

     

    Last edit: Marcel Loose 2019-02-18
  • Willem van Straten

    Hi Marcel,

    Thanks for the patch. I've tried solving the problem in a slightly different way. For some reason, when psrchive is configured with --enable-shared, it seems to ignore/forget the static library libepsic.a ... so I've updated epsic to install the dynamic shared object library libepsic.so by default. This fixed up psrchive compilation without having to explicitly add EPSIC_LIBS to the various Makefiles. To try out this solution:

    cd psrchive
    ./update
    # optionally change to different $builddir
    cd packages
    make
    ./epsic.csh
    # this should install libepsic.so in $prefix/lib
    cd ..
    make
    

    Please let me know if this works on your end.

    Cheers,
    Willem

     
  • Willem van Straten

    My solution didn't work on Ubuntu with --enable-shared, so I've also gone through the Makefiles and added @EPSIC_LIBS@ as suggested by Marcel.

    Thanks, Marcel!

     
  • Marcel Loose

    Marcel Loose - 2019-02-20

    The current master doesn't compile anymore on my system (running Linux Mint 18.3), so I cannot check if the DSO issue is now resolved. The commit that breaks the build for me is 04ac8455.

     
  • Willem van Straten

    Drat. I've reproduced the new compilation error and checked in a fix. Sorry about that.

    Please try again!

     
  • Marcel Loose

    Marcel Loose - 2019-02-21

    Yep. It is solved now. I tried it both on my system, running Linux Mint 18.3; and on an older system, running Ubuntu 14.04.5 LTS.
    Thanks.

     
  • Willem van Straten

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB