Subject: [Meshbuilder-dev] Compile error

From: Abhijit Sarkar <[email-masked]>
Date: Fri, 15 May 2009 00:36:16 -0400 (EDT)

I am trying to compile Meshbuilder  in Ubuntu 8.10 with g++ (Ubuntu 
4.3.2-1ubuntu12) 4.3.2:
I get the following error. Admittedly  I am not a c++ programmer..but I 
guess the error may be due to
compiler version. Any idea how to resolve the problem.

superuser@dell:~/meshbuilder$ make all
g++ -c -pipe -g -Wall -pipe -ansi -Werror -DDEBUG -g -DNDEBUG -O2 
-DPACKAGE_VERSION="0.9.1" -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_CHOLMOD=1 
-fno-strict-aliasing -pthread -I/usr/local/include 
-I/usr/lib/python2.5/site-packages/numpy/core/include 
-I/usr/include/suitesparse -I/usr/include/python2.5 
-I/usr/include/libxml2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -Wno-deprecated -w -O0 -D_REENTRANT  
-DLINUX -DQT_CLEAN_NAMESPACE -DQT_NO_DEBUG -Dgpp_Cplusplus 
-Dgpp2_Cplusplus -DNO_EXCEPTION_SUPPORT -DVTK_GRAPHICS -DNUMT=double 
-DSAFETY_CHECKS -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT 
-I/usr/share/qt3/mkspecs/default -I. -Ibase -Igui -Iscenegraph -Iutil 
-I/include -I/include -I/include -I/usr/include/qt3 
-I/usr/X11R6/include -I/usr/X11R6/include -Ibuild/ -o 
build/CategoryNode.o scenegraph/CategoryNode.cpp
In file included from scenegraph/CategoryNode.cpp:2:
base/ObjectManager.h:6:22: error: hash_map.h: No such file or directory
In file included from scenegraph/CategoryNode.cpp:2:
base/ObjectManager.h:110: error: ISO C++ forbids declaration of 
‘hash_map’ with no type
base/ObjectManager.h:110: error: expected ‘;’ before ‘<’ token
base/ObjectManager.h:111: error: ISO C++ forbids declaration of 
‘hash_map’ with no type
base/ObjectManager.h:111: error: expected ‘;’ before ‘<’ token
make: *** [build/CategoryNode.o] Error 1

----------------------------------------------

Abhijit Sarkar,
Associate Professor and Canada Research Chair,
Minto Case, Room 3076 MC,
1125 Colonel By Drive, Ottawa,
Ontario  K1S 5B6, Canada,
Tel: (613) 520-2600 ex. 6320, 
Web: www.abhijitsarkar.net

---

From: Ola Skavhaug <[email-masked]>
Date: Fri, 15 May 2009 08:27:07 +0200

> compiler version. Any idea how to resolve the problem.

Dear Abhijit,

meshbuilder does not work on Ubuntu 8.10, due to a software dependency
problem (Open Scene Graph). We are investigating how much effort it
will be to move from the old, deprecated open scene graph bindings to
a more standard and recent version. We might have a back port
somewhere; Johannes is there any chance for making this work on 8.10?

Ola

> _______________________________________________
> Meshbuilder-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/meshbuilder-dev
>

-- 
Ola Skavhaug

---

From: "Johannes Ring" <[email-masked]>
Date: Fri, 15 May 2009 08:41:13 +0200 (CEST)

> somewhere; Johannes is there any chance for making this work on 8.10?

We have a backport for Ubuntu 8.04 but not for Ubuntu 8.10 or newer. The
problem was that I was unable to compile the old OpenSceneGraph with GCC
4.3. I tried several things but got stuck. However, I thought that I could
build OpenSceneGraph with GCC 4.2 instead. Could this lead to any
potential problems when DOLFIN (Meshbuilder needs to link to DOLFIN) is
built with GCC 4.3?

Johannes

>> ?hash_map? with no type
>> base/ObjectManager.h:110: error: expected ?;? before ?<? token
>> ?hash_map? with no type
>> base/ObjectManager.h:111: error: expected ?;? before ?<? token

---

From: Ilmar Wilbers <[email-masked]>
Date: Fri, 15 May 2009 10:12:13 +0200

