On 3/13/12 5:07 AM, Dirk Zimoch wrote:
> Andrew, Lewis,
>
> If the C++ template instantiation is the problem, then the
> -fno-implicit-templates command line option may help. If that is
> used, the compiler will not create any code "behind the scenes".
Hi, Dirk.
That option is being used.
> Instead it requires that for each template, you explicitly
> specify in which file you want to have the implementation. See
> section "Where's the Template?" in the gcc info pages.
>
> In exactly one source code file one has to write a line like
> template class epicsSingleton<localHostName>::reference;
I added the above line to src/ca/cac.cpp, but now the build
fails. (See attached log.) So maybe I need to add it to a
different file (e.g. src/libCom/cxxTemplates/epicsSingleton.h),
or maybe I need to remove things from other files?
Thanks,
Lewis
> Andrew Johnson wrote:
>> Hi Dirk,
>>
>>> On 3/7/12 2:50 AM, Dirk Zimoch wrote:
>>>> These two functions,
>>>> epicsSingleton<localHostName>::reference::~reference(void) and
>>>> epicsSingleton<localHostName>::reference::operator->(void) both
>>>> contain 'assert' (see
>>>> src/libCom/cxxTemplates/epicsSingleton.h).
>>>>
>>>> 'assert' is a macro:
>>>> # define assert(exp) ((exp) ? (void)0 : \
>>>> epicsAssert(__FILE__, __LINE__, #exp,
>>>> epicsAssertAuthor))
>>>>
>>>> Depending on the optimization level, '(void)0' may be
>>>> eliminated
>>>> and the code becomes shorter (by 4 bytes = 1 PPC instruction).
>>>>
>>>> Try to 'make clean' in the epics base top directory and compile
>>>> again.
>>
>> The problem is more subtle than that, although I suspect that
>> different optimization levels is probably the underlying cause.
>>
>> Remember Lewis is using a very old version of g++, from back
>> when C++ templates were new; my guess is that ldppc is
>> recompiling the template instances it needs to link the code
>> behind the scenes, but it wasn't told the optimization level
>> that g++ppc used to compile the instances that appear in the
>> .o files it's linking with so it doesn't get the same length
>> code and generates that warning. There may be a flag we could
>> turn on to show more about what's going on inside ldppc, but
>> it's really not worth looking into IMHO; better to spend the
>> time upgrading to vxWorks 5.5.
>>
>> - Andrew
>
Attachment:
epics-3.14.12.2-build-r3.txt.gz
Description: GNU Zip compressed data
- Replies:
- Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Dirk Zimoch
- References:
- "Size of symbol changed" warnings building EPICS Base 3.14.12.2 J. Lewis Muir
- Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Dirk Zimoch
- Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 J. Lewis Muir
- Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Andrew Johnson
- Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Dirk Zimoch
- Navigate by Date:
- Prev:
Re: [Operating System platforms] which one do you use? Emmanuel Mayssat
- Next:
iocshCmd, redirection, and function pointers Allison, Stephanie
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Dirk Zimoch
- Next:
Re: "Size of symbol changed" warnings building EPICS Base 3.14.12.2 Dirk Zimoch
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|