Build fails

Issue #4 resolved
Anders Logg (Chalmers) created an issue

Building mshr fails for me on Ubuntu 14.04 with the following error message:

[100%] Building CXX object swig/CMakeFiles/_mshr.dir/mshrPYTHON_wrap.cxx.o Linking CXX executable mshrable [100%] Built target mshrable mshrPYTHON_wrap.cxx: In function ‘PyObject _attach_base_to_numpy_array(PyObject, PyObject)’: mshrPYTHON_wrap.cxx:3393:35: warning: the address of ‘_Py_NoneStruct’ will never be NULL [-Waddress] Py_XINCREF(Py_None); ^ mshrPYTHON_wrap.cxx: In function ‘int SWIG_AsVal_bool2(PyObject, bool)’: mshrPYTHON_wrap.cxx:3731:546: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] if (!(PyBool_Check(obj)||PyArray_IsScalar(obj, Bool)||(PyArray_Check(obj)&&PyArray_SIZE(reinterpret_cast<PyArrayObject>(obj))==1)&&PyArray_TYPE(reinterpret_cast<PyArrayObject*>(obj))==NPY_BOOL)) ^ Linking CXX shared module _mshr.so [100%] Built target _mshr Install the project... -- Install configuration: "" -- Installing: /usr/local/lib/libmshr.so CMake Error at cmake_install.cmake:42 (FILE): file INSTALL cannot copy file "/home/logg/scratch/src/mshr/build/libmshr.so" to "/usr/local/lib/libmshr.so".

I also get a number of warnings:

/home/logg/scratch/src/mshr/include/mshr/CSGCGALDomain2D.h:46: Warning 362: operator= ignored /home/logg/scratch/src/mshr/include/mshr/CSGOperators.h:33: Warning 403: Class 'mshr::CSGOperator' might be abstract, no constructors generated, /home/logg/scratch/src/mshr/include/mshr/CSGGeometry.h:60: Warning 403: Method mshr::CSGGeometry::getType() const might not be implemented. /home/logg/scratch/src/mshr/include/mshr/CSGPrimitives2D.h:35: Warning 403: Class 'mshr::CSGPrimitive2D' might be abstract, no constructors generated, /home/logg/scratch/src/mshr/include/mshr/CSGGeometry.h:60: Warning 403: Method mshr::CSGGeometry::getType() const might not be implemented. /home/logg/scratch/src/mshr/include/mshr/CSGPrimitives3D.h:32: Warning 403: Class 'mshr::CSGPrimitive3D' might be abstract, no constructors generated, /home/logg/scratch/src/mshr/include/mshr/CSGGeometry.h:60: Warning 403: Method mshr::CSGGeometry::getType() const might not be implemented.

Comments (3)

  1. Benjamin Dam Kehlet

    Is it the installation phase or the compilation of the swig wrappers that causes trouble?

    I also get the warnings (both from swig and the compiler), but have not looked into it yet, as it haven't caused trouble so far.

    The warnings from swig are expected in the sense that classes it mentions should not be available to python users, but I haven't found a way of telling swig that this is what we want (I added some %ignore directives to the interface file in the hope that it silence swig, but it didn't...).

  2. Anders Logg (Chalmers) reporter

    My bad! The actual error was this one:

    cannot copy file "/home/logg/scratch/src/mshr/build/libmshr.so" to "/usr/local/lib/libmshr.so"
    

    which was there for obvious reasons... I got confused in between all the SWIG errors.

  3. Log in to comment