[Opm] Build of intersectio.cpp

Markus Blatt markus.blatt at opm-op.com
Mon Jul 6 07:40:12 UTC 2020


Hi,


On Mon, Jul 06, 2020 at 08:48:51AM +0530, Phani Narasimham wrote:
> Build of intersection.cpp in cppgrid is failing with integral_constant
> error.
> 
> If i write a sample .cpp file using integral_constant the compiler
> succeeds and builds the executable. ( g++ sample.cpp)
> 
> I am building opm on Ubuntu 16 and gcc 8.04
> 
> Where as building opm with make fails at intersection.cpp that
> integral_constant not known.
>

This should of course work (at least for the releases) as we have prebuilt
packages for Ubuntu. But I am not sure which compiler is used for them.

You are saying that you are using Ubuntu 16.04 with gcc-8.04. That means that
you must be using a non-standard compiler for that system. What I am wondering
is whether you specify the compiler to use to the build-system. If you do not
do that, I would assume that the standard compiler gcc-4.5 will be used. Maybe
that one does not support integral_constant in the standard location.
I would recommend to use the newest available package of the compiler (ggc-5
and g++-5 on xenial).

You need to tell Cmake to use the correct compiler by calling it like this:
"cmake -DCMAKE_CXX_COMPILER=/path/to/g++/compiler -DCMAKE_C_COMPILER=/path/to/gcc/compiler ..."
otherwise it will use gcc-4.5.

If that does not help, please post your CMakeCache.txt file and the output of
"make VERBOSE=1". Please also tell which version of OPM and DUNE you are using.

Please be aware that if you use e.g. a compiler not directly supported by your
platform, it is recommend to also compile all the dependencies with that compiler.

Also note that the next release might not support Ubuntu 16.04 anymore.

Cheers,

Markus



More information about the Opm mailing list