Re: [ROOT] RE:2.25.03: STL vector broken for class poi

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Mon Nov 27 2000 - 03:24:06 MET


Hi Masaharu,

Philippe asked me for the same details.  I have attached the emails hat I
sent him, which includes all of the details that reproduce the problem.
FYI, I first encountered the problem using ROOT 2.25.03.  However, the
problem disappeared in ROOT 2.26.01.

Thank you for your help.

Regards, Matt

----- Original Message -----
From: "Masaharu Goto" <MXJ02154@nifty.ne.jp>
To: <langston@SLAC.Stanford.EDU>
Cc: <roottalk@pcroot.cern.ch>
Sent: Thursday, November 23, 2000 6:34 AM
Subject: [ROOT] RE:2.25.03: STL vector broken for class poi


> Hello Matthew,
>
> Thank you for the bug report. However, I could not reproduce your
> problem. I tried this with a simplified source and it worked
> without problems.
>
> Will you teach me what are the exact conditions?
>
> Thank you
> Masaharu Goto
>
>
> >Date: Mon, 20 Nov 2000 09:31:31 -0800
> >From: "Matthew D. Langston" <langston@SLAC.Stanford.EDU>
> >To: Masaharu Goto <MXJ02154@nifty.ne.jp>
> >Cc: roottalk <roottalk@root.cern.ch>
> >Subject: 2.25.03: STL vector broken for class pointers
> >
> >Hi Masa and ROOT Team,
> >
> >It appears that std::vector<T> is broken when T is a pointer to a
> >non-builtin type.  Here is the output from ROOT 2.25.03 which
demonstrates
> >the problem:
> >
> >root [0] #include <vector>
> >root [1] vector< const int* > int_cp_list
> >root [2] cout << int_cp_list.size();
> >root [3] #include <TKey.h>
> >root [4] vector< const TKey* > key_cp_list
> >root [5] cout << key_cp_list.size();
> >Error: Can't call vector<const TKey*,__malloc_alloc_template<0> >::size()
in
> >current scope FILE:/tmp/filewcdgda_cint LINE:1
> >Possible candidates are...
> >filename       line:size busy function type and name  (in vector<const
> >TKey*,__malloc_alloc_template<0> >)
> >Error: No symbol key_cp_list in current scope  FILE:/tmp/filewcdgda_cint
> >LINE:1
> >Error: Failed to evaluate key_cp_list.size() FILE:/tmp/filewcdgda_cint
> >LINE:1
> >Possible candidates are...
> >filename       line:size busy function type and name
> >00*** Interpreter error recovered ***
> >root [6]
> >
> >Regards, Matt
> >
> >--
> >Matthew D. Langston
> >SLD, Stanford Linear Accelerator Center
> >langston@SLAC.Stanford.EDU
> >
>


attached mail follows:


