I’m facing issues when building jetson inference libraray from source.
I’m following this documentation: jetson-inference/docs/building-repo-2.md at master · dusty-nv/jetson-inference · GitHub
Errors happen when running command: make -j$(nproc)
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCudaMemory_GetStream(PyCudaMemory*, void*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:194:9: error: ‘PYLONG_FROM_PTR’ was not declared in this scope
return PYLONG_FROM_PTR(self->stream);
^~~~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:194:9: note: suggested alternative: ‘PYLONG_FROM_LONG’
return PYLONG_FROM_PTR(self->stream);
^~~~~~~~~~~~~~~
PYLONG_FROM_LONG
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCudaMemory_GetEvent(PyCudaMemory*, void*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:223:9: error: ‘PYLONG_FROM_PTR’ was not declared in this scope
return PYLONG_FROM_PTR(self->event);
^~~~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:223:9: note: suggested alternative: ‘PYLONG_FROM_LONG’
return PYLONG_FROM_PTR(self->event);
^~~~~~~~~~~~~~~
PYLONG_FROM_LONG
In file included from /home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:23:0:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCUDA_StreamWaitEvent(PyObject*, PyObject*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1422:52: error: too few arguments to function ‘cudaError_t cudaStreamWaitEvent(cudaStream_t, cudaEvent_t, unsigned int)’
PYCUDA_ASSERT(cudaStreamWaitEvent(stream, event));
^
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.h:83:49: note: in definition of macro ‘PYCUDA_CHECK’
const cudaError_t _retval = cudaCheckError((x), #x, FILE, LINE);
^
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1422:5: note: in expansion of macro ‘PYCUDA_ASSERT’
PYCUDA_ASSERT(cudaStreamWaitEvent(stream, event));
^~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCUDA_StreamCreate(PyObject*, PyObject*, PyObject*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1381:12: error: ‘PYLONG_FROM_PTR’ was not declared in this scope
return PYLONG_FROM_PTR(stream);
^~~~~~~~~~~~~~~
In file included from /usr/local/cuda/include/channel_descriptor.h:61:0,
from /usr/local/cuda/include/cuda_runtime.h:95,
from /home/jetson/jetson-inference/build/aarch64/include/jetson-utils/cudaUtility.h:27,
from /home/jetson/jetson-inference/build/aarch64/include/jetson-utils/imageFormat.h:28,
from /home/jetson/jetson-inference/utils/python/bindings/PyCUDA.h:27,
from /home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:23:
/usr/local/cuda/include/cuda_runtime_api.h:2289:58: note: declared here
extern host cudart_builtin cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
^~~~~~~~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1381:12: note: suggested alternative: ‘PYLONG_FROM_LONG’
return PYLONG_FROM_PTR(stream);
^~~~~~~~~~~~~~~
PYLONG_FROM_LONG
In file included from /home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:23:0:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCUDA_StreamWaitEvent(PyObject*, PyObject*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1422:52: error: too few arguments to function ‘cudaError_t cudaStreamWaitEvent(cudaStream_t, cudaEvent_t, unsigned int)’
PYCUDA_ASSERT(cudaStreamWaitEvent(stream, event));
^
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.h:83:49: note: in definition of macro ‘PYCUDA_CHECK’
const cudaError_t _retval = cudaCheckError((x), #x, FILE, LINE);
^
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1422:5: note: in expansion of macro ‘PYCUDA_ASSERT’
PYCUDA_ASSERT(cudaStreamWaitEvent(stream, event));
^~~~~~~~~~~~~
In file included from /usr/local/cuda/include/channel_descriptor.h:61:0,
from /usr/local/cuda/include/cuda_runtime.h:95,
from /home/jetson/jetson-inference/build/aarch64/include/jetson-utils/cudaUtility.h:27,
from /home/jetson/jetson-inference/build/aarch64/include/jetson-utils/imageFormat.h:28,
from /home/jetson/jetson-inference/utils/python/bindings/PyCUDA.h:27,
from /home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:23:
/usr/local/cuda/include/cuda_runtime_api.h:2289:58: note: declared here
extern host cudart_builtin cudaError_t CUDARTAPI cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags);
^~~~~~~~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCUDA_EventCreate(PyObject*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1433:9: error: ‘PYLONG_FROM_PTR’ was not declared in this scope
return PYLONG_FROM_PTR(event);
^~~~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1433:9: note: suggested alternative: ‘PYLONG_FROM_LONG’
return PYLONG_FROM_PTR(event);
^~~~~~~~~~~~~~~
PYLONG_FROM_LONG
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp: In function ‘PyObject* PyCUDA_EventRecord(PyObject*, PyObject*, PyObject*)’:
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1467:12: error: ‘PYLONG_FROM_PTR’ was not declared in this scope
return PYLONG_FROM_PTR(event);
^~~~~~~~~~~~~~~
/home/jetson/jetson-inference/utils/python/bindings/PyCUDA.cpp:1467:12: note: suggested alternative: ‘PYLONG_FROM_LONG’
return PYLONG_FROM_PTR(event);
^~~~~~~~~~~~~~~
PYLONG_FROM_LONG
utils/python/bindings_python_3.6/CMakeFiles/jetson-utils-python-36.dir/build.make:62: recipe for target ‘utils/python/bindings_python_3.6/CMakeFiles/jetson-utils-python-36.dir/PyCUDA.cpp.o’ failed
make[2]: *** [utils/python/bindings_python_3.6/CMakeFiles/jetson-utils-python-36.dir/PyCUDA.cpp.o] Error 1
CMakeFiles/Makefile2:837: recipe for target ‘utils/python/bindings_python_3.6/CMakeFiles/jetson-utils-python-36.dir/all’ failed
make[1]: *** [utils/python/bindings_python_3.6/CMakeFiles/jetson-utils-python-36.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 44%] Building NVCC (Device) object CMakeFiles/jetson-inference.dir/c/jetson-inference_generated_backgroundNet.cu.o
utils/python/bindings_python_2.7/CMakeFiles/jetson-utils-python-27.dir/build.make:62: recipe for target ‘utils/python/bindings_python_2.7/CMakeFiles/jetson-utils-python-27.dir/PyCUDA.cpp.o’ failed
make[2]: *** [utils/python/bindings_python_2.7/CMakeFiles/jetson-utils-python-27.dir/PyCUDA.cpp.o] Error 1
CMakeFiles/Makefile2:782: recipe for target ‘utils/python/bindings_python_2.7/CMakeFiles/jetson-utils-python-27.dir/all’ failed
make[1]: *** [utils/python/bindings_python_2.7/CMakeFiles/jetson-utils-python-27.dir/all] Error 2
[ 44%] Built target video-viewer
How can i fix this?