RE: Python and C++ code calling ROOT

From: Christian Holm Christensen <cholm_at_nbi.dk>
Date: Sat, 2 Aug 2008 23:46:58 +0200


Hi Marc,

On Fri, 2008-07-18 at 18:24 +0100, Marc de Kamps wrote:
> Dear Rootteam,
>
> If this is what is happening, is it possible to "mark" libGX11.so, so that
> it knows that it is dependent on libCore.so? I would much prefer to use the
> shared libraries.

While Paul is right that libGX11 depends on libCore, and you need that loaded when loading libGX11, Paul is not right in that ld.so does not know about the dependency - at least for some configurations of ROOT. If you pass the option `--explicit-link' to the ROOT configure script, then each library will be explicitly linked against it's dependencies - i.e., libGX11 will be linked to libCore. That means, that the dependency information is there for ld.so to use when loading libGX11. That also means, that you need only link against -lGX11 and not -lCore.

I think the "simplest" solution is to pass the above mentioned option when building ROOT. If you already built ROOT, re-configure with the same options _and_ `--explicit-link', remove all libraries in `lib' and rebuild.

ROOT's internal form of dependency building is good for finding out which library contains which class, but the OS is far better at loading the needed libraries - IMHO.

Incidentally, if you want to know what mangled symbols like `_ZNK7TObject7DoErrorEiPKcS1_Pc' really refer to, do

        c++filt "_ZNK7TObject7DoErrorEiPKcS1_Pc"
        

(this should give you "TObject::DoError(int, char const*, char const*, char*) const" - I leave it up to you how to get that information from the above. Hint: Look up the GCC/Intel C++ ABI).

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 Sat Aug 02 2008 - 23:46:28 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 03 2008 - 11:50:01 CEST