Re: ROOT 5.22 with gcc 4.4 (.1)

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Mon, 10 Aug 2009 10:40:37 -0500


Hi Christophe,

You are correct and this has been fixed in the SVN repository (and released as part of
v5.24/00).

Cheers,
Philippe.

Christophe Saout wrote:
> Hi guys,
>
> referring to this thread (which I googled)
>
> http://root.cern.ch/root/roottalk/roottalk09/0353.html
>
> I wanted to compile ROOT on my notebook, it failed for the same reason,
> and I looked at it.
>
> I believe this is actually a bug in ROOT. The compile has no way of
> knowing that you intend to use the <T = char **> specialization of
> TStreamerInfo::ReadBuffer outside of the cxx file. What is happening
> with this particular compiler constellation is that gcc simply decided
> to not emit an out-of-line copy of this method but to inline it at the
> only place it is called (in terms of what gcc is seeing in the cxx
> file). Hence a reference to this method from another cxx file, which
> doesn't see the implemenation fails.
>
> I added an explicit instatiation:
>
> template
> Int_t TStreamerInfo::ReadBuffer(TBuffer &b, char **const &arr, Int_t first,
> Int_t narr, Int_t eoffset, Int_t arrayMode);
>
> to the file to let gcc know there are other users of ReadBuffer<char**>
> and then it compiles. (which I guess should also be done for the other
> possible types)
>
> I believe one is not supposed to rely on the compiler emitting instances
> of templates into the object file when there is only an implicit
> instantiation somewhere.
>
> Christophe
>
>
>
Received on Mon Aug 10 2009 - 17:40:42 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 17 2009 - 17:50:02 CEST