Swig uses old libraries instead of local ones for update

Issue #560 resolved
getzze created an issue

Hi, I am trying to update Dolfin from 1.5 to 1.6 on Arch Linux and I get the following error:

[ 95%] Swig source
/usr/include/dolfin/mesh/MultiMesh.h:289: Warning 503: Can't wrap 'dolfin::plot' unless renamed to a valid identifier.
Scanning dependencies of target _mesh
[ 95%] Building CXX object dolfin/swig/modules/mesh/CMakeFiles/_mesh.dir/modulePYTHON_wrap.cxx.o
In file included from /usr/include/limits.h:25:0,
                 from /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include-fixed/limits.h:168,
                 from /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include-fixed/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/include-fixed/limits.h:34,
                 from /usr/include/python2.7/Python.h:19,
                 from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:169:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_BoxMesh__SWIG_0(PyObject*, int, PyObject**)’:
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:55045:99: error: no matching function for call to ‘dolfin::BoxMesh::BoxMesh(double&, double&, double&, double&, double&, double&, std::size_t&, std::size_t&, std::size_t&)’
       result = (dolfin::BoxMesh *)new dolfin::BoxMesh(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
                                                                                                   ^
In file included from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:3979:0:
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:101:5: note: candidate: dolfin::BoxMesh::BoxMesh(MPI_Comm, const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::size_t)
     BoxMesh(MPI_Comm comm,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:101:5: note:   candidate expects 6 arguments, 9 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:70:5: note: candidate: dolfin::BoxMesh::BoxMesh(const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::size_t)
     BoxMesh(const Point& p0, const Point& p1,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:70:5: note:   candidate expects 5 arguments, 9 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note: candidate: dolfin::BoxMesh::BoxMesh(const dolfin::BoxMesh&)
   class BoxMesh : public Mesh
         ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note:   candidate expects 1 argument, 9 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note: candidate: dolfin::BoxMesh::BoxMesh(dolfin::BoxMesh&&)
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note:   candidate expects 1 argument, 9 provided
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_BoxMesh__SWIG_1(PyObject*, int, PyObject**)’:
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:55145:105: error: no matching function for call to ‘dolfin::BoxMesh::BoxMesh(ompi_communicator_t*&, double&, double&, double&, double&, double&, double&, std::size_t&, std::size_t&, std::size_t&)’
       result = (dolfin::BoxMesh *)new dolfin::BoxMesh(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
                                                                                                         ^
In file included from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:3979:0:
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:101:5: note: candidate: dolfin::BoxMesh::BoxMesh(MPI_Comm, const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::size_t)
     BoxMesh(MPI_Comm comm,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:101:5: note:   candidate expects 6 arguments, 10 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:70:5: note: candidate: dolfin::BoxMesh::BoxMesh(const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::size_t)
     BoxMesh(const Point& p0, const Point& p1,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:70:5: note:   candidate expects 5 arguments, 10 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note: candidate: dolfin::BoxMesh::BoxMesh(const dolfin::BoxMesh&)
   class BoxMesh : public Mesh
         ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note:   candidate expects 1 argument, 10 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note: candidate: dolfin::BoxMesh::BoxMesh(dolfin::BoxMesh&&)
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/BoxMesh.h:40:9: note:   candidate expects 1 argument, 10 provided
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_RectangleMesh__SWIG_0(PyObject*, int, PyObject**)’:
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:55490:101: error: no matching function for call to ‘dolfin::RectangleMesh::RectangleMesh(double&, double&, double&, double&, std::size_t&, std::size_t&, std::string&)’
       result = (dolfin::RectangleMesh *)new dolfin::RectangleMesh(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
                                                                                                     ^
In file included from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:3981:0:
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(MPI_Comm, const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(MPI_Comm comm,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note:   candidate expects 6 arguments, 7 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(const Point& p0, const Point& p1,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note:   candidate expects 5 arguments, 7 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::RectangleMesh&)
   class RectangleMesh : public Mesh
         ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 7 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(dolfin::RectangleMesh&&)
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 7 provided
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_RectangleMesh__SWIG_1(PyObject*, int, PyObject**)’:
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:55559:96: error: no matching function for call to ‘dolfin::RectangleMesh::RectangleMesh(double&, double&, double&, double&, std::size_t&, std::size_t&)’
       result = (dolfin::RectangleMesh *)new dolfin::RectangleMesh(arg1,arg2,arg3,arg4,arg5,arg6);
                                                                                                ^
In file included from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:3981:0:
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(MPI_Comm, const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(MPI_Comm comm,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note:   no known conversion for argument 1 from ‘double’ to ‘MPI_Comm {aka ompi_communicator_t*}’
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(const Point& p0, const Point& p1,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note:   candidate expects 5 arguments, 6 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::RectangleMesh&)
   class RectangleMesh : public Mesh
         ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 6 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(dolfin::RectangleMesh&&)
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 6 provided
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_RectangleMesh__SWIG_2(PyObject*, int, PyObject**)’:
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:55648:106: error: no matching function for call to ‘dolfin::RectangleMesh::RectangleMesh(ompi_communicator_t*&, double&, double&, double&, double&, std::size_t&, std::size_t&, std::string&)’
       result = (dolfin::RectangleMesh *)new dolfin::RectangleMesh(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
                                                                                                          ^
In file included from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:3981:0:
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(MPI_Comm, const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(MPI_Comm comm,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note:   candidate expects 6 arguments, 8 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(const Point& p0, const Point& p1,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note:   candidate expects 5 arguments, 8 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::RectangleMesh&)
   class RectangleMesh : public Mesh
         ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 8 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(dolfin::RectangleMesh&&)
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 8 provided
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx: In function ‘PyObject* _wrap_new_RectangleMesh__SWIG_3(PyObject*, int, PyObject**)’:
/home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:55727:101: error: no matching function for call to ‘dolfin::RectangleMesh::RectangleMesh(ompi_communicator_t*&, double&, double&, double&, double&, std::size_t&, std::size_t&)’
       result = (dolfin::RectangleMesh *)new dolfin::RectangleMesh(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
                                                                                                     ^
In file included from /home/username/builds/dolfin-git/src/dolfin/build/dolfin/swig/modules/mesh/modulePYTHON_wrap.cxx:3981:0:
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(MPI_Comm, const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(MPI_Comm comm,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:90:5: note:   candidate expects 6 arguments, 7 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::Point&, const dolfin::Point&, std::size_t, std::size_t, std::string)
     RectangleMesh(const Point& p0, const Point& p1,
     ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:63:5: note:   candidate expects 5 arguments, 7 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(const dolfin::RectangleMesh&)
   class RectangleMesh : public Mesh
         ^
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 7 provided
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note: candidate: dolfin::RectangleMesh::RectangleMesh(dolfin::RectangleMesh&&)
/home/username/builds/dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h:38:9: note:   candidate expects 1 argument, 7 provided
dolfin/swig/modules/mesh/CMakeFiles/_mesh.dir/build.make:112: recipe for target 'dolfin/swig/modules/mesh/CMakeFiles/_mesh.dir/modulePYTHON_wrap.cxx.o' failed
make[2]: *** [dolfin/swig/modules/mesh/CMakeFiles/_mesh.dir/modulePYTHON_wrap.cxx.o] Error 1
CMakeFiles/Makefile2:469: recipe for target 'dolfin/swig/modules/mesh/CMakeFiles/_mesh.dir/all' failed
make[1]: *** [dolfin/swig/modules/mesh/CMakeFiles/_mesh.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

The error comes from a conflict with the old version, which is still installed. I am building dolfin 1.6 from a git clone repository, and when swig is creating the binding, it uses the old libs, installed in /usr/include/dolfin/RectangleMesh.h, instead of the new ones in dolfin-git/src/dolfin/dolfin/generation/RectangleMesh.h. So the functions mismatch because of the change double,double to dolfin::Point.

Problem solved by unsinstalling first the old version.

Comments (2)

  1. Log in to comment