← Back to team overview

dolfin team mailing list archive

error: "HAVE_SYS_TIME_H" redefined

 

Hi,

The buildbot found a problem in dolfin/la/TrilinosPreconditioner.cpp:

mpic++ -o dolfin/la/TrilinosPreconditioner.os -c -Wall -pipe -ansi
-BOOST_UBLAS_NDEBUG -DDEBUG -g -O2 -Werror -DHAS_MPI=1
-DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION=\"0.9.7\" -DHAS_LAPACK=1
-DHAS_TRILINOS=1 -DHAS_ZLIB=1 -DHAS_UMFPACK=1 -DHAS_CHOLMOD=1
-DHAS_SCOTCH=1 -DHAS_PARMETIS=1 -fno-strict-aliasing -fPIC
-fprofile-arcs -ftest-coverage -I. -I/opt/fenics/include
-I/usr/include -I/usr/include -I/usr/include -I/usr/include/libxml2
-I/opt/local/include/trilinos -I/usr/include
-I/usr/include/suitesparse -I/usr/include/suitesparse
-I/opt/local/include -I/usr/include
dolfin/la/TrilinosPreconditioner.cpp
In file included from /opt/local/include/trilinos/az_aztec.h:87,
                 from /opt/local/include/trilinos/AztecOO.h:44,
                 from dolfin/la/TrilinosPreconditioner.cpp:10:
/usr/lib/openmpi/include/mpi.h:62:1: error: "HAVE_SYS_TIME_H" redefined
In file included from /opt/local/include/trilinos/AztecOO_ConfigDefs.h:69,
                 from /opt/local/include/trilinos/AztecOO.h:34,
                 from dolfin/la/TrilinosPreconditioner.cpp:10:
/opt/local/include/trilinos/AztecOO_config.h:136:1: error: this is the
location of the previous definition
scons: *** [dolfin/la/TrilinosPreconditioner.os] Error 1
scons: building terminated because of errors.
dolfin/la/TrilinosPreconditioner.os failed: Error 1

Moving '#include <AztecOO.h>' to after '#include <ml_include.h>' fixed
the problem on the buildbot:

 === modified file 'dolfin/la/TrilinosPreconditioner.cpp'
--- dolfin/la/TrilinosPreconditioner.cpp	2010-03-04 10:42:03 +0000
+++ dolfin/la/TrilinosPreconditioner.cpp	2010-03-05 09:40:32 +0000
@@ -7,10 +7,10 @@
 #ifdef HAS_TRILINOS

 #include <boost/assign/list_of.hpp>
-#include <AztecOO.h>
 #include <Ifpack.h>
 #include <Epetra_CombineMode.h>
 #include <ml_include.h>
+#include <AztecOO.h>
 #include <ml_MultiLevelOperator.h>
 #include <ml_epetra_utils.h>

Johannes