-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RuntimeError: Error compiling objects for extension #910
Comments
i get the same error |
There should be specific error messages in these cases, perhaps in a log file? Or can you set the variable |
thank Jeremy for your time and effort, setting PYTORCH3D_NO_NINJA to 1 didn't change any thing [2/53] cl /showIncludes /nologo /Ox /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -DWITH_CUDA -DTHRUST_IGNORE_CUB_VERSION_CHECK -ID:\pytorch3d\pytorch3d\csrc -ID:\pytorch3d\1 -IC:\Users\ali.hamdy\Anaconda3\envs\sfm\lib\site-packages\torch\include -IC:\Users\ali.hamdy\Anaconda3\envs\sfm\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\ali.hamdy\Anaconda3\envs\sfm\lib\site-packages\torch\include\TH -IC:\Users\ali.hamdy\Anaconda3\envs\sfm\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\include" -IC:\Users\ali.hamdy\Anaconda3\envs\sfm\include -IC:\Users\ali.hamdy\Anaconda3\envs\sfm\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c D:\pytorch3d\pytorch3d\csrc\pulsar\pytorch\util.cpp /FoD:\pytorch3d\build\temp.win-amd64-3.7\Release\pytorch3d\pytorch3d\csrc\pulsar\pytorch\util.obj -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14 C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xutility(1328): error: expected a "(" C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xutility(1329): error: expression must have class type C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xutility(1326): error: expected a "(" C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xutility(1328): error: expected a "(" Error limit reached. C:\Users\ali.hamdy\Anaconda3\envs\sfm\lib\site-packages\torch\include\c10/util/Optional.h(427): note: see reference to alias template instantiation 'c10::OptionalBase<std::vector<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>,std::allocator<std::vector<torch::autograd::profiler::LegacyEvent,std::allocatortorch::autograd::profiler::LegacyEvent>>>>' being compiled |
The environment variable didn't get passed in for some reason. But you now have more info, and it looks like you have the problem which has been seen before with |
thank you for your time
and modified pytorch3d's setup.py to get rid of the c++14 flag def get_extensions():
i commented the following #extra_compile_args = {"cxx": ["-std=c++14"]} nvcc_args = [ #extra_compile_args["nvcc"] = nvcc_args ext_modules = [ i got many warrnings but got this at the end Generating code Installed c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages\pytorch3d-0.3.0-py3.7-win-amd64.egg Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages Using c:\users\ali.hamdy\anaconda3\envs\sfm\lib\site-packages so this means that it has Finished processing successfully ? |
Yes, I think that looks like a complete build. To check if it installed, you can do |
yup it worked thank you Jeremy |
when I python setup.py install to install 0.4.0 .It failed .how can I solve it?
Traceback (most recent call last):
File "setup.py", line 144, in
cmdclass={"build_ext": BuildExtension},
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
build_ext.build_extensions(self)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1233, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/wangls@1/anaconda3/envs/ssr2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
The text was updated successfully, but these errors were encountered: