Bug#584172: Disabling GetIDMapper inlining for building VISU

Andre Espaze andre.espaze at logilab.fr
Wed Jun 2 09:34:23 UTC 2010


Hello Denis,

On Wed, Jun 02, 2010 at 10:30:15AM +0200, Denis Barbier wrote:
> On 2010/6/2 Andre Espaze wrote:
> > It is finally not necessary to build the module with the -g option,
> > I have enclosed a patch that disable the GetIDMapper function inlining
> > when built with g++ and optimizations.
> 
> I am no C++ expert, but this looks very similar to
>    http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13
> and it is thus not clear whether this is really a g++ bug.
> Here is a different fix, I tested this approach with Andre's
> test.cpp, but not with salome.
Thank you very much for the suggestion, it works but it seems to 
me that you forgot a 'template' keyword before the symbol export.
I have enclosed a patch tested on my machine, fell free to correct
it if I was wrong. 
For the -9 release, I am anyway going to submit my change to Adam
for getting a working version with VISU. A full build will again
be required because other symbol exports may be needed in other 
modules. Your solution is however better because the exported symbols
are in control while in my case I remove every GetIDMapper function
inlining.
I am neither a C++ expert but I found the FAQ entry different
from our case because the symbol gets exported without -O2 
optimizations. I would not say that it is a g++ bug because
I think that you should control inlining when optimizing
(as I have done in my first patch). However your solution is right and
succeeds to export template function symbols with optimizations.
Once again thank you because I would not have figured it out myself.

Best regards,

André

-------------- next part --------------
A non-text attachment was scrubbed...
Name: visu-template-export.patch
Type: text/x-diff
Size: 724 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20100602/c6235132/attachment-0001.patch>


More information about the debian-science-maintainers mailing list