Building of latest mshr in fenics does not work

Issue #79 resolved
geert buckinx created an issue

Could it be that the latest mshr build is not working properly? Although fiat ,instant ,dijitso, ufl, ffc ,dolfin have been built successfully on my Windows 7 OS using dockertoolbox, I do not succeed in building mshr.

After executing the following Docker commands,

curl -s https://get.fenicsproject.org | bash export FENICS_SRC_DIR=/c/Users/u0072828.LUNA/dev/fenics mkdir -p $FENICS_SRC_DIR cd $FENICS_SRC_DIR for p in fiat instant dijitso ufl ffc dolfin mshr; do git clone https://geertbuckinx@bitbucket.org/fenics-project/$p.git; done fenicsproject pull dev-env mkdir -p /c/Users/u0072828.LUNA/fenicstestproject cd /c/Users/u0072828.LUNA/fenicstestproject fenicsproject create my-dev-env dev-env fenicsproject start my-dev-env FENICS_PYTHON=python3 fenics-build fiat FENICS_PYTHON=python3 fenics-build instant etc ...

I retrieve the error message below in Docker:
fenics@93fe431d7345:~/shared$ FENICS_PYTHON=python3 fenics-build mshr
FENICS-BUILDER: Building mshr...
FENICS-BUILDER: Building mshr with CMake...
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- program_options
-- Targetting Unix Makefiles
-- Using /usr/lib/ccache/c++ compiler.
-- Building CGAL
-- Current source dir: /home/fenics/local/src/mshr/3rdparty
-- Binary dir: /home/fenics/local/src/mshr/build-python3
-- CGAL build type: Release
-- Testing disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fenics/local/src/mshr/build-python3
[ 8%] Built target tet
[ 30%] Built target CGAL
[ 86%] Built target mshr
[ 91%] Built target mshrable
[ 94%] Building CXX object swig/CMakeFiles/_mshr.dir/mshrPYTHON_wrap.cxx.o
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4070:86: erro
r: convert_dolfin_quadrature_rule declared as an inline variable
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4070:86: erro
r: quadrature_rule was not declared in this scope
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4071:1: error
expected , or ; before { token { ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:98: erro r: quadrature_rule was not declared in this scope SWIGINTERNINLINE PyObject * convert_dolfin_quadrature_rule(std::vector<quadratu re_rule> qr_vector)
          ^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:113: err
or: template argument 1 is invalid
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:113: err
or: template argument 2 is invalid
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx: In function
PyObject* convert_dolfin_quadrature_rule(int):
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:124: err
or: PyObject* convert_dolfin_quadrature_rule(int) redeclared as different kind o
f symbol
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4070:55: note
previous declaration PyObject* convert_dolfin_quadrature_rule
SWIGINTERNINLINE PyObject * convert_dolfin_quadrature_rule(quadrature_rule qr)
^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4094:44: erro
r: request for member size in qr_vector, which is of non-class type int
PyObject * result = PyList_New(qr_vector.size());
^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4095:41: erro
r: request for member size in qr_vector, which is of non-class type int
for (std::size_t j = 0; j < qr_vector.size(); j++)
^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4097:69: erro
r: invalid types int[std::size_t {aka long unsigned int}] for array subscript
PyObject * py_qr_j = convert_dolfin_quadrature_rule(qr_vector[j]);
^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4097:70: erro
r: convert_dolfin_quadrature_rule cannot be used as a function
PyObject * py_qr_j = convert_dolfin_quadrature_rule(qr_vector[j]);
^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx: In function
int SWIG_AsVal_bool2(PyObject, bool):
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4279:546: war
ning: suggest parentheses around && within || [-Wparentheses]
swig/CMakeFiles/_mshr.dir/build.make:70: recipe for target 'swig/CMakeFiles/_msh
r.dir/mshrPYTHON_wrap.cxx.o' failed
make[2]: *** [swig/CMakeFiles/_mshr.dir/mshrPYTHON_wrap.cxx.o] Error 1
CMakeFiles/Makefile2:274: recipe for target 'swig/CMakeFiles/_mshr.dir/all' fail
ed
make[1]: *** [swig/CMakeFiles/_mshr.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
fenics@93fe431d7345:~/shared$ FENICS_PYTHON=python3 fenics-update mshr
FENICS-BUILDER: Pulling mshr...
Already up-to-date.
FENICS-BUILDER: Building mshr...
FENICS-BUILDER: Building mshr with CMake...
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- program_options
-- Targetting Unix Makefiles
-- Using /usr/lib/ccache/c++ compiler.
-- Building CGAL
-- Current source dir: /home/fenics/local/src/mshr/3rdparty
-- Binary dir: /home/fenics/local/src/mshr/build-python3
-- CGAL build type: Release
-- Testing disabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fenics/local/src/mshr/build-python3
[ 8%] Built target tet
[ 30%] Built target CGAL
[ 86%] Built target mshr
[ 91%] Built target mshrable
[ 94%] Building CXX object swig/CMakeFiles/_mshr.dir/mshrPYTHON_wrap.cxx.o
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4070:86: erro
r: convert_dolfin_quadrature_rule declared as an inline variable
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4070:86: erro
r: quadrature_rule was not declared in this scope
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4071:1: error
expected , or ; before { token { ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:98: erro r: quadrature_rule was not declared in this scope SWIGINTERNINLINE PyObject * convert_dolfin_quadrature_rule(std::vector<quadratu re_rule> qr_vector)
  ^
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:113: err
or: template argument 1 is invalid
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:113: err
or: template argument 2 is invalid
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx: In function
PyObject* convert_dolfin_quadrature_rule(int):
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4091:124: err
or: PyObject* convert_dolfin_quadrature_rule(int) redeclared as different kind o
f symbol
/home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4070:55: note
previous declaration PyObject convert_dolfin_quadrature_rule SWIGINTERNINLINE PyObject * convert_dolfin_quadrature_rule(quadrature_rule qr) ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4094:44: erro r: request for member size in qr_vector, which is of non-class type int PyObject * result = PyList_New(qr_vector.size()); ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4095:41: erro r: request for member size in qr_vector, which is of non-class type int for (std::size_t j = 0; j < qr_vector.size(); j++) ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4097:69: erro r: invalid types int[std::size_t {aka long unsigned int}] for array subscript PyObject * py_qr_j = convert_dolfin_quadrature_rule(qr_vector[j]); ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4097:70: erro r: convert_dolfin_quadrature_rule cannot be used as a function PyObject * py_qr_j = convert_dolfin_quadrature_rule(qr_vector[j]); ^ /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx: In function int SWIG_AsVal_bool2(PyObject, bool): /home/fenics/local/src/mshr/build-python3/swig/mshrPYTHON_wrap.cxx:4279:546: war ning: suggest parentheses around && within || [-Wparentheses] swig/CMakeFiles/_mshr.dir/build.make:70: recipe for target 'swig/CMakeFiles/_msh r.dir/mshrPYTHON_wrap.cxx.o' failed make[2]: [swig/CMakeFiles/_mshr.dir/mshrPYTHON_wrap.cxx.o] Error 1 CMakeFiles/Makefile2:274: recipe for target 'swig/CMakeFiles/_mshr.dir/all' fail ed make[1]: [swig/CMakeFiles/_mshr.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: ** [all] Error 2 fenics@93fe431d7345:~/shared$

Comments (4)

  1. Benjamin Dam Kehlet

    Thanks for reporting! I suspect this has to do with dolfin now using pybind11 to generate the python bindings (instead of SWIG), so some of the interface files that mshr relies on to integrate with dolfin doesn't exist anymore. I will look into it later today.

  2. Benjamin Dam Kehlet

    This should be fixed now. It was caused by a change in dolfin. Try building latest master now.

  3. Log in to comment