Re: ROOT 5.22 with gcc 4.4 (.1)

From: Roel Aaij <roel.aaij_at_cern.ch>
Date: Mon, 17 Aug 2009 17:27:57 +0200


Hi All,

I ran into the same problem as Christophe today, using gcc 4.4.1. I saw that the in io/io/Module.mk, R__EXPLICIT_FUNCTION_INSTANTIATION is only defined for gcc 4.4.0, once I changed it to 4.4.1, it worked. I don't know how to fix this for all gcc 4.4 versions.

Greetings, Roel Aaij

> 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 17 2009 - 17:27:59 CEST

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