I think we can get it to compile with 4.3, Johannes. When I did some 
investigating the other day I made some changes for GCC 4.3.

ilmar

---

From: Ilmar Wilbers <[email-masked]>
Date: Fri, 15 May 2009 15:14:34 +0200

Attaching a patch for getting meshbuilder itself to compile with GCC 
4.3. Note that this requires a GNU compiler due to issues with hash_map, 
but this is probably fine as the main purpose is to create Debian 
packages for Ubuntu 8.10. At some stage we need a rewrite in order for 
meshbuilder to work with newer OpenSceneGraph versions (>=2.0).

ilmar

---

From: Ilmar Wilbers <[email-masked]>
Date: Fri, 15 May 2009 16:29:29 +0200

Here is a patch for compiling the OpenSceneGraph version 1.2 with GCC 4.3.

Apply by running 'patch -Np1 < OSG_OP_OT-1.2.patch' in the OSG 1.2 folder.

ilmar

Ilmar Wilbers wrote:
> 4.3. Note that this requires a GNU compiler due to issues with 
> hash_map, but this is probably fine as the main purpose is to create 
> Debian packages for Ubuntu 8.10. At some stage we need a rewrite in 
> order for meshbuilder to work with newer OpenSceneGraph versions (>=2.0).
>
> ilmar
>
> Ilmar Wilbers wrote:
> ------------------------------------------------------------------------
>
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/include/osg/Geode OSG_OP_OT-1.2-patched/OpenSceneGraph/include/osg/Geode
--- OSG_OP_OT-1.2/OpenSceneGraph/include/osg/Geode	2006-07-18 17:21:24.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/include/osg/Geode	2009-05-15 12:58:49.000000000 +0200
@@ -17,6 +17,7 @@
 #include <osg/Node>
 #include <osg/NodeVisitor>
 #include <osg/Drawable>
