uzh-rpg/rpg_vid2e

error building esim_torch

llzlcl opened this issue · 3 comments

I met a problem when building cuda version. Could you please offer some help? The error message is as follows. Thanks for your time.

Processing ./esim_torch
Building wheels for collected packages: esim-cuda
Building wheel for esim-cuda (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/cll/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-g6ejhw3n/setup.py'"'"'; file='"'"'/tmp/pip-req-build-g6ejhw3n/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-oqcutjzb
cwd: /tmp/pip-req-build-g6ejhw3n/
Complete output (14 lines):
running bdist_wheel
running build
running build_ext
building 'esim_cuda' extension
creating /tmp/pip-req-build-g6ejhw3n/build
creating /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8
Emitting ninja build file /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2
creating build/lib.linux-x86_64-3.8
g++ -pthread -shared -B /home/cll/anaconda3/compiler_compat -L/home/cll/anaconda3/lib -Wl,-rpath=/home/cll/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8/esim_cuda_kernel.o -L/home/cll/anaconda3/lib/python3.8/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-3.8/esim_cuda.cpython-38-x86_64-linux-gnu.so
g++: error: /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8/esim_cuda_kernel.o: No such file or directory
error: command 'g++' failed with exit status 1

ERROR: Failed building wheel for esim-cuda
Running setup.py clean for esim-cuda
Failed to build esim-cuda
Installing collected packages: esim-cuda
Running setup.py install for esim-cuda ... error
ERROR: Command errored out with exit status 1:
command: /home/cll/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-g6ejhw3n/setup.py'"'"'; file='"'"'/tmp/pip-req-build-g6ejhw3n/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-gmmfujvl/install-record.txt --single-version-externally-managed --compile --install-headers /home/cll/anaconda3/include/python3.8/esim-cuda
cwd: /tmp/pip-req-build-g6ejhw3n/
Complete output (14 lines):
running install
running build
running build_ext
building 'esim_cuda' extension
creating /tmp/pip-req-build-g6ejhw3n/build
creating /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8
Emitting ninja build file /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2
creating build/lib.linux-x86_64-3.8
g++ -pthread -shared -B /home/cll/anaconda3/compiler_compat -L/home/cll/anaconda3/lib -Wl,-rpath=/home/cll/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8/esim_cuda_kernel.o -L/home/cll/anaconda3/lib/python3.8/site-packages/torch/lib -L/usr/local/cuda/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda_cu -ltorch_cuda_cpp -o build/lib.linux-x86_64-3.8/esim_cuda.cpython-38-x86_64-linux-gnu.so
g++: error: /tmp/pip-req-build-g6ejhw3n/build/temp.linux-x86_64-3.8/esim_cuda_kernel.o: No such file or directory
error: command 'g++' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/cll/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-g6ejhw3n/setup.py'"'"'; file='"'"'/tmp/pip-req-build-g6ejhw3n/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-gmmfujvl/install-record.txt --single-version-externally-managed --compile --install-headers /home/cll/anaconda3/include/python3.8/esim-cuda Check the logs for full command output.

Solution found ?? @llzlcl

Hi there, maybe you want to try python3 instead of python?

Hi, sorry, I might make a mistake here. You need to disable the ninja.

cmdclass={
'build_ext': BuildExtension.with_options(use_ninja=False)
}