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.


commit 73f793cb0076b6847fc17750a5e1511af502e06c
Author: André Espaze <andre.esp...@logilab.fr>
Date:   Tue Jun 1 16:53:53 2010 +0200

    No GetIDMapper inlining when building VISU
    
    The template function GetIDMapper should not be inlined by g++ when
    compiling with optimizations (the Debian build system used -O2) because
    the VISUConvertor command needs to link with the resulting symbol
    contained in libVisuConvertor.so. The patch is provided in:
    	debian/patches/visu-no-template-inline.patch
    and will be applied by quilt thanks to the list:
    	debian/patches/series

diff --git a/debian/patches/series b/debian/patches/series
index 524b45d..d280ec5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,6 +26,7 @@ med-fix-clean.patch
 visu-hdf5-needs-mpi.patch
 visu-build-in-tree.patch
 visu-flags-typo.patch
+visu-no-template-inline.patch
 visu-fix-clean.patch
 smesh-hdf5-needs-mpi.patch
 smesh-use-gui-check.patch
diff --git a/debian/patches/visu-no-template-inline.patch b/debian/patches/visu-no-template-inline.patch
new file mode 100644
index 0000000..ead1d55
--- /dev/null
+++ b/debian/patches/visu-no-template-inline.patch
@@ -0,0 +1,28 @@
+The template function GetIDMapper should not be inlined by g++ when
+compiling with optimizations (the Debian build system used -O2) because
+the VISUConvertor command needs to link with the resulting symbol
+contained in libVisuConvertor.so.
+
+diff --git a/VISU_SRC_5.1.3/src/CONVERTOR/VISU_MergeFilterUtilities.hxx b/VISU_SRC_5.1.3/src/CONVERTOR/VISU_MergeFilterUtilities.hxx
+index 52f7440..e4f63ae 100755
+--- a/VISU_SRC_5.1.3/src/CONVERTOR/VISU_MergeFilterUtilities.hxx
++++ b/VISU_SRC_5.1.3/src/CONVERTOR/VISU_MergeFilterUtilities.hxx
+@@ -93,12 +93,18 @@ namespace VISU
+                                 TObjectId2TupleGaussIdMap& theObjectId2TupleGaussIdMap);
+   
+   template<class TGetFieldData>
++#if (__GNUG__ && __OPTIMIZE__)
++  __attribute__((noinline))
++#endif
+   vtkIntArray*
+   GetIDMapper(VISU::TFieldList* theFieldList,
+ 	      TGetFieldData theGetFieldData,
+ 	      const char* theFieldName);
+ 
+   template<class TGetFieldData>
++#if (__GNUG__ && __OPTIMIZE__)
++  __attribute__((noinline))
++#endif
+   vtkIntArray*
+   GetIDMapper(vtkDataSet* theIDMapperDataSet,
+ 	      TGetFieldData theGetFieldData,

Reply via email to