Tx2上编译成功,运行C++版本demo编译报错
Created by: vic1006
完全按照文档说明:https://paddle-lite.readthedocs.io/zh/latest/demo_guides/cuda.html 一步一步成功在Tx2( jetpack4.4)ubuntu 18.04.4上编译了paddle-lite 但是按照说明,编译C++版本demo时,却提示如下错误:
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyTuple_SetItem'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_Repr'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyInstanceMethod_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_ValueError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyLong_AsLong'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyDict_GetItemString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_Py_TrueStruct'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_IndexError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_NormalizeException'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyInstanceMethod_New'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyEval_AcquireThread'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_Str'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThreadState_DeleteCurrent'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_GetAttrString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCapsule_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyModule_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyMem_Free'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_Restore'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyType_IsSubtype'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyModule_AddObject'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyTuple_New'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_SetAttr'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_IsInstance'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_Py_NoneStruct'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyException_SetTraceback'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyNumber_Float'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyUnicode_FromFormat'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyList_Append'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_MemoryError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyType_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThread_get_key_value'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyDict_Next'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyList_Size'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyTuple_Size'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyNumber_Long'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyBuffer_Release'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_Format'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_CallObject'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyFloat_FromDouble'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyFloat_AsDouble'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyUnicode_DecodeUTF8'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThread_create_key'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCFunction_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThread_set_key_value'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_ExceptionMatches'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCFunction_NewEx'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyList_New'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyNumber_Check'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyProperty_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_PyObject_GetDictPtr'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyUnicode_FromString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `Py_GetVersion'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCapsule_SetContext'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyFrame_GetLineNumber'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyBytes_Size'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PySequence_Check'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyList_GetItem'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_Clear'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_HasAttrString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyWeakref_NewRef'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyDict_New'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_SetString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_BufferError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyEval_InitThreads'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCapsule_GetContext'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThreadState_Get'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_SetItem'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCapsule_New'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyMem_Calloc'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_SetAttrString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCapsule_GetPointer'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_RuntimeError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyBytes_AsString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_Py_NotImplementedStruct'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyBaseObject_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_GetItem'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_TypeError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyType_Ready'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyEval_SaveThread'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyMethod_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PySequence_GetItem'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_ClearWeakRefs'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PySequence_Size'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_Py_FalseStruct'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyLong_FromLong'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyEval_GetBuiltins'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyModule_Create2'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyLong_AsUnsignedLong'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyUnicode_AsEncodedString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_Occurred'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyDict_Copy'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyErr_Fetch'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThreadState_New'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_PyThreadState_UncheckedGet'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `_PyType_Lookup'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyDict_Size'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyFloat_Type'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PySequence_Tuple'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyLong_FromUnsignedLong'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_SystemError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyExc_ImportError'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyThreadState_Clear'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyDict_DelItemString'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyObject_Malloc'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyCapsule_GetName'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyTuple_GetItem'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyUnicode_AsUTF8String'
../../../cxx/lib/libpaddle_full_api_shared.so: undefined reference to `PyBytes_AsStringAndSize'
collect2: error: ld returned 1 exit status
CMakeFiles/demo.dir/build.make:95: recipe for target 'demo' failed
make[2]: *** [demo] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/demo.dir/all' failed
make[1]: *** [CMakeFiles/demo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2