Hi Philippe, I'm using ROOT 2.25.03 on RedHat Linux 6.1 Intel, but I used gcc 2.95.2 to compile ROOT instead of egcs 1.1.2. I built ROOT from source using the following configure line: export CERNLIB= /usr/local/cern/2000/lib export TTF_FONTDIR=/usr/local/root/2.25.03/gcc-c++-2.95.2/ttf/fonts ./configure linuxegcs --with-cern-libdir="$CERNLIB" --with-ttf-fontdir="$TTF_FONTDIR" I also used a personal MyConfig.mk file with the following single line: EXTRA_LDFLAGS = -Wl,-rpath,$(ROOTSYS)/lib I also made two personal bugfixes to my installation of gcc-2.95.2 which make my compiler different than a "vanilla" build of gcc-2.95.2 under Linux. I changed the bitset header (/usr/local/include/g++-3/bitset on my system) since bitsets were broken. I also removed the "#define __STL_NO_NAMESPACES" from the stl_config.h header (/usr/local/include/g++-3/stl_config.h on my system) to enable namespace std. I have included two patches of my gcc-2.95.2 source tree against a "vanilla" gcc-2.95.2 source tree so that you can see exactly what changes I made. The "STL vector + class pointer" problem is easily reproducible on my system. If there is any other information I can give you , please let me know. Thanks for your help Philippe. Regards, Matt ----- Original Message ----- From: "Philippe Canal" <pcanal@popgtw.fnal.gov> To: "Matthew D. Langston" <langston@SLAC.Stanford.EDU> Cc: "roottalk" <roottalk@pcroot.cern.ch> Sent: Tuesday, November 21, 2000 12:02 PM Subject: RE: [ROOT] 2.25.03: STL vector broken for class pointers > Hi Matthew, > > I am unable to reproduce your problem and Linux and SGI with gcc 2.95.2. > > Can you be more specific on your platform (and any custom built)? > > Thanks, > > Philippe. > > > -----Original Message----- > > From: owner-roottalk@pcroot.cern.ch > > [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Matthew D. Langston > > Sent: Monday, November 20, 2000 11:32 AM > > To: Masaharu Goto > > Cc: roottalk > > Subject: [ROOT] 2.25.03: STL vector broken for class pointers > > > > > > Hi Masa and ROOT Team, > > > > It appears that std::vector<T> is broken when T is a pointer to a > > non-builtin type. Here is the output from ROOT 2.25.03 which demonstrates > > the problem: > > > > root [0] #include <vector> > > root [1] vector< const int* > int_cp_list > > root [2] cout << int_cp_list.size(); > > root [3] #include <TKey.h> > > root [4] vector< const TKey* > key_cp_list > > root [5] cout << key_cp_list.size(); > > Error: Can't call vector<const TKey*,__malloc_alloc_template<0> > > >::size() in > > current scope FILE:/tmp/filewcdgda_cint LINE:1 > > Possible candidates are... > > filename line:size busy function type and name (in vector<const > > TKey*,__malloc_alloc_template<0> >) > > Error: No symbol key_cp_list in current scope FILE:/tmp/filewcdgda_cint > > LINE:1 > > Error: Failed to evaluate key_cp_list.size() FILE:/tmp/filewcdgda_cint > > LINE:1 > > Possible candidates are... > > filename line:size busy function type and name > > 00*** Interpreter error recovered *** > > root [6] > > > > Regards, Matt > > > > -- > > Matthew D. Langston > > SLD, Stanford Linear Accelerator Center > > langston@SLAC.Stanford.EDU > > > > > > >

attached mail follows:


