[Dune] Error building dune-istl: #if with no expression

Lars Vingli Odsæter LAODS at statoil.com
Fri Jul 6 13:09:58 CEST 2012


Hello.

I am working on the OPM Project, which depends on dune-istl. I have successfully built dune-common, but when I try to build dune-istl (with dunecontrol all) I get the following error message:

In file included from ../../../dune/istl/gsetc.hh:11,
                 from example.cc:23:
../../../dune/istl/multitypeblockvector.hh:4:15: error: #if with no expression
In file included from ../../../dune/istl/gsetc.hh:12,
                 from example.cc:23:
../../../dune/istl/multitypeblockmatrix.hh:9:15: error: #if with no expression
In file included from example.cc:23:
../../../dune/istl/gsetc.hh:376:15: error: #if with no expression
../../../dune/istl/gsetc.hh:424:15: error: #if with no expression
../../../dune/istl/gsetc.hh:474:15: error: #if with no expression
../../../dune/istl/gsetc.hh:524:15: error: #if with no expression

I opened multitypeblockvector.hh and identified what caused the error. On line 9 it says
   #if HAVE_BOOST

Next, I opened dune-istl/config.h and observed that HAVE_BOOST and HAVE_BOOST_FUSION was defined as
#define HAVE_BOOST
#define HAVE_BOOST_FUSION

I tried to edit it to:
#define HAVE_BOOST 1
#define HAVE_BOOST_FUSION 1

This was based on my experience and help from google that an undefined macro may cause this error. Then I called dunecontrol make on dune-istl, and now it worked!

So what goes wrong here? I suppose it is not intended that I should edit config.h, but that this should work automatically. Please ask for more information if necessary. I have all boost-libraries installed, and they are detected by the building process.


Best regards,
Lars Vingli Odsæter,
Student at NTNU (Trondheim, Norway), currently summer internship at Statoil ASA.

-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you




More information about the Dune mailing list