No to_python (by-value) converter found for C++ type: boost:: ...

Asked by Luc Sibille

Hello,

I compiled the last trunk version yade-2016-09-01.git-e4e757f
When I run yade I have several errors of the same type. 2 exemples:

1st example:

Yade [1]: O.periodic=True

Yade [2]: O.cell.refSize=(2,2,2)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/3S-LAB/lsibille/yade_testPFV/install/bin/yade-2016-09-01.git-e4e757f in <module>()
----> 1 O.cell.refSize=(2,2,2)

TypeError: No to_python (by-value) converter found for C++ type: boost::shared_ptr<Cell>

2nd example:

Yade [3]: from yade import pack

Yade [4]: O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/3S-LAB/lsibille/yade_testPFV/install/bin/yade-2016-09-01.git-e4e757f in <module>()
----> 1 O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))

/home/3S-LAB/lsibille/yade_testPFV/install/lib/x86_64-linux-gnu/yade-2016-09-01.git-e4e757f/py/yade/geom.pyc in facetBox(center, extents, orientation, wallMask, **kw)
     23 """
     24
---> 25 return facetParallelepiped(center=center, extents=extents, height=extents[2], orientation=orientation, wallMask=wallMask, **kw)
     26
     27 #facetParallelepiped===============================================================

/home/3S-LAB/lsibille/yade_testPFV/install/lib/x86_64-linux-gnu/yade-2016-09-01.git-e4e757f/py/yade/geom.pyc in facetParallelepiped(center, extents, height, orientation, wallMask, **kw)
     79 G=orientation*Vector3(mx[0]+dx,mx[1],mx[2])+center
     80 H=orientation*Vector3(mn[0]+dx,mx[1],mx[2])+center
---> 81 if wallMask&1: ret+=doWall(A,D,H,E)
     82 if wallMask&2: ret+=doWall(B,F,G,C)
     83 if wallMask&4: ret+=doWall(A,E,F,B)

/home/3S-LAB/lsibille/yade_testPFV/install/lib/x86_64-linux-gnu/yade-2016-09-01.git-e4e757f/py/yade/geom.pyc in doWall(a, b, c, d)
     65 mn,mx=[-extents[i] for i in 0,1,2],[extents[i] for i in 0,1,2]
     66 def doWall(a,b,c,d):
---> 67 return [utils.facet((a,b,c),**kw),utils.facet((a,c,d),**kw)]
     68 ret=[]
     69

/home/3S-LAB/lsibille/yade_testPFV/install/lib/x86_64-linux-gnu/yade-2016-09-01.git-e4e757f/py/yade/utils.pyc in facet(vertices, dynamic, fixed, wire, color, highlight, noBound, material, mask, chain)
    259 vertices=Vector3(vertices[0])-center,Vector3(vertices[1])-center,Vector3(vertices[2])-center
    260 b.shape=Facet(color=color if color else randomColor(),wire=wire,highlight=highlight,vertices=vertices)
--> 261 _commonBodySetup(b,0,Vector3(0,0,0),material,noBound=noBound,pos=center,fixed=fixed)
    262 b.aspherical=False # mass and inertia are 0 anyway; fell free to change to ``True`` if needed
    263 b.mask=mask

/home/3S-LAB/lsibille/yade_testPFV/install/lib/x86_64-linux-gnu/yade-2016-09-01.git-e4e757f/py/yade/utils.pyc in _commonBodySetup(b, volume, geomInertia, material, pos, noBound, resetState, dynamic, fixed, blockedDOFs)
    121 else: raise TypeError("The 'material' argument must be None (for defaultMaterial), string (for shared material label), int (for shared material id) or Material instance.");
    122 ## resets state (!!)
--> 123 if resetState: b.state=b.mat.newAssocState()
    124 mass=volume*b.mat.density
    125 b.state.mass,b.state.inertia=mass,geomInertia*b.mat.density

TypeError: No to_python (by-value) converter found for C++ type: boost::shared_ptr<State>

Apparently it is related with boost librairy?
Any idea?

Best,
Luc

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Václav Šmilauer
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Can you tell on which system and paste the output of cmake?
Bruno

Revision history for this message
Luc Sibille (luc-sibille) said :
#2

Hi Bruno,

The system:
 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2 x86_64
(Goliarda computational facility of 3SR Lab)

Here is the cmake output:

-- Version is set to 2016-09-01.git-e4e757f
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Boost version: 1.60.0
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- Boost_VERSION: 106000
-- Boost_LIB_VERSION: 1_60
-- Boost_INCLUDE_DIRS: /opt/boost/1.60.0
-- Boost_LIBRARIES: /opt/boost/1.60.0/stage/lib/libboost_python.so/opt/boost/1.60.0/stage/lib/libboost_thread.so/opt/boost/1.60.0/stage/lib/libboost_filesystem.so/opt/boost/1.60.0/stage/lib/libboost_iostreams.so/opt/boost/1.60.0/stage/lib/libboost_regex.so/opt/boost/1.60.0/stage/lib/libboost_serialization.so/opt/boost/1.60.0/stage/lib/libboost_system.so/opt/boost/1.60.0/stage/lib/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found Eigen3, version: 3.2.4
-- Disable vectorization
-- The imported target "vtkParseJava" references the file
   "/usr/bin/vtkParseJava"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkWrapJava" references the file
   "/usr/bin/vtkWrapJava"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkCommonJava" references the file
   "/usr/lib/jni/libvtkCommonJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkFilteringJava" references the file
   "/usr/lib/jni/libvtkFilteringJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkImagingJava" references the file
   "/usr/lib/jni/libvtkImagingJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkGraphicsJava" references the file
   "/usr/lib/jni/libvtkGraphicsJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkGenericFilteringJava" references the file
   "/usr/lib/jni/libvtkGenericFilteringJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkIOJava" references the file
   "/usr/lib/jni/libvtkIOJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkRenderingJava" references the file
   "/usr/lib/jni/libvtkRenderingJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkVolumeRenderingJava" references the file
   "/usr/lib/jni/libvtkVolumeRenderingJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkHybridJava" references the file
   "/usr/lib/jni/libvtkHybridJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkWidgetsJava" references the file
   "/usr/lib/jni/libvtkWidgetsJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkParallelJava" references the file
   "/usr/lib/jni/libvtkParallelJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkInfovisJava" references the file
   "/usr/lib/jni/libvtkInfovisJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkGeovisJava" references the file
   "/usr/lib/jni/libvtkGeovisJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkViewsJava" references the file
   "/usr/lib/jni/libvtkViewsJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkQtChart" references the file
   "/usr/lib/libvtkQtChart.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "QVTK" references the file
   "/usr/lib/libQVTK.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- The imported target "vtkChartsJava" references the file
   "/usr/lib/jni/libvtkChartsJava.so.5.8.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/vtk-5.8/VTKTargets-release.cmake"
but not all the files it references.

-- Found VTK
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GTS
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found CGAL
-- Found Cholmod
-- Found OpenBlas
-- Found Metis
-- Found GL2PS
LBMFLOW is still experimental, building and running LBM engine are at your own risk!
CMake Warning at CMakeLists.txt:419 (MESSAGE):
  Use CMAKE_INSTALL_PREFIX option instead of INSTALL_PREFIX! It will be
  removed soon.

Yade will be installed to /home/3S-LAB/lsibille/yade_testPFV/install
-- Suffix is set to -2016-09-01.git-e4e757f
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /home/3S-LAB/lsibille/yade_testPFV/install
-- Could NOT find gts (missing: PY_gts)
-- Use embedded version of gts. Please, consider installing the corresponding package
-- ===========================================================
-- Yade configured with following features: Odeint VTK OpenMP GTS CGAL PFVFLOW LINSOLV GL2PS LBMFLOW
-- Disabled features: GUI SPH LIQMIGRATION MASK_ARBITRARY PROFILING PotentialParticles
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/3S-LAB/lsibille/yade_testPFV/build

Cheers,
Luc

Revision history for this message
Anton Gladky (gladky-anton) said :
#3

Could you please try to use the boost, which is shipped
with the distribution? Version 1.55 in case of Debian 7.

Cheers

Anton

Revision history for this message
Best Václav Šmilauer (eudoxos) said :
#4

This is a regression inreoduced in boost 1.60 and fixed in 1.61 (https://github.com/boostorg/python/issues/56). Use <1.60 or >1.60 and the error will go away. Cheers, vaclav

Revision history for this message
Luc Sibille (luc-sibille) said :
#5

Thank you all, it works with boost 1.61.0
Note that gcc-4.9 is consequently required for the compilation.
Cheers,
Luc

Revision history for this message
Luc Sibille (luc-sibille) said :
#6

Thanks Václav Šmilauer, that solved my question.