Subject: [[email-masked]: Re: [FFC-dev] Re: [DOLFIN-dev] problem compile dolfin program, error in boost]

From: Anders Logg <[email-masked]>
Date: Tue, 2 May 2006 14:20:57 +0200

On Fri, Apr 28, 2006 at 07:58:37PM +0200, Garth N. Wells wrote:
> It's important that uBlas header files are included before any PETSc
> header files. Make sure that you have
> 
> #include <dolfin.h>
> #include "MyModel.h"
> 
> instead of  
> 
> #include "MyModel.h"
> #include <dolfin.h>
> 
> in your program file. The problem is that FFC includes the header file
> "dolfin/Vector.h" in the generate header file.
> 
> Anders: can we remove "dolfin/Vector.h" from the header files produced
> by FFC?
> 
> Garth

Yes, it should be removed. I don't know why it's there.

I'll fix it as soon as I can (which should be Friday).

/Anders

> On Fri, 2006-04-28 at 17:51 +0000, Alexander Jarosch wrote:
> > Hello everyone,
> > 
> > I hav compiled the latest dolfin (28.04.2006) with gcc 3.4.3 on an amd64 
> > machine. dolfin compiles fine, but when I want to compile my program 
> > written in dolfin it produces a long error output after
> > 
> >   `dolfin-config --compiler` `dolfin-config --cflags` -c main.cpp
> > 
> > In file included from /usr/include/boost/mpl/int.hpp:20,
> >                  from /usr/include/boost/mpl/lambda_fwd.hpp:23,
> >                  from /usr/include/boost/mpl/aux_/na_spec.hpp:18,
> >                  from /usr/include/boost/mpl/if.hpp:19,
> >                  from /usr/include/boost/numeric/ublas/detail/config.hpp:28,
> >                  from /usr/include/boost/numeric/ublas/exception.hpp:29,
> >                  from /usr/include/boost/numeric/ublas/storage.hpp:25,
> >                  from /usr/include/boost/numeric/ublas/vector.hpp:20,
> >                  from /usr/include/boost/numeric/ublas/matrix.hpp:20,
> >                  from /usr/local/include/dolfin/DenseMatrix.h:12,
> >                  from /usr/local/include/dolfin/FEM.h:12,
> >                  from /usr/local/include/dolfin/Solver.h:10,
> >                  from main.cpp:8:
> > /usr/include/boost/mpl/aux_/integral_wrapper.hpp:43: error: expected 
> > unqualified-id before '=' token
> > /usr/include/boost/mpl/aux_/integral_wrapper.hpp:43: error: expected `;' 
> > before '=' token
> > /usr/include/boost/mpl/aux_/integral_wrapper.hpp:85: error: template 
> > declaration of `const int mpl_::int__gierr'
> > /usr/include/boost/mpl/aux_/integral_wrapper.hpp:85: error: expected 
> > primary-expression before '<' token
> > /usr/include/boost/mpl/aux_/integral_wrapper.hpp:85: error: `::value' 
> > has not been declared
> > In file included from /usr/include/boost/mpl/aux_/na_spec.hpp:18,
> >                  from /usr/include/boost/mpl/if.hpp:19,
> >                  from /usr/include/boost/numeric/ublas/detail/config.hpp:28,
> >                  from /usr/include/boost/numeric/ublas/exception.hpp:29,
> >                  from /usr/include/boost/numeric/ublas/storage.hpp:25,
> >                  from /usr/include/boost/numeric/ublas/vector.hpp:20,
> >                  from /usr/include/boost/numeric/ublas/matrix.hpp:20,
> >                  from /usr/local/include/dolfin/DenseMatrix.h:12,
> >                  from /usr/local/include/dolfin/FEM.h:12,
> >                  from /usr/local/include/dolfin/Solver.h:10,
> >                  from main.cpp:8:
> > /usr/include/boost/mpl/lambda_fwd.hpp:32: error: `template_arity' is not 
> > a member of `mpl_::aux'
> > /usr/include/boost/mpl/lambda_fwd.hpp:32: error: `template_arity' is not 
> > a member of `mpl_::aux'
> > /usr/include/boost/mpl/lambda_fwd.hpp:32: error: template argument 1 is 
> > invalid
> > /usr/include/boost/mpl/lambda_fwd.hpp:32: error: expected `>' before 
> > '::' token
> > /usr/include/boost/mpl/lambda_fwd.hpp:35: error: expected unqualified-id 
> > before '>' token
> > /usr/include/boost/mpl/lambda_fwd.hpp:35: error: expected `;' before '>' 
> > token
> > In file included from /usr/include/boost/numeric/ublas/detail/config.hpp:28,
> >                  from /usr/include/boost/numeric/ublas/exception.hpp:29,
> >                  from /usr/include/boost/numeric/ublas/storage.hpp:25,
> >                  from /usr/include/boost/numeric/ublas/vector.hpp:20,
> >                  from /usr/include/boost/numeric/ublas/matrix.hpp:20,
> >                  from /usr/local/include/dolfin/DenseMatrix.h:12,
> >                  from /usr/local/include/dolfin/FEM.h:12,
> >                  from /usr/local/include/dolfin/Solver.h:10,
> >                  from main.cpp:8:
> > ...
> > 
> > and it continues a long way.
> > 
> > and it produces
> > 
> > In file included from /usr/local/include/dolfin/DenseMatrix.h:15,
> >                  from /usr/local/include/dolfin/FEM.h:12,
> >                  from /usr/local/include/dolfin/Solver.h:10,
> >                  from main.cpp:8:
> > /usr/local/include/dolfin/DenseVector.h: At global scope:
> > /usr/local/include/dolfin/DenseVector.h:27: error: expected 
> > template-name before '<' token
> > /usr/local/include/dolfin/DenseVector.h:27: error: expected `{' before 
> > '<' token
> > /usr/local/include/dolfin/DenseVector.h:27: error: expected 
> > unqualified-id before '<' token
> > /usr/local/include/dolfin/DenseVector.h:27: error: expected `,' or `;' 
> > before '<' token
> > In file included from /usr/local/include/dolfin/DenseMatrix.h:16,
> >                  from /usr/local/include/dolfin/FEM.h:12,
> >                  from /usr/local/include/dolfin/Solver.h:10,
> >                  from main.cpp:8:
> > 
> > as well somewhen along the way.
> > 
> > can anyone point me out where the problem is, or how to fix it. I can 
> > also send in the complete log file if needed.
> > 
> > thanks in advance
> > 
> > Alex
> 
> 
> 
> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev