← Back to team overview

dolfin team mailing list archive

Re: Several fixes for gcc-4.3.0

 



Jed Brown wrote:
I had to make a number of minor changes in order to build with gcc 4.3.0 which
is much stricter.  Also, the swig wrapper will not build with -Werror.

It seems like the current build system is rather broken with respect to PETSc
since I cannot build with extra preconditioning libraries.  A huge advantage of
PETSc is that I can try out a bunch of preconditioners easily.  As far as I can
tell, the current build just adds linker options $PETSC_DIR/lib/$PETSC_ARCH and
-lpetscxxx which is not sufficient if I built with Hypre, ML, etc.  While it's
not painful to keep a special PETSC_ARCH with a minimal build just for dolfin,
it would be nice to use a more full-featured PETSc.

It should be possible to use all the features of PETSc, and -lpetscksp should provide access to all the preconditioners. If you provide more details of the problem that you're facing we can look at it.

What we don't want is to link directly to packages which PETSc depends on. PETSc takes care of this.

Garth


Jed


diff -r 74c268839124 dolfin/SConscript
--- a/dolfin/SConscript	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/SConscript	Sun Apr 13 19:09:18 2008 +0200
@@ -178,7 +178,7 @@
         modEnv.Append(SWIGFLAGS=mod.swigFlags + ["-I%s" % i for i in swigcppPath])
### uncomment the following line to remove -Werror from the CXXFLAGS:
-        #modEnv["CXXFLAGS"] = re.sub("-Werror","",modEnv["CXXFLAGS"])
+        modEnv["CXXFLAGS"] = re.sub("-Werror","",modEnv["CXXFLAGS"])
# Add python dependency (always required in python wrappers)
         pyPkg = configuredPackages[python_version]
diff -r 74c268839124 dolfin/function/DiscreteFunction.cpp
--- a/dolfin/function/DiscreteFunction.cpp	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/function/DiscreteFunction.cpp	Sun Apr 13 19:09:18 2008 +0200
@@ -21,6 +21,7 @@
 #include <dolfin/elements/ElementLibrary.h>
 #include "SubFunction.h"
 #include "DiscreteFunction.h"
+#include <cstring>
using namespace dolfin; diff -r 74c268839124 dolfin/io/File.h
--- a/dolfin/io/File.h	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/io/File.h	Sun Apr 13 19:09:18 2008 +0200
@@ -11,6 +11,7 @@
 #define __FILE_H
#include <string>
+#include <cstring>
#include <dolfin/la/GenericVector.h>
 #include <dolfin/la/GenericMatrix.h>
diff -r 74c268839124 dolfin/io/XMLObject.h
--- a/dolfin/io/XMLObject.h	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/io/XMLObject.h	Sun Apr 13 19:09:18 2008 +0200
@@ -9,6 +9,7 @@
#include <libxml/parser.h>
 #include <string>
+#include <cstring>
#include <dolfin/main/constants.h> diff -r 74c268839124 dolfin/mesh/IntersectionDetector.cpp
--- a/dolfin/mesh/IntersectionDetector.cpp	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/mesh/IntersectionDetector.cpp	Sun Apr 13 19:09:18 2008 +0200
@@ -8,6 +8,7 @@
 // First added:  2006-06-21
 // Last changed: 2008-02-18
+#include <algorithm>
 #include <dolfin/log/dolfin_log.h>
 #include <dolfin/common/Array.h>
 #include "Mesh.h"
diff -r 74c268839124 dolfin/mesh/IntervalCell.cpp
--- a/dolfin/mesh/IntervalCell.cpp	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/mesh/IntervalCell.cpp	Sun Apr 13 19:09:18 2008 +0200
@@ -10,6 +10,7 @@
 //
#include <cmath>
+#include <algorithm>
 #include <dolfin/log/dolfin_log.h>
 #include "Cell.h"
 #include "MeshEditor.h"
diff -r 74c268839124 dolfin/mesh/TetrahedronCell.cpp
--- a/dolfin/mesh/TetrahedronCell.cpp	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/mesh/TetrahedronCell.cpp	Sun Apr 13 19:09:18 2008 +0200
@@ -11,6 +11,7 @@
 // Rename of the former Tetrahedron.cpp
 //
+#include <algorithm>
 #include <dolfin/log/dolfin_log.h>
 #include "Cell.h"
 #include "MeshEditor.h"
diff -r 74c268839124 dolfin/mesh/TriangleCell.cpp
--- a/dolfin/mesh/TriangleCell.cpp	Sat Apr 12 23:22:47 2008 +0200
+++ b/dolfin/mesh/TriangleCell.cpp	Sun Apr 13 19:09:18 2008 +0200
@@ -11,6 +11,7 @@
 // Rename of the former Triangle.cpp
 //
+#include <algorithm>
 #include <dolfin/log/dolfin_log.h>
 #include "Cell.h"
 #include "MeshEditor.h"
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev



Follow ups

References