Re: ACLiC: vector::iterator problem and "no plugin for TSystem"

From: Dr. John Krane <jkrane_at_netzero.com>
Date: Fri, 26 Jan 2007 15:15:45 -0600


Excellent! Thank you thank you thank you Philippe. That workaround compiles perfectly.

Philippe Canal wrote:

>Hi John,
>
>Unfortunately there is something weird about the current handling of
>vector::iterator.
>
>Use the following code as a work around:
>
>using std::vector;
>
>typedef std::vector<TString>::iterator my_iterator;
>
>class kRow {
> public:
> private:
> my_iterator field0;
>
> public:
> kRow(my_iterator p) {field0=p;}
> ~kRow() { }
>
> void Close(Option_t *option=""){ option=0; }
> ULong_t GetFieldLength(Int_t field){ field=0; return 0; } // not
>implemented
> const char *GetField(Int_t field);
> const char *operator[](Int_t field) { return GetField(field); }
>
>};
>
>Cheers,
>Philippe.
>
>-----Original Message-----
>From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
>On Behalf Of Dr. John Krane
>Sent: Friday, January 26, 2007 2:14 PM
>To: roottalk_at_pcroot.cern.ch
>Subject: [ROOT] ACLiC: vector::iterator problem and "no plugin for TSystem"
>
>Hi everyone,
>
>Some of you might remember I had some trouble updating Root v4 to Root
>v5 some time ago. I had the poor judgement to copy my root binaries and
>libraries directly into /bin and /lib, and created an /include
>directory, which caused a world of trouble when it came time to update.
>(Since I had also defined $ROOTSYS and added it to associated PATHs, I
>really don't know what I was thinking copying over all those files.)
>
>Anyway, I recently tried to update to v5 again and thought I was
>successful. I removed all the root files from /bin and /lib, removed
>/include, updated all my environmental variables, and was able to
>compile libraries that depend on Root, and also when I run Root the
>splash page says Root v5.14/00b, as does the welcome message in the
>terminal window. (In my earlier attemps, there was an obvious mismatch
>between the splash screen and the welcome message, showing me I was
>getting a mix of library versions.) I am able to use ACLiC to compile
>*most* code I want from within Root, but I am getting a strange failure
>today. I can only assume it is another v4 legacy on my end, but maybe not.
>
>As you can see below, I'm getting a failure trying to ".L kRow.cpp+",
>complaining about my vector::iterator declaration, yet no problem
>reported by the compiler in the subsequent validity test. With the
>debug mode set to 5, I see "did not find plugin for class TSystem..."
>messages, but nothing more enlightening (to me). Does anybody know what
>my problem might be? I have looked at the ACLiC web page and found many
>cautions about using STL, but what I'm doing seems simple and worked in v4.
>
>Here is my Root session, followed by the code in question:
>
> * Version 5.14/00b 17 January 2007 *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
>FreeType Engine v2.1.9 used to render TrueType fonts.
>Compiled on 26 January 2007 for linux with thread support.
>
>CINT/ROOT C/C++ Interpreter version 5.16.16, November 24, 2006
>Type ? for help. Commands must be C++ statements.
>Enclose multiple statements between { }.
>root [0] gDebug =5;
>root [1] .L kRow.cpp+
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/.
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./kRow_cpp.so
>Info in <TUnixSystem::ACLiC>: creating shared library
>/data/kranelib/util/./kRow_cpp.so
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri
>/data/z_packages_and_software/rpm_by_hand/root/current/etc/system.rootmap
>Info in <ACLiC>: creating the dictionary files
>Info in <ACLiC>: rootcint
>--lib-list-prefix=/data/kranelib/util/./fileqDTxjTmap -f
>/data/kranelib/util/./fileaWohGY.cxx -c -p -I$ROOTSYS/include
>-I"/data/z_packages_and_software/rpm_by_hand/root/current/include"
>/data/kranelib/util/./kRow.cpp /data/kranelib/util/./file5yQHZVlinkdef.h
>Error: Symbol iteratorfield0 is not defined in current scope kRow.h:14:
>Warning: Error occurred during reading source files
>Warning: Error occurred during dictionary source generation
>!!!Removing /data/kranelib/util/./fileaWohGY.cxx
>/data/kranelib/util/./fileaWohGY.h !!!
>Error: rootcint: error loading headers...
>Error in <ACLiC>: Dictionary generation failed!
>Info in <ACLiC>: Invoking compiler to check macro's validity
>Info in <ACLiC>: g++ -c -O -pipe -Wall -W -Woverloaded-virtual -fPIC
>-Iinclude -pthread -I$ROOTSYS/include
>-I"/data/z_packages_and_software/rpm_by_hand/root/current/include"
>-I/data/kranelib/util/. -I/data/kranelib/util
>/data/kranelib/util/./kRow.cpp
>Info in <ACLiC>: The compiler has not found any problem with your macro.
> Probably your macro uses something rootcint can't parse.
> Check http://root.cern.ch/root/Cint.phtml?limitations for Cint's
>limitations.
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./kRow.o
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./fileaWohGY.cxx
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./fileaWohGY.h
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./fileaWohGY.o
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./file5yQHZVlinkdef.h
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./fileqDTxjTmap.in
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./fileqDTxjTmap.out
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./file5qRlmVcpp
>Info in <TPluginManager::FindHandler>: did not find plugin for class
>TSystem and uri /data/kranelib/util/./fileQ2NfpX
>root [2]
>
>
>Here is the simple class that I was trying to compile, which worked
>under Root v4:
>
>kRow.h -----------------------------------------------
>#ifndef kRow_H
>#define kRow_H
>
>#include <vector>
>#include "TString.h"
>
>using std::vector;
>
>class kRow {
>
> private:
> vector<TString>::iterator field0;
>
> public:
> kRow(vector<TString>::iterator p) {field0=p;}
> ~kRow() { }
>
> void Close(Option_t *option=""){ option=0; }
> ULong_t GetFieldLength(Int_t field){ field=0; return 0; } // not
>implemented
> const char *GetField(Int_t field);
> const char *operator[](Int_t field) { return GetField(field); }
>
>};
>
>#endif
>
>kRow.cpp -----------------------------------------------
>#include "kRow.h"
>
>const char *kRow::GetField(Int_t field){
> return *(field0+field);
>}
>
>
>
>
>
>
>
>
>
>

-- 

Dr. John Krane
http://jkrane.home.comcast.net

Quantitative Financial Analyst
Received on Fri Jan 26 2007 - 22:16:01 CET

This archive was generated by hypermail 2.2.0 : Sat Jan 27 2007 - 17:50:01 CET