Re: Compile error with gcc 4.4.0

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 6 May 2009 09:49:33 -0500


Hi Pete,

Where do yo have gcc 4.4.0 installed?

> the #ifdef R__BROKEN_FUNCTION_TEMPLATES sections?

This section is only for ancient compiler and should not be in use in this case.

The instantiation of:

0000000000000000 W int TStreamerInfo::ReadBuffer<TStreamerInfo::TPointerCollectionAdapter>(TBuffer&, TStreamerInfo::TPointerCollectionAdapter const&, int, int, int, int)

is 'requested' at line 1723 of TStreamerInfoReadBuffer.cxx (same file where the template instantiation is).

0000000000000000 W int TStreamerInfo::ReadBuffer<TVirtualCollectionProxy>(TBuffer&, TVirtualCollectionProxy const&, int, int, int, int)

is requested at line 1711.

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

is requested at line 1734

0000000000000000 W int TStreamerInfo::ReadBuffer<TVirtualArray>(TBuffer&, TVirtualArray const&, int, int, int, int)

is requested by the other instantiation via the line 707.

So in my opinion gcc 4.4.0 is either broken or made a non-backward compatible change.

Cheers,
Philippe.

Axel Naumann wrote:
> Hi Pete,
>
> thanks for your findings; if Philippe doesn't manage to study this today
> I'll do so tomorrow.
>
> Btw, something completely different: did you ever try the
> not-so-new-anymore "google" linker called gold? Does is improve the link
> time? I can imagine you spend a lot of time in there...
>
> Anyway, you'll hear from us today or tomorrow!
>
> Cheers, Axel.
>
> On 2009-05-06 06:12, Peter Elmer wrote:
>
>> 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 - 16:49:48 CEST

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