Problems with bary plugin

Issue #83 resolved
zihao zhao created an issue

Recently I want to use bary plugin to barycenter some photon TOA data. But when I try to use this plugin in MacOS, I’ll get the error message below

% ./tempo2 -gr bary -h
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under conditions of GPL license.

Looking for /usr/local/tempo2/plugins//bary_darwin21_plug.t2
dlerror() = dlopen(/usr/local/tempo2/plugins//bary_darwin21_plug.t2, 0x000A): symbol not found in flat namespace '_get_obsCoord_IAU2000B'
[error]: dlopen() failed while resolving symbols.

Then I try it again on a remote server(Centos7), tempo2 in this server was installed via anaconda, and I get similar error message

(tempotest) [zhz@R940xa zhz]$ tempo2 -gr bary -h
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under conditions of GPL license.

Looking for /data/zhz/anaconda3/envs/tempotest/share/tempo2/plugins//bary_linux-gnu_plug.t2
dlerror() = /data/zhz/anaconda3/envs/tempotest/share/tempo2/plugins//bary_linux-gnu_plug.t2: undefined symbol: get_obsCoord_IAU2000B
[error]: dlopen() failed while resolving symbols.

it seems that the function ‘get_obsCoord_IAU2000B' went wrong.

I have examined the source code and recompiled TEMPO2 but finally failed to solve this problem, hope there will be someone help me out. Thanks a lot.

Comments (3)

  1. Michael Keith

    Ok - this is actually a bug it seems, though I’m not quite sure of the root cause. The bug is as follows:

    get_obsCoord_IAU2000B is part of the core tempo2 code, and is declared extern "C", but the libtempo2.dylib has the symbol defined as

    0000000000028770 T __Z21get_obsCoord_IAU2000BPdS_eeS_S_S_Pc

    Which is a C++ style symbol definition.

    Seems that the definition of get_obsCoord_IAU2000B has been changed to include an “eopc04” file. I have updated the bary plugin to call this revised function definition.

    I don’t have a way to test that the code does the right thing, but at least it now will not have the undefined symbol issue. Should be fixed as of #fffc1d8

  2. Log in to comment