Closed EnricoGiordano1992 closed 4 years ago
with command ldd -r pybullet.so I get:
undefined symbol: PyCapsule_Type (./pybullet.so)
undefined symbol: _Py_NoneStruct (./pybullet.so)
undefined symbol: PyExc_AttributeError (./pybullet.so)
undefined symbol: PyExc_RuntimeError (./pybullet.so)
undefined symbol: PyExc_ImportError (./pybullet.so)
undefined symbol: PyTuple_SetItem (./pybullet.so)
undefined symbol: PyLong_AsLong (./pybullet.so)
undefined symbol: PyObject_GetAttrString (./pybullet.so)
undefined symbol: PyDict_SetItem (./pybullet.so)
undefined symbol: PyModule_AddObject (./pybullet.so)
undefined symbol: PyUnicode_AsASCIIString (./pybullet.so)
undefined symbol: PyTuple_New (./pybullet.so)
undefined symbol: PyArg_ParseTupleAndKeywords (./pybullet.so)
undefined symbol: PyBytes_FromString (./pybullet.so)
undefined symbol: PyErr_Format (./pybullet.so)
undefined symbol: PyFloat_FromDouble (./pybullet.so)
undefined symbol: PyFloat_AsDouble (./pybullet.so)
undefined symbol: PyModule_AddIntConstant (./pybullet.so)
undefined symbol: Py_BuildValue (./pybullet.so)
undefined symbol: PyImport_ImportModule (./pybullet.so)
undefined symbol: PyErr_Clear (./pybullet.so)
undefined symbol: PyDict_New (./pybullet.so)
undefined symbol: PyErr_SetString (./pybullet.so)
undefined symbol: PyArg_ParseTuple (./pybullet.so)
undefined symbol: PyCapsule_GetPointer (./pybullet.so)
undefined symbol: PySequence_Fast (./pybullet.so)
undefined symbol: PySequence_GetItem (./pybullet.so)
undefined symbol: PySequence_Size (./pybullet.so)
undefined symbol: PyLong_FromLong (./pybullet.so)
undefined symbol: PyErr_NewException (./pybullet.so)
undefined symbol: PyModule_Create2 (./pybullet.so)
undefined symbol: Py_AtExit (./pybullet.so)
undefined symbol: PyErr_Print (./pybullet.so)
PyBullet.so requires the right python.so file, it seems that it cannot link the Python so. Perhaps preload the python so file or add its path to LOAD_LIBRARY_PATH. Another way is to remove the python dependency: remove pybullet.c from the target, since Unity doesn't need it.
I have already tried preloading the python so file or adding its path to LOAD_LIBRARY_PATH but nothing happened. Could you explain me more precisely where should I remove pybullet.c from target?
How did you build pybullet.so? If using cmake, you can just remove pybullet.c from CMakeLists.txt in bullet/examples/pybullet. If you use python setup.py build, you can remove pybullet.c from setup.py in the root of Bullet.
this unity pybullet plugin isn't well supported, so you have to figure it out by yourself.
I'm trying to use pybullet on Unity3D using your wrapper, but Unity3D crash with this error:
I have build pybullet using build_cmake_pybullet_double.sh and I'm able to use pybullet on python3.6 without problems, so I think that there is something strange between Unity3D and pybullet.
In addition, I have modified NativeMethods.cs at line 66:
and at line 1421:
I copied pybullet.so from build_cmake/examples/pybullet into Assets/Plugins directory of Unity3D project.
Any advices?