Re: error building root on RedHat 7.3

From: Christian Holm Christensen <cholm_at_nbi.dk>
Date: Mon, 4 Aug 2008 14:44:23 +0200


Hi Tom,

On Sun, 2008-08-03 at 10:26 +0200, Axel Naumann wrote:
> Hi Tom,
>
> the person who knows the answer is currently on vacation; he will reply
> when he is back.

I'm not on vacation, so I'll try to help you :-)

> Cheers, Axel
>
>
> Tom Roberts wrote:
> > Axel Naumann wrote:
> >> you can try --disable-reflex, maybe that gets you farther. But we
> >> can't promise (and don't test) that 5.20 still works with GCC 3.2.
> >
> > Thanks! I went one step further and did --disable for every
> > enable/disable option except builtin-zlib, which seems to be required
> > (see listing at end of this email).
> >
> > That got Root to build, including static, and my program links with the
> > static library. It runs unless it tries to use Root I/O, in which case
> > it give this error message:
> > Error in <TPluginManager::FindHandler>: Cannot find plugin handler for
> > TVirtualStreamerInfo! Does $ROOTSYS/etc/plugins/TVirtualStreamerInfo exist?
> >
> > That directory does exist, and contains a file P010_TStreamerInfo.C,
> > which is quite simple.

Try adding the following code to your "main" executable:

          /* magic line from Rene - for future reference! */
          gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
                                                "*",
                                                "TStreamerInfo",
                                                "RIO",
                                                "TStreamerInfo()");
        

That might help. Problem is, that ROOT tries to be clever and load the non-existent shared library RIO which isn't there because you built statically.

> > Did I disable so much that it cannot load a plugin? If so, what do I
> > enable?
> >
> > Is there some way to disable the plugins and compile them in?

When you built ROOT statically, all available plug-ins are compiled in - sort of like the old Linux 2.0 kernel did with "compiled-in modules".

> > I want to be able to run this program without depending on having the
> > correct version of Root installed (or any Root installed at all). Do I
> > need to use an older version of Root to avoid the plugins?

Two things:

  1. I understand your main concern is distribution of software. That is, you want to distribute your software "as a whole" - including third-party libraries and code. Did you consider making a distribution :-) Seriously, you could make a custom Debian GNU/Linux distribution on a LiveCD/DVD image. In that way, you're sure that everything is as you want it. Another option is to use Xen. Anyways, if your main concern is distribution, why not consider building RPMs of ROOT, and distribute those? All you should need to do, is to type "make redhat" in the ROOT source tree.
  2. Secondly, if you need to be sure that the right ROOT shared libraries are picked up in the users environment, then turn on version numbers in the so-names of the libraries by passing `--enable-soversion' to the configure script. Then all the libraries will have so-names (look it up if you don't know what I'm talking about) like `libCore.so.5.20'. Since the dynamic linker looks up the so-name when dynamically linking, only those libraries with the exact so-name will be considered. So when you link your executable, a particular set of so-names will be referenced in your executable, and at run-time, only libraries with the right so-names will load. This means, that a user can have many versions of the ROOT libraries installed with no conflict - in fact, they can all be installed in the same directory (`/usr/lib' :). The RPM and Debian packages uses this to allow programs linked against older versions of ROOT to be installed next to programs linked against newer versions. It is something Debian has formulated a policy on, while other distros are oblivious to - that's the real difference between the Debian/Ubuntu/... and Red Hat/Fedora/... camps.

In short: My advice would be to distribute the RPMs of ROOT, and also make RPMs of your code.

On a longer scale: Switch to Debian/Ubuntu/... - they still support old hardware that Red Hat doesn't :-)  

Yours,

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 447
 ____|   Email:   cholm_at_nbi.dk               Web:    www.nbi.dk/~cholm
 | |
Received on Mon Aug 04 2008 - 14:44:04 CEST

This archive was generated by hypermail 2.2.0 : Wed Aug 06 2008 - 05:50:03 CEST