tags 475323 patch
thanks

On Wed, 2008-04-09 at 20:46 -0400, Adam C Powell IV wrote:
> Package: libnetgen-dev
> Version: 4.4-12
> 
> Hi,
> 
> There are a couple of missing symbols in netgen while building Salomé:
> 
> /usr/lib/libnetgen_interface.so: undefined reference to `netgen::vssolution'
> /usr/lib/libnetgen_interface.so: undefined reference to `netgen::tcl_interp'
> /usr/lib/libnetgen_visualization.so: undefined reference to 
> `netgen::AddVisualizationScene(std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&, netgen::VisualScene*)'
> 
> These are all defined in ngtcltk/ngpkg.cpp which is unfortunately not
> included in any of the libs.
> 
> I don't quite understand why this is a problem now; 4.4-9 did not have
> this problem before February, but developed it sometime in March.
> Perhaps the toolchain now checks the entire lib for dependencies,
> instead of the symbols in use?
> 
> I'm investigating a patch, hope to have one by tomorrow.

Patch attached.  It adds these symbols to libsrc/interface/nglib.cpp and
libsrc/visualization/vssolution.cpp .  Just put this in debian/patches,
and add its filename to debian/patches/series.

Tests completed:
      * The package builds and installs
      * ng runs when installed
      * Salomé's netgen plugin configures and builds

Thanks,
-Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Engineering consulting with open source tools
http://www.opennovation.com/
--- netgen-4.4/libsrc/interface/nglib.cpp~	2004-07-02 21:20:09.000000000 +0000
+++ netgen-4.4/libsrc/interface/nglib.cpp	2008-04-10 17:40:26.000000000 +0000
@@ -24,10 +24,18 @@
 
 // #include <FlexLexer.h>
 
+#include <tcl.h>
+#include <incvis.hpp>
+
 namespace netgen {
   extern void MeshFromSpline2D (SplineGeometry2d & geometry,
 				Mesh *& mesh, 
 				MeshingParameters & mp);
+#include "../visualization/mvdraw.hpp"
+#include "../visualization/soldata.hpp"
+#include "../visualization/vssolution.hpp"
+  Tcl_Interp * tcl_interp;
+  VisualSceneSolution vssolution;
 }
 
 
--- netgen-4.4/libsrc/visualization/vssolution.cpp~	2004-11-10 13:22:09.000000000 +0000
+++ netgen-4.4/libsrc/visualization/vssolution.cpp	2008-04-10 17:41:56.000000000 +0000
@@ -16,6 +16,19 @@
   extern AutoPtr<Mesh> mesh;
 
 
+  SYMBOLTABLE<VisualScene*> & GetVisualizationScenes ()
+  {
+    static SYMBOLTABLE<VisualScene*> vss;
+    return vss;
+  }
+
+  void AddVisualizationScene (const string & name,
+			      VisualScene * vs)
+  {
+    GetVisualizationScenes().Set (name.c_str(), vs);
+  }
+
+
   VisualSceneSolution :: SolData :: SolData ()
     : name (0), data (0), solclass(0)
   { ; }

Reply via email to