Hi Philippe, I just tested my "STL vector + class pointer" problem on the cvs sources based on the v2-26-01 tag (compiled with my "custom" gcc-2.95.2 on RedHat Linux 6.1 Intel). The problem has disappeared with this release, i.e. everything works fine on ROOT 2.26.x. Is there a cvs branch for bug fixes, etc. for the v2-25-final tag? Or, should we assume that this particular STL bug won't be fixed for the ROOT 2.25.x source base, and so we should therefore migrate to the 2.26 source base? If so, would you consider the ROOT 2.26.x source base stable enough to begin migrating too? Thanks for your help. Regards, Matt ----- Original Message ----- From: "Philippe Canal" <pcanal@imapserver3.fnal.gov> To: "Matthew D. Langston" <langston@SLAC.Stanford.EDU> Sent: Tuesday, November 21, 2000 1:51 PM Subject: RE: [ROOT] 2.25.03: STL vector broken for class pointers > Hi, > > Would it possible for you to try with the latest (stable) root from the repository > (tag v2-26-01) ? > > Philippe. > > > -----Original Message----- > > From: Matthew D. Langston [mailto:langston@SLAC.Stanford.EDU] > > Sent: Tuesday, November 21, 2000 3:51 PM > > To: pcanal@fnal.gov > > Cc: roottalk > > Subject: Re: [ROOT] 2.25.03: STL vector broken for class pointers > > > > > > Hi Philippe, > > > > I'm using ROOT 2.25.03 on RedHat Linux 6.1 Intel, but I used gcc 2.95.2 to > > compile ROOT instead of egcs 1.1.2. > > > > I built ROOT from source using the following configure line: > > > > export CERNLIB= /usr/local/cern/2000/lib > > export TTF_FONTDIR=/usr/local/root/2.25.03/gcc-c++-2.95.2/ttf/fonts > > ./configure > > linuxegcs --with-cern-libdir="$CERNLIB" --with-ttf-fontdir="$TTF_FONTDIR" > > > > I also used a personal MyConfig.mk file with the following single line: > > EXTRA_LDFLAGS = -Wl,-rpath,$(ROOTSYS)/lib > > > > I also made two personal bugfixes to my installation of gcc-2.95.2 which > > make my compiler different than a "vanilla" build of gcc-2.95.2 > > under Linux. > > I changed the bitset header (/usr/local/include/g++-3/bitset on my system) > > since bitsets were broken. I also removed the "#define > > __STL_NO_NAMESPACES" > > from the stl_config.h header (/usr/local/include/g++-3/stl_config.h on my > > system) to enable namespace std. I have included two patches of my > > gcc-2.95.2 source tree against a "vanilla" gcc-2.95.2 source tree so that > > you can see exactly what changes I made. > > > > The "STL vector + class pointer" problem is easily reproducible on my > > system. If there is any other information I can give you , please let me > > know. > > > > Thanks for your help Philippe. > > > > Regards, Matt > > > > ----- Original Message ----- > > From: "Philippe Canal" <pcanal@popgtw.fnal.gov> > > To: "Matthew D. Langston" <langston@SLAC.Stanford.EDU> > > Cc: "roottalk" <roottalk@pcroot.cern.ch> > > Sent: Tuesday, November 21, 2000 12:02 PM > > Subject: RE: [ROOT] 2.25.03: STL vector broken for class pointers > > > > > > > Hi Matthew, > > > > > > I am unable to reproduce your problem and Linux and SGI with gcc 2.95.2. > > > > > > Can you be more specific on your platform (and any custom built)? > > > > > > Thanks, > > > > > > Philippe. > > > > > > > -----Original Message----- > > > > From: owner-roottalk@pcroot.cern.ch > > > > [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Matthew D. Langston > > > > Sent: Monday, November 20, 2000 11:32 AM > > > > To: Masaharu Goto > > > > Cc: roottalk > > > > Subject: [ROOT] 2.25.03: STL vector broken for class pointers > > > > > > > > > > > > Hi Masa and ROOT Team, > > > > > > > > It appears that std::vector<T> is broken when T is a pointer to a > > > > non-builtin type. Here is the output from ROOT 2.25.03 which > > demonstrates > > > > the problem: > > > > > > > > root [0] #include <vector> > > > > root [1] vector< const int* > int_cp_list > > > > root [2] cout << int_cp_list.size(); > > > > root [3] #include <TKey.h> > > > > root [4] vector< const TKey* > key_cp_list > > > > root [5] cout << key_cp_list.size(); > > > > Error: Can't call vector<const TKey*,__malloc_alloc_template<0> > > > > >::size() in > > > > current scope FILE:/tmp/filewcdgda_cint LINE:1 > > > > Possible candidates are... > > > > filename line:size busy function type and name (in vector<const > > > > TKey*,__malloc_alloc_template<0> >) > > > > Error: No symbol key_cp_list in current scope > FILE:/tmp/filewcdgda_cint > > > LINE:1 > > > Error: Failed to evaluate key_cp_list.size() FILE:/tmp/filewcdgda_cint > > > LINE:1 > > > Possible candidates are... > > > filename line:size busy function type and name > > > 00*** Interpreter error recovered *** > > > root [6] > > > > > > Regards, Matt > > > > > > -- > > > Matthew D. Langston > > > SLD, Stanford Linear Accelerator Center > > > langston@SLAC.Stanford.EDU > > > > > > > > > > > >



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET