NVIDIA / MinkowskiEngine

Minkowski Engine is an auto-diff neural network library for high-dimensional sparse tensors
https://nvidia.github.io/MinkowskiEngine
Other
2.43k stars 360 forks source link

”g++ ... xxx.o“ file not found mistake #487

Open FengJ130 opened 2 years ago

FengJ130 commented 2 years ago

Describe the bug Hello, when I install the MinkowskiEngined, no matter use ##pip install## or ##python setup## , it has a same mistake, which is as below:

WARNING: Skipping MinkowskiEngine as it is not installed.
--------------------------------
| CUDA compilation set         |
--------------------------------

Using BLAS=openblas
Using g++-7 for c++ compilation
running install
/home/jf/miniconda3/envs/py3-mink/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
/home/jf/miniconda3/envs/py3-mink/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
writing MinkowskiEngine.egg-info/PKG-INFO
writing dependency_links to MinkowskiEngine.egg-info/dependency_links.txt
writing requirements to MinkowskiEngine.egg-info/requires.txt
writing top-level names to MinkowskiEngine.egg-info/top_level.txt
reading manifest file 'MinkowskiEngine.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'MinkowskiEngine.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-cpython-37
creating build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiOps.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiSparseTensor.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiPruning.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiCoordinateManager.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiNetwork.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiNonlinearity.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiTensor.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiConvolution.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiCommon.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiChannelwiseConvolution.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiPooling.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiTensorField.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/sparse_matrix_functions.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/__init__.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiBroadcast.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/diagnostics.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiNormalization.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiUnion.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiKernelGenerator.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiFunctional.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
copying ./MinkowskiEngine/MinkowskiInterpolation.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine
creating build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/gradcheck.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/collation.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/summary.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/init.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/__init__.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/quantization.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
copying ./MinkowskiEngine/utils/coords.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/utils
creating build/lib.linux-x86_64-cpython-37/MinkowskiEngine/modules
copying ./MinkowskiEngine/modules/resnet_block.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/modules
copying ./MinkowskiEngine/modules/senet_block.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/modules
copying ./MinkowskiEngine/modules/__init__.py -> build/lib.linux-x86_64-cpython-37/MinkowskiEngine/modules
running build_ext
!!!!!!!!!!!!!!!! g++
building 'MinkowskiEngineBackend._C' extension
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src
creating /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/pybind
Emitting ninja build file /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.0
creating build/lib.linux-x86_64-cpython-37/MinkowskiEngineBackend
g++-7 -pthread -shared -B /home/jf/miniconda3/envs/py3-mink/compiler_compat -L/home/jf/miniconda3/envs/py3-mink/lib -Wl,-rpath=/home/jf/miniconda3/envs/py3-mink/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/broadcast_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/broadcast_kernel.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/convolution_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/convolution_kernel.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/convolution_transpose_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/coordinate_map_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/coordinate_map_manager.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/direct_max_pool.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/global_pooling_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/interpolation_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/local_pooling_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/local_pooling_transpose_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/math_functions_cpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/math_functions_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/pooling_avg_kernel.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/pooling_max_kernel.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/pruning_gpu.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/quantization.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/spmm.o /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/pybind/minkowski.o -L/home/jf/miniconda3/envs/py3-mink/lib/python3.7/site-packages/torch/lib -L/usr/lib -lcusparse -lopenblas -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-37/MinkowskiEngineBackend/_C.cpython-37m-x86_64-linux-gnu.so
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/broadcast_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/broadcast_kernel.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/convolution_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/convolution_kernel.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/convolution_transpose_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/coordinate_map_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/coordinate_map_manager.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/direct_max_pool.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/global_pooling_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/interpolation_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/local_pooling_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/local_pooling_transpose_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/math_functions_cpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/math_functions_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/pooling_avg_kernel.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/pooling_max_kernel.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/pruning_gpu.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/quantization.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/src/spmm.o: No such file or directory
g++-7: error: /home/jf/code/3dpoint/mmdetection3d-master/mmdetection3d-master/MinkowskiEngine/build/temp.linux-x86_64-cpython-37/pybind/minkowski.o: No such file or directory
error: command '/usr/bin/g++-7' failed with exit code 1

it looks like gcc or g++ makes the mistake.


Desktop (please complete the following information):


Additional context Add any other context about the problem here.

773041642 commented 1 year ago

Have you solved this problem?

FengJ130 commented 1 year ago

This problem is happened when i install the mmdetection3d package. But now i solved this problem with another way to install mm3d(one way in cuda 11.0 and another way in cuda 10.2[selected]). So i think i have installed this package, but maybe this is not helpful for you.

773041642 commented 1 year ago

Thanks. I will try other ways to solve it.

xuan-ma commented 1 year ago

I also mat this issue with torch1.13.1+cu11.7 and CUDA11.6 on Ubuntu 20.04 LTS with below tips, image so I just tried to resinstall torch1.12.1+cu11.6, finally I was able to install it with this command: $ python setup.py install --force_cuda --blas=openblas

I did not exactly know why it worked, but hope to help you.

ANANAN0981 commented 10 months ago

I also met with this problem when running 'python setup.py install --blas_include_dirs=${CONDA_PREFIX}/include --blas=openblas', and the following method resolved my issue.

The error was like: 'g++-9: error: {CPCM_root}/CPCM-master/env/MinkowskiEngine-0.5.4/build/temp.linux-x86_64-3.7/{CPCM_root}/CPCM-master/env/MinkowskiEngine-0.5.4/src/math_functions_cpu.o: file not found'.

The resolvent is: change the line “cmdclass={‘build_ext’: BuildExtension.with_options(use_ninja=True)}” in setup.py file into “cmdclass={‘build_ext’: BuildExtension.with_options(use_ninja=False)}”.

Maybe after this operation, you will have another path problem, e.g"error: command ‘:/usr/local/cuda/bin/nvcc’ failed: No such file or directory: ‘:/usr/local/cuda/bin/nvcc’. In that case, you have to delete the wrong path with ':' and ensure the CUDA_HOME is correct.

Here is the referred link: https://blog.csdn.net/xsy_0416/article/details/130151909