+#include <iostream>
 
 namespace osg {
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/include/osg/Uniform OSG_OP_OT-1.2-patched/OpenSceneGraph/include/osg/Uniform
--- OSG_OP_OT-1.2/OpenSceneGraph/include/osg/Uniform	2006-05-16 23:00:45.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/include/osg/Uniform	2009-05-15 12:47:16.000000000 +0200
@@ -27,6 +27,7 @@
 
 #include <string>
 #include <vector>
+#include <cstdlib>
 
 namespace osg {
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/include/osgIntrospection/Reflection OSG_OP_OT-1.2-patched/OpenSceneGraph/include/osgIntrospection/Reflection
--- OSG_OP_OT-1.2/OpenSceneGraph/include/osgIntrospection/Reflection	2006-07-18 17:21:29.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/include/osgIntrospection/Reflection	2009-05-15 12:29:12.000000000 +0200
@@ -20,6 +20,7 @@
 #include <typeinfo>
 #include <map>
 #include <vector>
+#include <cstring>
 
 /// This macro emulates the behavior of the standard typeid operator,
 /// returning the Type object associated to the type of the given
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/ApplicationUsage.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/ApplicationUsage.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/ApplicationUsage.cpp	2005-11-09 18:19:34.000000000 +0100
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/ApplicationUsage.cpp	2009-05-15 12:34:02.000000000 +0200
@@ -1,5 +1,6 @@
 #include <osg/ApplicationUsage>
 #include <osg/Math>
+#include <cstdlib>
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/ArgumentParser.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/ArgumentParser.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/ArgumentParser.cpp	2005-06-15 13:49:25.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/ArgumentParser.cpp	2009-05-15 12:34:17.000000000 +0200
@@ -4,6 +4,8 @@
 
 #include <set>
 #include <iostream>
+#include <cstring>
+#include <cstdlib>
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BlendColor.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BlendColor.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BlendColor.cpp	2006-07-18 17:21:37.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BlendColor.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -16,6 +16,8 @@
 #include <osg/Notify>
 #include <osg/buffered_value>
 
+#include <cstring>
+
 using namespace osg;

diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BlendEquation.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BlendEquation.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BlendEquation.cpp	2006-07-18 17:21:37.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BlendEquation.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -16,6 +16,7 @@
 #include <osg/Notify>
 #include <osg/buffered_value>
 
+#include <cstring>
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BlendFunc.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BlendFunc.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BlendFunc.cpp	2006-07-18 17:21:37.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BlendFunc.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -15,6 +15,8 @@
 #include <osg/State>
 #include <osg/Notify>
 
+#include <cstring>
+
 using namespace osg;
 
 BlendFunc::BlendFunc():
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BufferObject.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BufferObject.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/BufferObject.cpp	2006-08-25 10:48:16.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/BufferObject.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <float.h>
+#include <cstring>
 
 #include <osg/BufferObject>
 #include <osg/Notify>
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/ClampColor.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/ClampColor.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/ClampColor.cpp	2006-09-12 11:26:42.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/ClampColor.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -16,6 +16,8 @@
 #include <osg/Notify>
 #include <osg/buffered_value>
 
+#include <cstring>
+
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/CullSettings.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/CullSettings.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/CullSettings.cpp	2006-07-18 17:21:37.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/CullSettings.cpp	2009-05-15 12:36:24.000000000 +0200
@@ -17,6 +17,9 @@
 
 #include <osg/Notify>
 
+#include <cstring>
+#include <cstdlib>
+
 using namespace osg;
 
 CullSettings::CullSettings(const CullSettings& cs)
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/DisplaySettings.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/DisplaySettings.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/DisplaySettings.cpp	2006-07-26 17:29:25.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/DisplaySettings.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -17,6 +17,7 @@
 #include <osg/ref_ptr>
 
 #include <algorithm>
+#include <cstring>
 
 using namespace osg;
 using namespace std;
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Geode.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Geode.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Geode.cpp	2006-07-18 17:21:38.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Geode.cpp	2009-05-15 12:57:55.000000000 +0200
@@ -15,6 +15,9 @@
 
 #include <stdio.h>
 #include <math.h>
+#include <cstdlib>
+#include <cstdio>
+#include <iostream>
 
 #define square(x)   ((x)*(x))
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Geometry.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Geometry.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Geometry.cpp	2006-08-04 15:17:56.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Geometry.cpp	2009-05-15 12:36:54.000000000 +0200
@@ -12,6 +12,7 @@
 */
 #include <osg/Geometry>
 #include <osg/Notify>
+#include <cstdlib>
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Image.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Image.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Image.cpp	2006-08-25 17:49:29.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Image.cpp	2009-05-15 12:49:15.000000000 +0200
@@ -24,6 +24,8 @@
 
 #include "dxtctool.h"
 
+#include <cstring>
+
 using namespace osg;
 using namespace std;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Notify.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Notify.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Notify.cpp	2006-07-18 17:21:38.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Notify.cpp	2009-05-15 12:39:32.000000000 +0200
@@ -14,6 +14,7 @@
 #include <string>
 #include <iostream>
 #include <fstream>
+#include <cstdlib>
 
 using namespace std;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Point.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Point.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Point.cpp	2006-07-18 17:21:38.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Point.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -17,6 +17,8 @@
 #include <osg/Point>
 #include <osg/Notify>
 
+#include <cstring>
+
 using namespace osg;
 
 // ARB, EXT and SGIS versions use same values as OpenGL version 1.4.
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/PolygonOffset.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/PolygonOffset.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/PolygonOffset.cpp	2006-07-18 17:21:38.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/PolygonOffset.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -14,6 +14,8 @@
 #include <osg/PolygonOffset>
 #include <osg/Notify>
 
+#include <cstring>
+
 using namespace osg;
 
 static float s_FactorMultipler = 1.0f;
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Program.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Program.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Program.cpp	2006-07-26 17:29:25.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Program.cpp	2009-05-15 12:45:46.000000000 +0200
@@ -18,6 +18,7 @@
 
 #include <fstream>
 #include <list>
+#include <cstring>
 
 #include <osg/Notify>
 #include <osg/State>
@@ -33,6 +34,8 @@
 #include <OpenThreads/ScopedLock>
 #include <OpenThreads/Mutex>
 
+#include <cstdlib>
+
 using namespace osg;

diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Referenced.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Referenced.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Referenced.cpp	2006-07-18 17:21:38.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Referenced.cpp	2009-05-15 12:45:26.000000000 +0200
@@ -18,6 +18,7 @@
 #include <typeinfo>
 #include <memory>
 #include <set>
+#include <cstdlib>
 
 #include <OpenThreads/ScopedLock>
 #include <OpenThreads/Mutex>
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/TexEnvFilter.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/TexEnvFilter.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/TexEnvFilter.cpp	2006-07-18 17:21:38.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/TexEnvFilter.cpp	2009-05-15 12:46:38.000000000 +0200
@@ -13,6 +13,7 @@
 #include <osg/GLExtensions>
 #include <osg/TexEnvFilter>
 #include <osg/State>
+#include <cstdlib>
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Texture.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Texture.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Texture.cpp	2006-08-25 10:48:16.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Texture.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -22,6 +22,8 @@
 #include <OpenThreads/ScopedLock>
 #include <OpenThreads/Mutex>
 
+#include <cstring>
+
 using namespace osg;
 
 #ifndef GL_TEXTURE_WRAP_R
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/TextureCubeMap.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/TextureCubeMap.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/TextureCubeMap.cpp	2006-08-14 21:42:22.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/TextureCubeMap.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -19,6 +19,8 @@
 
 #include <osg/GLU>
 
+#include <cstring>
+
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Uniform.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Uniform.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osg/Uniform.cpp	2006-05-16 23:00:45.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osg/Uniform.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -20,6 +20,7 @@
 #include <osg/StateSet>
 
 #include <algorithm>
+#include <cstring>
 
 using namespace osg;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/DatabasePager.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/DatabasePager.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/DatabasePager.cpp	2006-08-03 21:14:52.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/DatabasePager.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -10,6 +10,7 @@
 #include <OpenThreads/ScopedLock>
 
 #include <algorithm>
+#include <cstring>
 
 #ifdef WIN32
 #include <windows.h>
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/Field.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/Field.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/Field.cpp	2006-07-18 17:21:40.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/Field.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -12,6 +12,8 @@
 */
 #include <osgDB/Field>
 
+#include <cstring>
+
 using namespace osgDB;
 using namespace std;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/FileNameUtils.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/FileNameUtils.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/FileNameUtils.cpp	2006-07-18 17:21:40.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/FileNameUtils.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -12,6 +12,8 @@
 */
 #include <osgDB/FileNameUtils>
 
+#include <cstring>
+
 #if defined(__sgi)
     #include <ctype.h>
 #elif defined(__GNUC__) || !defined(WIN32) || defined(__MWERKS__)
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/Registry.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/Registry.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgDB/Registry.cpp	2006-08-05 22:39:47.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgDB/Registry.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -28,6 +28,7 @@
 
 #include <algorithm>
 #include <set>
+#include <cstring>
 
 using namespace osg;
 using namespace osgDB;
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/directx/directx.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/directx/directx.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/directx/directx.cpp	2006-07-04 11:13:15.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/directx/directx.cpp	2009-05-15 13:07:52.000000000 +0200
@@ -30,6 +30,8 @@
 
 #include <iostream>
 #include <sstream>
+#include <cstdlib>
+#include <cstring>
 
 #include <math.h>
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/directx/mesh.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/directx/mesh.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/directx/mesh.cpp	2006-07-04 11:13:15.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/directx/mesh.cpp	2009-05-15 13:07:21.000000000 +0200
@@ -29,6 +29,8 @@
 #include "directx.h"
 
 #include <iostream>
+#include <cstdlib>
+#include <cstring>
 
 #include <osg/Notify>
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/directx/types.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/directx/types.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/directx/types.cpp	2006-07-04 11:13:15.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/directx/types.cpp	2009-05-15 13:08:11.000000000 +0200
@@ -29,6 +29,7 @@
 #include "types.h"
 
 #include <iostream>
+#include <cstdlib>
 
 using namespace std;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/flt/HeaderRecord.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/flt/HeaderRecord.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/flt/HeaderRecord.cpp	2005-11-17 16:03:49.000000000 +0100
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/flt/HeaderRecord.cpp	2009-05-15 13:10:22.000000000 +0200
@@ -7,6 +7,8 @@
 #include "HeaderRecord.h"
 #include "Input.h"
 
+#include <cstring>
+
 using namespace flt;
 
 /*
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/gif/ReaderWriterGIF.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/gif/ReaderWriterGIF.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/gif/ReaderWriterGIF.cpp	2005-08-24 12:48:24.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/gif/ReaderWriterGIF.cpp	2009-05-15 15:19:50.000000000 +0200
@@ -41,9 +41,9 @@
   GIF loader, using libungif
   Based, in part, on source code found in libungif, gif2rgb.c
 */
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
 
 extern  "C"
 {
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/lwo/ReaderWriterLWO.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/lwo/ReaderWriterLWO.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/lwo/ReaderWriterLWO.cpp	2006-08-02 12:43:26.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/lwo/ReaderWriterLWO.cpp	2009-05-15 13:22:30.000000000 +0200
@@ -18,6 +18,7 @@
 #include <string>
 #include <sstream>
 #include <algorithm>
+#include <memory>
 
 #include <osg/Notify>
 #include <osg/Node>
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/OpenFlight/DataInputStream.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/OpenFlight/DataInputStream.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/OpenFlight/DataInputStream.cpp	2006-07-04 13:24:36.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/OpenFlight/DataInputStream.cpp	2009-05-15 13:17:57.000000000 +0200
@@ -8,6 +8,7 @@
 
 #include <osg/Endian>
 #include <osg/Notify>
+#include <cstring>
 
 using namespace flt;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/txp/trpage_swap.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/txp/trpage_swap.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgPlugins/txp/trpage_swap.cpp	2006-06-27 12:07:42.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgPlugins/txp/trpage_swap.cpp	2009-05-15 13:30:42.000000000 +0200
@@ -15,6 +15,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <cstring>
 
 /* trpage_swap.h
 	Byte swapping utility functions.
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgUtil/DisplayRequirementsVisitor.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgUtil/DisplayRequirementsVisitor.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgUtil/DisplayRequirementsVisitor.cpp	2006-07-18 17:21:48.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgUtil/DisplayRequirementsVisitor.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -17,6 +17,7 @@
 #include <stdio.h>
 #include <list>
 #include <set>
+#include <cstring>
 
 #include <osgUtil/DisplayRequirementsVisitor>
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgUtil/Optimizer.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgUtil/Optimizer.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgUtil/Optimizer.cpp	2006-09-08 22:08:01.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgUtil/Optimizer.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -39,6 +39,7 @@
 #include <algorithm>
 #include <numeric>
 #include <sstream>
+#include <cstring>
 
 using namespace osgUtil;
 
diff -aur OSG_OP_OT-1.2/OpenSceneGraph/src/osgUtil/RenderBin.cpp OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgUtil/RenderBin.cpp
--- OSG_OP_OT-1.2/OpenSceneGraph/src/osgUtil/RenderBin.cpp	2006-07-19 22:56:24.000000000 +0200
+++ OSG_OP_OT-1.2-patched/OpenSceneGraph/src/osgUtil/RenderBin.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -19,6 +19,7 @@
 #include <osg/AlphaFunc>
 
 #include <algorithm>
+#include <cstring>
 
 using namespace osg;
 using namespace osgUtil;
diff -aur OSG_OP_OT-1.2/Producer/include/Producer/Camera OSG_OP_OT-1.2-patched/Producer/include/Producer/Camera
--- OSG_OP_OT-1.2/Producer/include/Producer/Camera	2006-08-25 19:36:42.000000000 +0200
+++ OSG_OP_OT-1.2-patched/Producer/include/Producer/Camera	2009-05-15 12:29:12.000000000 +0200
@@ -18,6 +18,7 @@
 #include <Producer/Referenced>
 
 #include <vector>
+#include <cstring>
 
 #include <Producer/RefOpenThreads>
 
diff -aur OSG_OP_OT-1.2/Producer/src/KeyboardMouse.cpp OSG_OP_OT-1.2-patched/Producer/src/KeyboardMouse.cpp
--- OSG_OP_OT-1.2/Producer/src/KeyboardMouse.cpp	2006-09-01 21:09:11.000000000 +0200
+++ OSG_OP_OT-1.2-patched/Producer/src/KeyboardMouse.cpp	2009-05-15 12:29:12.000000000 +0200
@@ -37,6 +37,7 @@
 #include <vector>
 #include <map>
 #include <algorithm>
+#include <cstring>
 
 #include <float.h>
 
diff -aur OSG_OP_OT-1.2/Producer/src/RenderSurface.cpp OSG_OP_OT-1.2-patched/Producer/src/RenderSurface.cpp
--- OSG_OP_OT-1.2/Producer/src/RenderSurface.cpp	2006-06-12 11:56:22.000000000 +0200
+++ OSG_OP_OT-1.2-patched/Producer/src/RenderSurface.cpp	2009-05-15 12:32:35.000000000 +0200
@@ -12,6 +12,8 @@
  */
 
 #include <Producer/RenderSurface>
+#include <cstring>
+#include <cstdlib>
 
 using namespace std;
 using namespace Producer;
diff -aur OSG_OP_OT-1.2/Producer/src/Version.cpp OSG_OP_OT-1.2-patched/Producer/src/Version.cpp
--- OSG_OP_OT-1.2/Producer/src/Version.cpp	2006-09-12 21:12:20.000000000 +0200
+++ OSG_OP_OT-1.2-patched/Producer/src/Version.cpp	2009-05-15 12:32:47.000000000 +0200
@@ -13,6 +13,7 @@
 
 #include <string>
 #include <Producer/Version>
+#include <cstdlib>
 
 using namespace Producer;

---

From: Ilmar Wilbers <[email-masked]>
Date: Fri, 15 May 2009 18:19:37 +0200

Pushed this one myself...

ilmar

---

From: "Johannes Ring" <[email-masked]>
Date: Mon, 18 May 2009 08:42:27 +0200 (CEST)

Thanks for the OSG patch. It was applied cleanly, however, I still got
stuck at the same problem as before. I will look closer into this.

Johannes

---

From: "Johannes Ring" <[email-masked]>
Date: Wed, 20 May 2009 08:38:41 +0200 (CEST)

Hi,

We (me and Ilmar) figured out the problem with OpenSceneGraph but we had
to disable some part (osgIntrospection) to make it work with GCC 4.3.
There are now OSG and Meshbuilder packages for Intrepid and Jaunty (and
Hardy) at packages.simula.no. To install Meshbuilder, add the repository
as described at http://fenics.org/wiki/Download and then simply run

sudo apt-get install meshbuilder

Note that this will also install DOLFIN and some other FEniCS packages. To
build Meshbuilder from source instead, install the OSG 1.2.0 development
packages by running

# Hardy:
sudo apt-get install libopenscenegraph-dev=1.2.0-4build1~simula1 \
    libopenthreads-dev=1.2.0-4build1~simula1 \
    libproducer-dev=1.2.0-4build1~simula1

# Intrepid:
sudo apt-get install libopenscenegraph-dev=1.2.0-4build1~intrepid3 \
    libopenthreads-dev=1.2.0-4build1~intrepid3 \
    libproducer-dev=1.2.0-4build1~intrepid3

# Jaunty:
sudo apt-get install libopenscenegraph-dev=1.2.0-4build1+jaunty1 \
    libopenthreads-dev=1.2.0-4build1+jaunty1 \
    libproducer-dev=1.2.0-4build1+jaunty1

Then build Meshbuilder as usual.

Note: The Ubuntu package manager will likely notify about updated OSG
packages that will replace the 1.2.0 packages if installed. To prevent
these from upgrading simply run

# Hardy:
echo "libopenscenegraph-dev hold" | sudo dpkg --set-selections
echo "libopenthreads-dev hold" | sudo dpkg --set-selections
echo "libopenscenegraph6 hold" | sudo dpkg --set-selections
echo "libopenthreads6 hold" | sudo dpkg --set-selections

# Intrepid and Jaunty:
echo "libopenscenegraph-dev hold" | sudo dpkg --set-selections
echo "libopenthreads-dev hold" | sudo dpkg --set-selections
echo "libopenscenegraph7 hold" | sudo dpkg --set-selections
echo "libopenthreads7 hold" | sudo dpkg --set-selections

Johannes

---

From: Anders Logg <[email-masked]>
Date: Wed, 20 May 2009 21:34:08 +0200

Nice! Thanks a lot!

-- 
Anders