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?
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
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
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:
Please let me know if this works on your end.
Cheers,
Willem
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!
psrchive is still not compiling on every Ubuntu system; the nature of the error is described here:
https://stackoverflow.com/questions/11802727/libtool-doesnt-provide-library-dependencies-to-link
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.
Drat. I've reproduced the new compilation error and checked in a fix. Sorry about that.
Please try again!
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.