error: command '/usr/bin/g++' failed with exit code 1
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
When I run pip install /tmp/extensions/diffoctreerast, Terminal outputs:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /tmp/extensions/diffoctreerast
Preparing metadata (setup.py) ... done
Building wheels for collected packages: diffoctreerast
Building wheel for diffoctreerast (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [49 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-310/diffoctreerast
copying diffoctreerast/octree_voxel_rasterizer.py -> build/lib.linux-x86_64-cpython-310/diffoctreerast
copying diffoctreerast/octree_gaussian_rasterizer.py -> build/lib.linux-x86_64-cpython-310/diffoctreerast
copying diffoctreerast/octree_trivec_rasterizer.py -> build/lib.linux-x86_64-cpython-310/diffoctreerast
copying diffoctreerast/octree_decoupoly_rasterizer.py -> build/lib.linux-x86_64-cpython-310/diffoctreerast
copying diffoctreerast/__init__.py -> build/lib.linux-x86_64-cpython-310/diffoctreerast
running build_ext
/home/hunterwarrior/anaconda3/envs/trellis/lib/python3.10/site-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'diffoctreerast._C' extension
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer
creating /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda
/home/hunterwarrior/anaconda3/envs/trellis/lib/python3.10/site-packages/torch/utils/cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
Emitting ninja build file /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.11.1.git.kitware.jobserver-1
g++ -pthread -B /home/hunterwarrior/anaconda3/envs/trellis/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hunterwarrior/anaconda3/envs/trellis/include -fPIC -O2 -isystem /home/hunterwarrior/anaconda3/envs/trellis/include -pthread -B /home/hunterwarrior/anaconda3/envs/trellis/compiler_compat -shared /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/ext.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/api.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda/backward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda/data_structure.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda/forward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/api.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda/backward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda/data_structure.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda/forward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/api.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda/backward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda/data_structure.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda/forward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/api.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda/backward.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda/data_structure.o /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda/forward.o -L/home/hunterwarrior/anaconda3/envs/trellis/lib/python3.10/site-packages/torch/lib -L/home/hunterwarrior/anaconda3/envs/trellis/lib -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-cpython-310/diffoctreerast/_C.cpython-310-x86_64-linux-gnu.so
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/ext.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/api.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda/backward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda/data_structure.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_decoupoly_rasterizer/cuda/forward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/api.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda/backward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda/data_structure.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_gaussian_rasterizer/cuda/forward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/api.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda/backward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda/data_structure.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_trivec_rasterizer/cuda/forward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/api.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda/backward.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda/data_structure.o: No such file or directory.
/home/hunterwarrior/anaconda3/envs/trellis/compiler_compat/ld: cannot find /tmp/extensions/diffoctreerast/build/temp.linux-x86_64-cpython-310/src/octree_voxel_rasterizer/cuda/forward.o: No such file or directory.
collect2: error: ld returned 1 exit status
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for diffoctreerast
Running setup.py clean for diffoctreerast
Failed to build diffoctreerast
ERROR: Failed to build installable wheels for some pyproject.toml based projects (diffoctreerast)
My versions in conda environment besides python 3.10:
[SYSTEM] PyTorch Version: 2.4.0, CUDA Version: 11.8
# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
# g++ --version
g++ (Ubuntu 12.3.0-17ubuntu1) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And my PATH:
/home/hunterwarrior/anaconda3/envs/trellis/bin:/home/hunterwarrior/anaconda3/condabin:/home/hunterwarrior/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/bin/g++
I have tried to lower my g++ version to g++-11 and g++-10, but it doesn't work.
By the way, a CUDA toolkit (including nvcc) is installed system-wide, outside the current virtual environment. The system CUDA version is 12.0, while the virtual environment uses a different CUDA runtime (11.8).The system-level nvcc is located at /usr/bin/nvcc, but the virtual environment prioritizes its own CUDA libraries. I don't know whether this may cause version conflicts during compilation since it uses subprocess.
If anyone can help, great gratitude to you!!!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce pip install /tmp/extensions/diffoctreerast with the reported Python, PyTorch, CUDA, and compiler versions. Start with the package's setup.py and the generated build output, especially the missing object files and the system versus environment CUDA paths. Done means the extension builds successfully and produces an installable wheel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- build-system, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100