Installing OPUS on Archlinux

Moderators: Andreas Mohr, rah

Post Reply
hamars
Posts: 1
Joined: Tue Oct 16, 2012 1:15 pm

Installing OPUS on Archlinux

Post by hamars » Tue Oct 16, 2012 1:30 pm

Dear Bruker Linux OPUS Developers,

I'm trying to run OPUS on Archlinux with both RHEL and Ubuntu versions.
I got some errors about missing libraries (having the wrong version number) in opus.log that I fixed with the usual but not very pretty way.

But now there is an error in opus.log, that I don't fully understand:

Code: Select all

./opus: relocation error: /home/hannes/Uni/Diplomarbeit/Spezielle Programme/OPUS/opus-7.0.122.1124-1.i386/lib/opus-7.0.122.1124/bin/../lib/libopusport.so.0: symbol _ZN12wxAppConsole15CreateLogTargetEv, version WXU_2.8 not defined in file libwx_baseu-2.8.so.0 with link time reference
libwx_baseu-2.8.so.0 exists.

Any idea?

Best wishes and thanks for porting OPUS to Linux!

Andreas Mohr
Posts: 29
Joined: Mon Jun 30, 2008 4:50 pm

Re: Installing OPUS on Archlinux

Post by Andreas Mohr » Wed Oct 17, 2012 9:15 am

Hello,

this linking error, unfortunately, is due to a very unfortunate ABI (binary) issue of the otherwise quite fine wxWidgets GUI toolkit that I'm using here.

wx 2.8.10/include/wx/app.h:

Code: Select all

    // the functions below shouldn't be used now that we have wxAppTraits
#if WXWIN_COMPATIBILITY_2_4

#if wxUSE_LOG
        // override this function to create default log target of arbitrary
        // user-defined class (default implementation creates a wxLogGui
        // object) -- this log object is used by default by all wxLogXXX()
        // functions.
    wxDEPRECATED( virtual wxLog *CreateLogTarget() );
#endif // wxUSE_LOG

        // similar to CreateLogTarget() but for the global wxMessageOutput
        // object
    wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );

#endif // WXWIN_COMPATIBILITY_2_4
As you can see, there's a compatibility define named WXWIN_COMPATIBILITY_2_4, and *unfortunately* it switches between defining a virtual method or not,
in other words it causes INCOMPATIBLE vtable offsets for wxWidgets versions which have that define toggled.
In one case, it's a "simple" linking error (user library has a CreateLogTarget() import which wx does not offer), and in the complementary case it's in fact a grave vtable offset issue (user library does NOT need CreateLogTarget(), yet the foreign-system wx install does offer it --> vtable offset CHANGED! Causing very confusing foreign-symbol *access* runtime errors).

Since the last (well, current...) release has packages / shars for both RHEL (our wx install has WXWIN_COMPATIBILITY_2_4 defined) and Ubuntu (not defined on this distro install), fortunately our binaries offer both build variants.

RHEL:
[amoh@lxamoh lib]$ strings libopusport.so|grep CreateLogTarget
_ZN12wxAppConsole15CreateLogTargetEv
[amoh@lxamoh lib]$
Ubuntu shar:
[amoh@lxamoh lib]$ strings libopusport.so|grep CreateLogTarget
[amoh@lxamoh lib]$


I guess that at this moment you were using the RHEL OPUS build (either RPM or shar). Try using the Ubuntu build instead, it does not have the symbol import.
An alternative would be to custom-build properly compatible wx libraries on the distro that is being used, but of course it's questionable whether one would want to go to such lengths.

I recently discovered this issue when trying our RHEL packages on an openSUSE install.

Needless to say, higher-level libraries such as GUI toolkits (wxWidgets) etc. are not covered by LSB guarantees or guidelines.


Just in case it's not known yet: our README (e.g. the current one in the package files doc/ dir) contains *some* troubleshooting hints for dependency issues (how to get proper libraries, where to best place them, ...).

Does that help?

Any further questions, please keep asking!

Post Reply