Unexpected type name 'MATRIX' when building dune-uggrid
I am trying to build DUNE/DuMuX on an Ubuntu 14.04 computational server (I am not the admin so
I am compiling it in my dedicated work space at /scratch/...
).
I am trying to build the following DUNE modules
dune-common
, dune-istl
, dune-grid
, dune-uggrid
, dune-geometry
, and dune-localfunctions
all version 2.5.1 together with DuMuX
version 2.12.0, and the master branch of dumux-devel
; all cloned by
git from
https://github.com/dune-project/ and https://git.iws.uni-stuttgart.de/dumux-repositories/
except for dune-uggrid, which was cloned from
https://github.com/dune-mirrors/dune-uggrid.git
I run the build script like this:
./dune-common/bin/dunecontrol --opts=dumux/debug.opts all
The first problem I encountered was that dunecontrol
required C++14, but
gcc
on the server (version 4.8.4) only supported C++11:
[...]
CMake Error at cmake/modules/CheckCXXFeatures.cmake:117 (message):
dune-common requires compiler support for C++14, but your compiler only
supports C++11.
Now this problem was solved by installing the clang-3.9
package on the server (which supports C++14)
and rerunning dunecontrol
with the following options:
CMAKE_FLAGS="\
-DCMAKE_CXX_COMPILER=clang++-3.9 \
-DCMAKE_C_COMPILER=clang-3.9 \
-DCMAKE_CXX_FLAGS=\"$GXX_WARNING_OPTS $GXX_OPTS -stdlib=libc++\" \
"
Now, dunecontrol
is able to build all the modules, except for dune-uggrid
. Here, I get
the following error from dunecontrol
:
[...]
[ 83%] Building CXX object np/algebra/CMakeFiles/algebra2.dir/blasm.cc.o
/scratch/fcihh/dune/dune-uggrid/np/algebra/blasm.cc:408:19: warning: cast from 'char *' to 'DOUBLE *' (aka 'double *') increases required alignment from 1 to 8 [-Wcast-align]
M_ptr = (DOUBLE *) ((char *) mat + M_start_off_D);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
/scratch/fcihh/dune/dune-uggrid/np/algebra/blasm.cc:1237:36: error: unexpected type name 'MATRIX': expected expression
M_start_off[type] = offsetof(MATRIX, value)
And there follows several errors regarding unexpected type name for
MATRIX
or VECTOR
..
Then, dunecontrol
aborts with the message:
61 warnings and 14 errors generated.
make[2]: *** [np/algebra/CMakeFiles/algebra2.dir/blasm.cc.o] Error 1
make[1]: *** [np/algebra/CMakeFiles/algebra2.dir/all] Error 2
make: *** [all] Error 2
--- Failed to build dune-uggrid ---
Terminating dunecontrol due to previous errors!