Re: Compile error with gcc 4.4.0

From: Peter Elmer <Peter.Elmer_at_cern.ch>
Date: Wed, 6 May 2009 06:12:28 +0200


  Hi Axel,

On Wed, May 06, 2009 at 05:00:49AM +0200, Peter Elmer wrote:
> On Tue, Apr 14, 2009 at 09:48:53AM +0200, Axel Naumann wrote:
> > there is no official release of GCC 4.4 yet, so whatever Red Hat
> > released is their home grown thing. And apparently it has a bug, or
> > there is an issue with the setup. As a hint: I have the requested symbol
> > in lib/libRIO.so; it's generated (as a weak symbol) from
> > io/io/src/TStreamerInfoReadBuffer.cxx, both the function definition and
> > the template instantiation happen in there, so it's also in
> > io/io/src/TStreamerInfoReadBuffer.o.
>
> FWIW, I see (more or less) the same error:
>
> lib/libRIO.so: undefined reference to `int TStreamerInfo::ReadBuffer<TVirtualArr
> ay>(TBuffer&, TVirtualArray const&, int, int, int, int)'
> lib/libRIO.so: undefined reference to `int TStreamerInfo::ReadBuffer<char**>(TBu
> ffer&, char** const&, int, int, int, int)'
> collect2: ld returned 1 exit status
> make: *** [bin/hadd] Error 1
>
> with the (now released) official version of gcc4.4.0 on SLC5, when building
> ROOT 5.22/00a. I can't tell from what you wrote above whether you know
> what could be wrong or not... ;-)

  Looking at the TStreamerInfoReadBuffer.o from a gcc4.3.2 build and from a gcc4.4.0 build, I see that the former indeed has 4 symbols missing in the latter:

0000000000000000 W int TStreamerInfo::ReadBuffer<TVirtualArray>(TBuffer&, TVirtualArray const&, int, int, int, int)
0000000000000000 W int TStreamerInfo::ReadBuffer<TVirtualCollectionProxy>(TBuffer&, TVirtualCollectionProxy const&, int, int, int, int)
0000000000000000 W int TStreamerInfo::ReadBuffer<TStreamerInfo::TPointerCollectionAdapter>(TBuffer&, TStreamerInfo::TPointerCollectionAdapter const&, int, int, int, int)
0000000000000000 W int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, int, int, int, int)

Where exactly are these being instantiated in TStreamerInfoReadBuffer.cxx? (Ah, perhaps with one of the #ifdef R__BROKEN_FUNCTION_TEMPLATES sections? That isn't defined here for linux/gcc44, though, is it? Or is it somewhere else I'm not seeing with 6:00AM vision?)

                                   Pete

-------------------------------------------------------------------------
Peter Elmer     E-mail: Peter.Elmer_at_cern.ch      Phone: +41 (22) 767-4644
Address: CERN Division PPE, Bat. 32 2C-14, CH-1211 Geneva 23, Switzerland
Received on Wed May 06 2009 - 06:13:34 CEST

This archive was generated by hypermail 2.2.0 : Wed May 06 2009 - 17:50:02 CEST