1 (edited by QXMeng 06-03-2016 12:47:02)

Topic: Problem of bindings in oofem 2.4

I try to install oofem with bindings, it shows that:
[ 94%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mixedgradientpressuredirichlet.C.o
[ 94%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mixedgradientpressureneumann.C.o
[ 94%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mixedgradientpressureweakperiodic.C.o
[ 94%] Building CXX object src/oofemlib/CMakeFiles/core.dir/load.C.o
[ 94%] Building CXX object src/oofemlib/CMakeFiles/core.dir/boundaryload.C.o
[ 95%] Building CXX object src/oofemlib/CMakeFiles/core.dir/pointload.C.o
[ 95%] Building CXX object src/oofemlib/CMakeFiles/core.dir/linearedgeload.C.o
[ 95%] Building CXX object src/oofemlib/CMakeFiles/core.dir/constantedgeload.C.o
[ 95%] Building CXX object src/oofemlib/CMakeFiles/core.dir/constantsurfaceload.C.o
[ 95%] Building CXX object src/oofemlib/CMakeFiles/core.dir/nodalload.C.o
[ 95%] Building CXX object src/oofemlib/CMakeFiles/core.dir/deadweight.C.o
[ 96%] Building CXX object src/oofemlib/CMakeFiles/core.dir/reinforcement.C.o
[ 96%] Building CXX object src/oofemlib/CMakeFiles/core.dir/surfacetensionbc.C.o
[ 96%] Building CXX object src/oofemlib/CMakeFiles/core.dir/linearconstraintbc.C.o
[ 96%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iga/iga.C.o
[ 96%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iga/feibspline.C.o
[ 97%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iga/feinurbs.C.o
[ 97%] Building CXX object src/oofemlib/CMakeFiles/core.dir/iga/feitspline.C.o
[ 97%] [ 97%] [ 97%] Building CXX object src/oofemlib/CMakeFiles/core.dir/targe2interface.C.o
Building CXX object src/oofemlib/CMakeFiles/core.dir/t3dinterface.C.o
Building CXX object src/oofemlib/CMakeFiles/core.dir/freeminterface.C.o
[ 98%] Building CXX object src/oofemlib/CMakeFiles/core.dir/subdivision.C.o
[ 98%] Building CXX object src/oofemlib/CMakeFiles/core.dir/trianglemesherinterface.C.o
[ 98%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mmaclosestiptransfer.C.o
[ 98%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mmashapefunctprojection.C.o
[ 98%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mmaleastsquareprojection.C.o
[ 98%] Building CXX object src/oofemlib/CMakeFiles/core.dir/mmacontainingelementprojection.C.o
[ 99%] Building CXX object src/oofemlib/CMakeFiles/core.dir/matstatmapperint.C.o
[ 99%] Built target core
Scanning dependencies of target liboofem
[ 99%] Building CXX object CMakeFiles/liboofem.dir/bindings/python/oofemlib.cpp.o
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp: In function ‘std::string oofem::FloatArray_str(const oofem::FloatArray&)’:
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp:134:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(size_t i=0; i<a.giveSize(); i++){ ret+=(i>0?", ":"")+std::to_string(a[    i ]); }
                               ^
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp: In function ‘void oofem::pyclass_Load()’:
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp:883:37: error: ‘GiveCopyOfComponentArray’ is not a member of ‘oofem::Load’
         .def("giveComponentArray", &Load::GiveCopyOfComponentArray,return_value_policy<manage_new_object>())
                                     ^
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp: In function ‘void oofem::init_module_liboofem()’:
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp:1700:64: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.8/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
   implicitly_convertible<std::auto_ptr<DofManValueField>, std::auto_ptr<Field> >();
                                                                ^
/home/mqx/oofem-2.4/bindings/python/oofemlib.cpp:1701:34: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.8/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
     register_ptr_to_python< std::auto_ptr<Field> >();
                                  ^
make[2]: *** [CMakeFiles/liboofem.dir/bindings/python/oofemlib.cpp.o] Error 1
make[1]: *** [CMakeFiles/liboofem.dir/all] Error 2
make: *** [all] Error 2

Re: Problem of bindings in oofem 2.4

my OS is Ubuntu 14.04 and I have install boost

Re: Problem of bindings in oofem 2.4

It's almost certainly something we have forgotten to check as we currently dont have automatic warnings on this in the nightly build.

It's usually just a function that has been renamed, or removed. In this case, "GiveCopyOfComponentArray" seems to have been changed. You can probably fix this error yourself by simply removing the effected method from the python bindings. I or some other developer will have a look at this later.

Re: Problem of bindings in oofem 2.4

Thanks very much for your reply, I will try to fix the problem.

5

Re: Problem of bindings in oofem 2.4

Hello,

I have just committed a patch to master branch that should fix the problem.
Would like to acknowledge the contribution of V. Smilauer.