Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to solve gcc: fatal error: cannot execute 'cc1plus': execvp: Permission denied? #32

Open
wjrzm opened this issue Mar 29, 2023 · 2 comments

Comments

@wjrzm
Copy link

wjrzm commented Mar 29, 2023

After changing

bvh_include_dirs = torch.utils.cpp_extension.include_paths() + [
    'include',
    '/usr/local/cuda-11.4/samples/common/inc']

I run the commend python setup.py install and I got:

(pytorch) wjrzm@DESKTOP-QJIK4OK:~/SMPL-IK/torch-mesh-isect$ python setup.py install
running install
/home/wjrzm/anaconda3/envs/pytorch/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/wjrzm/anaconda3/envs/pytorch/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 mesh_intersection.egg-info/PKG-INFO
writing dependency_links to mesh_intersection.egg-info/dependency_links.txt
writing requirements to mesh_intersection.egg-info/requires.txt
writing top-level names to mesh_intersection.egg-info/top_level.txt
/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/cpp_extension.py:339: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'mesh_intersection.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'mesh_intersection.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'bvh_cuda' extension
gcc -pthread -B /home/wjrzm/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -Iinclude -I/usr/local/cuda-11.4/samples/common/inc -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -I/home/wjrzm/anaconda3/envs/pytorch/include/python3.7m -c src/bvh.cpp -o build/temp.linux-x86_64-cpython-37/src/bvh.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
gcc: fatal error: cannot execute 'cc1plus': execvp: Permission denied
compilation terminated.
error: command '/home/wjrzm/anaconda3/envs/pytorch/bin/gcc' failed with exit code 1

Do you know how to solve it?

Python:3.7.16 Torch:1.7.0 cuda:11.4

@jiawei151
Copy link

After changing

bvh_include_dirs = torch.utils.cpp_extension.include_paths() + [
    'include',
    '/usr/local/cuda-11.4/samples/common/inc']

I run the commend python setup.py install and I got:

(pytorch) wjrzm@DESKTOP-QJIK4OK:~/SMPL-IK/torch-mesh-isect$ python setup.py install
running install
/home/wjrzm/anaconda3/envs/pytorch/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/wjrzm/anaconda3/envs/pytorch/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 mesh_intersection.egg-info/PKG-INFO
writing dependency_links to mesh_intersection.egg-info/dependency_links.txt
writing requirements to mesh_intersection.egg-info/requires.txt
writing top-level names to mesh_intersection.egg-info/top_level.txt
/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/cpp_extension.py:339: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'mesh_intersection.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'mesh_intersection.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'bvh_cuda' extension
gcc -pthread -B /home/wjrzm/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -Iinclude -I/usr/local/cuda-11.4/samples/common/inc -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -I/home/wjrzm/anaconda3/envs/pytorch/include/python3.7m -c src/bvh.cpp -o build/temp.linux-x86_64-cpython-37/src/bvh.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
gcc: fatal error: cannot execute 'cc1plus': execvp: Permission denied
compilation terminated.
error: command '/home/wjrzm/anaconda3/envs/pytorch/bin/gcc' failed with exit code 1

Do you know how to solve it?

Python:3.7.16 Torch:1.7.0 cuda:11.4

Hi @wjrzm , I got the same problem when installing another package, have you got some ideas for it now? Thanks.

@wjrzm
Copy link
Author

wjrzm commented Sep 3, 2024

After changing

bvh_include_dirs = torch.utils.cpp_extension.include_paths() + [
    'include',
    '/usr/local/cuda-11.4/samples/common/inc']

I run the commend python setup.py install and I got:

(pytorch) wjrzm@DESKTOP-QJIK4OK:~/SMPL-IK/torch-mesh-isect$ python setup.py install
running install
/home/wjrzm/anaconda3/envs/pytorch/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/wjrzm/anaconda3/envs/pytorch/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 mesh_intersection.egg-info/PKG-INFO
writing dependency_links to mesh_intersection.egg-info/dependency_links.txt
writing requirements to mesh_intersection.egg-info/requires.txt
writing top-level names to mesh_intersection.egg-info/top_level.txt
/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/cpp_extension.py:339: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'mesh_intersection.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'mesh_intersection.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'bvh_cuda' extension
gcc -pthread -B /home/wjrzm/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -Iinclude -I/usr/local/cuda-11.4/samples/common/inc -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wjrzm/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -I/home/wjrzm/anaconda3/envs/pytorch/include/python3.7m -c src/bvh.cpp -o build/temp.linux-x86_64-cpython-37/src/bvh.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
gcc: fatal error: cannot execute 'cc1plus': execvp: Permission denied
compilation terminated.
error: command '/home/wjrzm/anaconda3/envs/pytorch/bin/gcc' failed with exit code 1

Do you know how to solve it?
Python:3.7.16 Torch:1.7.0 cuda:11.4

Hi @wjrzm , I got the same problem when installing another package, have you got some ideas for it now? Thanks.

Sorry this is too old for me and I've forgotten if I ever solved this problem, if I recall something I'll let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants