Installed plugins filenames issue

Issue #57 resolved
Pablo Torne created an issue

Hello,

I have just freshly installed TEMPO2. All went well, including the installation of the plugins. However, if I run:

tempo2 -h

Available plugins
in '/home/torne/LOCALSOFT/tempo2/T2runtime/plugins/'
(none or all hidden)

but,
ls /home/torne/LOCALSOFT/tempo2/T2runtime/plugins/
GWanisobkgrd_linux_plug.t2 bary_linux_plug.t2 findCW_linux_plug.t2 plk_linux_plug.t2
GWbkgrd_linux_plug.t2 basic_linux_plug.t2 findCWs_linux_plug.t2 plotMany_linux_plug.t2
GWbkgrdfromfile_linux_plug.t2 cholSpectra_linux_plug.t2 fitStability_linux_plug.t2 ppta_linux_splug.t2
GWdipolebkgrd_linux_plug.t2 clock_linux_plug.t2 fixData_linux_plug.t2 publish_linux_plug.t2
GWgeneralanisobkgrd_linux_plug.t2 compareDsets_linux_plug.t2 general2_linux_plug.t2 simRedNoise_linux_plug.t2
GWgeneralbkgrd_linux_plug.t2 delays_linux_plug.t2 general_linux_plug.t2 simulDM_linux_plug.t2
add_pulseNumber_linux_plug.t2 detectGWB_linux_plug.t2 glast_linux_plug.t2 spectralModel_linux_plug.t2
analyticChol_linux_plug.t2 detectGWBnew_linux_plug.t2 glitch_linux_plug.t2 spectrum_linux_plug.t2
angle_linux_plug.t2 dm_linux_plug.t2 grTemplate_linux_plug.t2 splk_linux_plug.t2
applet_linux_plug.t2 efacEquad_linux_plug.t2 interpolate_linux_plug.t2 stridefit2_linux_plug.t2
autoDM_linux_plug.t2 exportres_linux_plug.t2 matrix_linux_plug.t2 tnmaxlike_fitFunc_linux_plug.t2
autoSpectralFit_linux_plug.t2 fake_linux_plug.t2 photons_linux_plug.t2 transform_linux_plug.t2
averageData_linux_plug.t2 fermi_linux_plug.t2 planet_linux_plug.t2

I believe the error comes from the filenames, because If I try to run:

tempo2 -gr plk -f mypar.par mytim.tim

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 /home/torne/LOCALSOFT/tempo2/T2runtime/plugins//plk_linux-gnu_plug.t2
dlerror() = /home/torne/LOCALSOFT/tempo2/T2runtime/plugins//plk_linux-gnu_plug.t2: cannot open shared object file: No such file or directory
[error]: dlopen() failed while resolving symbols.

Note that the installed plugin filename differs from what TEMPO2 expects. The difference is the “-gnu“ string in the installed filenames. If I change the filename and add what tempo2 wants (“-gnu“ in the middle), it works fine.

Is there a hard-coded discrepancy in the installed plugins filenames and the tempo2 code somewhere? Or am I doing something wrong?

Cheers,
Pablo

p.s. This reported bug might be related to bug #49.

Comments (4)

  1. Michael Keith

    Hello. The “archetecture” parameter for tempo2 is honestly a bit of a legacy from before we had developed ways to properly do parallel installs and probably needs to be cleaned up. I’m actually not sure that you are supposed to be able to build a tempo2 that looks for plugins with a different name, but I guess somehow this is happening for you OR you have plugins somehow left over from an old build and have not done “make plugins-install" or equivalent in your new build.

    The traditional way this was handled was using an environment variable called “LOGIN_ARCH”. One fix you could try would be to set this in your environment (i.e. in .bashrc) and re-run the configure script, and redo the make (something like “make clean && make complete && make complete-install”, which will rebuild everything, including the plugins).

    This is the way that I usually build tempo2. However, I’m not sure that this will do much different in the build since I think by default if you don’t have LOGIN_ARCH set it should hard-code the plugin machine type to a value based on uname, and this should be compiled into the tempo2 binary.

    Let me know if any of this fixes things.

  2. Paul Ray

    Interesting. I just ran into this issue. I recently changed my shell (from tcsh to zsh). My old compiles resulted in names like fermi_Linux_plug.t2 but now I’m getting fermi_linux-gnu_plug.t2. In my old shell LOGIN_ARCH was indeed set to Linux. Now it not set. But, uname returns “Linux” not “linux-gnu”, so I wonder where “linux-gnu” comes from?

  3. Paul Ray

    Ah, I found the answer. configure first tries LOGIN_ARCH, then tries OSTYPE, then finally goes to uname. Under zsh OSTYPE is “linux-gnu”.

  4. Log in to comment