NVIDIA-AI-IOT / scene-text-recognition

Hello,

I’m trying to install the necessary prerequisite with the instruction below:

https://forums.developer.nvidia.com/t/object-detection-with-jetson-nano/198189/9

However, when I run $bash install_torch_v1.9.sh I am facing this extension error;
[RuntimeError: Error compiling objects for extension]

Allowing ninja to set a default number of workers… (overridable by setting the environment variable MAX_JOBS=N)
[1/14] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_pool_kernel.cu -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_pool_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’“'”‘-fPIC’“'”‘’ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_53,code=compute_53 -gencode=arch=compute_53,code=sm_53 -std=c++14
FAILED: /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_pool_kernel.o
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_pool_kernel.cu -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_pool_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_53,code=compute_53 -gencode=arch=compute_53,code=sm_53 -std=c++14
Killed
[2/14] c++ -MMD -MF /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/deform_conv2d.o.d -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/deform_conv2d.cpp -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/deform_conv2d.o -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
[3/14] c++ -MMD -MF /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/interpolate_aa.o.d -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/interpolate_aa.cpp -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/interpolate_aa.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
[4/14] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/cuda/roi_pool_kernel.cu -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/cuda/roi_pool_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
--expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_53,code=compute_53 -gencode=arch=compute_53,code=sm_53 -std=c++14
[5/14] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_align_kernel.cu -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/cuda/ps_roi_align_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
--expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“gcc"’ '-DPYBIND11_STDLIB="libstdcpp"’ '-DPYBIND11_BUILD_ABI="cxxabi1011"’ -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_53,code=compute_53 -gencode=arch=compute_53,code=sm_53 -std=c++14
[6/14] /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/tmp/torchvision/torchvision/csrc -I/home/ai/.local/lib/python3.6/site-packages/torch/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/ai/.local/lib/python3.6/site-packages/torch/include/TH -I/home/ai/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c -c /tmp/torchvision/torchvision/csrc/ops/cuda/deform_conv2d_kernel.cu -o /tmp/torchvision/build/temp.linux-aarch64-3.6/tmp/torchvision/torchvision/csrc/ops/cuda/deform_conv2d_kernel.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ‘’”’“‘-fPIC’”‘"’’ -DTORCH_API_INCLUDE_EXTENSION_H ‘-DPYBIND11_COMPILER_TYPE=“_gcc”’ ‘-DPYBIND11_STDLIB=“_libstdcpp”’ ‘-DPYBIND11_BUILD_ABI=“_cxxabi1011”’ -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -gencode=arch=compute_53,code=compute_53 -gencode=arch=compute_53,code=sm_53 -std=c++14
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File “/home/ai/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 1672, in _run_ninja_build
env=env)
File “/usr/lib/python3.6/subprocess.py”, line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “setup.py”, line 488, in
‘clean’: clean,
File “/usr/local/lib/python3.6/dist-packages/setuptools/init.py”, line 163, in setup
return distutils.core.setup(**attrs)
File “/usr/lib/python3.6/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/usr/lib/python3.6/distutils/dist.py”, line 955, in run_commands
self.run_command(cmd)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py”, line 67, in run
self.do_egg_install()
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py”, line 109, in do_egg_install
self.run_command(‘bdist_egg’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/bdist_egg.py”, line 175, in run
cmd = self.call_command(‘install_lib’, warn_dir=0)
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/bdist_egg.py”, line 161, in call_command
self.run_command(cmdname)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/install_lib.py”, line 11, in run
self.build()
File “/usr/lib/python3.6/distutils/command/install_lib.py”, line 109, in build
self.run_command(‘build_ext’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/build_ext.py”, line 87, in run
_build_ext.run(self)
File “/home/ai/.local/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py”, line 186, in run
_build_ext.build_ext.run(self)
File “/usr/lib/python3.6/distutils/command/build_ext.py”, line 339, in run
self.build_extensions()
File “/home/ai/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 709, in build_extensions
build_ext.build_extensions(self)
File “/home/ai/.local/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py”, line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File “/usr/lib/python3.6/distutils/command/build_ext.py”, line 448, in build_extensions
self._build_extensions_serial()
File “/usr/lib/python3.6/distutils/command/build_ext.py”, line 473, in _build_extensions_serial
self.build_extension(ext)
File “/usr/local/lib/python3.6/dist-packages/setuptools/command/build_ext.py”, line 208, in build_extension
_build_ext.build_extension(self, ext)
File “/usr/lib/python3.6/distutils/command/build_ext.py”, line 533, in build_extension
depends=ext.depends)
File “/home/ai/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 539, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File “/home/ai/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 1360, in _write_ninja_file_and_compile_objects
error_prefix=‘Error compiling objects for extension’)
File “/home/ai/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

I’d really appreciate some pointers to the cause of this issue, since I’ve been trying everything I could think of, to no avail.

Thank you.

Hi,

Which JetPack do you use?
If JetPack 4.6.1 or 4.6.2 is used, would you mind replacing the package link with the following:

https://developer.download.nvidia.cn/compute/redist/jp/v461/pytorch/

Thanks.

1 Like

I got past all the issues so far. Building a docker image for now.

Still, thank you for the reply!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.