]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
removing r43353: temporary workaround for loading of additional library dependencies
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Apr 2011 07:09:21 +0000 (07:09 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Apr 2011 07:09:21 +0000 (07:09 +0000)
HLT/BASE/AliHLTComponentHandler.cxx
HLT/BASE/AliHLTComponentHandler.h

index d407f6b502a8504798ff2b6f24901f8cbff6f863..8300fa533459bfcf06b38aa61f23253347a3551b 100644 (file)
@@ -105,22 +105,6 @@ AliHLTComponentHandler::AliHLTComponentHandler(AliHLTAnalysisEnvironment* pEnv)
   AddStandardComponents();
 }
 
-/*
-2010-09-06 TODO: This is a workaround for unresolved library dependencies
-with the aliroot build system. Some of the component libraries might need
-libraries not linked to the aliroot executable. I also tried to link component
-libraries to their dependencies in aliroot, but there is some awkward dependency
-and even a flaw in the build system leaving the library not built if the
-dependency was not found.
-Ideally we decouple library and component handler. The library handler needs to
-manage all dependencies, the unload-problem, etc.
-This issue is releated to https://savannah.cern.ch/task/?16325
-*/
-const std::pair<const char*, const char*> AliHLTComponentHandler::fgkLibDep[] = {
-  make_pair("libAliHLTUtil.so", "libANALYSIS.so"),
-  make_pair("libAliHLTUtil.so", "libANALYSISalice.so")
-};
-
 AliHLTComponentHandler::~AliHLTComponentHandler()
 {
   // see header file for class documentation
@@ -409,9 +393,7 @@ int AliHLTComponentHandler::LoadLibrary( const char* libraryPath, int bActivateA
        hLib.fHandle=pRootHandle;
     }
     
-    if (hLib.fHandle==NULL &&
-       LoadDependencies(libraryPath) >=0 &&
-       gSystem->Load(libraryPath)>=0) {
+    if (hLib.fHandle==NULL && gSystem->Load(libraryPath)>=0) {
       int* pRootHandle=new int;
       if (pRootHandle) *pRootHandle=1;
       hLib.fHandle=pRootHandle;
@@ -474,33 +456,6 @@ int AliHLTComponentHandler::LoadLibrary( const char* libraryPath, int bActivateA
   return iResult;
 }
 
-int AliHLTComponentHandler::LoadDependencies( const char* libraryPath)
-{
-  // Load external library dependencies defined in a static array
-  if (!libraryPath) return -EINVAL;
-
-#ifndef HAVE_DLFCN_H
-  for (unsigned i=0; i<sizeof(fgkLibDep)/sizeof(fgkLibDep[0]); i++) {
-    if (strcmp(libraryPath, (fgkLibDep[i]).first)==0) {
-      HLTInfo("loading library dependency for %s: %s", libraryPath, (fgkLibDep[i]).second);
-      int result=gSystem->Load((fgkLibDep[i]).second);
-      if (result<0) {
-       HLTError("failed to load library dependency for %s: %s", libraryPath, (fgkLibDep[i]).second);
-       return result;
-      }
-    }
-  }
-#else
-  static bool bWarning=true;
-  if (bWarning) {
-    bWarning=false;
-    HLTWarning("function not supposed to be used with dlopen, all library dependencies need to be compiled in");
-  }
-#endif // !HAVE_DLFCN_H
-
-  return 0;
-}
-
 int AliHLTComponentHandler::UnloadLibrary( const char* libraryPath )
 {
   // see header file for class documentation
index 149aa82fd8bcce6e74912c4c29c8cb9773bfaf45..bd042adcdc9ca2f31acff2cb4d8c8f1a6f25ab33 100644 (file)
@@ -21,7 +21,6 @@
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
 
 #include <vector>
-#include <utility>
 //#include "TObject.h"
 #include "AliHLTDataTypes.h"
 #include "AliHLTLogging.h"
@@ -103,11 +102,6 @@ class AliHLTComponentHandler : public AliHLTLogging {
    */
   int LoadLibrary( const char* libraryPath, int bActivateAgents=1);
 
-  /**
-   * Load external library dependencies defined in a static array.
-   */
-  int LoadDependencies( const char* libraryPath);
-
   /**
    * Find a symbol in a dynamically loaded library.
    * @param library      library
@@ -361,9 +355,7 @@ class AliHLTComponentHandler : public AliHLTLogging {
   /** the global singleton */
   static AliHLTComponentHandler* fgpInstance;                      //!transient
   /** number of used instances of the global singleton */
-  static int fgNofInstances;                                       //!transient
-  /// library dependencies
-  static const std::pair<const char*, const char*> fgkLibDep[];    //!transient
+  static int fgNofInstances;                                       //!transient 
 
   ClassDef(AliHLTComponentHandler, 2);