{"action":"created","issue":{"url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/issues/140","repository_url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding","labels_url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/issues/140/comments","events_url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/issues/140/events","html_url":"https://github.com/zhanghang1989/PyTorch-Encoding/issues/140","id":373781658,"node_id":"MDU6SXNzdWUzNzM3ODE2NTg=","number":140,"title":"ninja: build stopped: subcommand failed.","user":{"login":"sanersbug","id":31174846,"node_id":"MDQ6VXNlcjMxMTc0ODQ2","avatar_url":"https://avatars0.githubusercontent.com/u/31174846?v=4","gravatar_id":"","url":"https://api.github.com/users/sanersbug","html_url":"https://github.com/sanersbug","followers_url":"https://api.github.com/users/sanersbug/followers","following_url":"https://api.github.com/users/sanersbug/following{/other_user}","gists_url":"https://api.github.com/users/sanersbug/gists{/gist_id}","starred_url":"https://api.github.com/users/sanersbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanersbug/subscriptions","organizations_url":"https://api.github.com/users/sanersbug/orgs","repos_url":"https://api.github.com/users/sanersbug/repos","events_url":"https://api.github.com/users/sanersbug/events{/privacy}","received_events_url":"https://api.github.com/users/sanersbug/received_events","type":"User","site_admin":false},"labels":[{"id":603928847,"node_id":"MDU6TGFiZWw2MDM5Mjg4NDc=","url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/labels/bug","name":"bug","color":"ee0701","default":true},{"id":732918652,"node_id":"MDU6TGFiZWw3MzI5MTg2NTI=","url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/labels/high%20priority","name":"high priority","color":"e25531","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-10-25T05:42:19Z","updated_at":"2018-11-14T10:50:09Z","closed_at":null,"author_association":"NONE","body":"After i installed ninja , When i run \r\npython main.py --dataset cifar10 --model encnetdrop --widen 8 --ncodes 32 --resume model/encnet_cifar.pth.tar --eval\r\n\r\nit shows the error:\r\n\r\n/home/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py:118: UserWarning: \r\n\r\n                               !! WARNING !!\r\n\r\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nYour compiler (c++) may be ABI-incompatible with PyTorch!\r\nPlease use a compiler that is ABI-compatible with GCC 4.9 and above.\r\nSee https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.\r\n\r\nSee https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6\r\nfor instructions on how to install GCC 4.9 or higher.\r\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n\r\n                              !! WARNING !!\r\n\r\n  warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))\r\nTraceback (most recent call last):\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py\", line 759, in _build_extension_module\r\n    ['ninja', '-v'], stderr=subprocess.STDOUT, cwd=build_directory)\r\n  File \"/home/anaconda3/lib/python3.6/subprocess.py\", line 336, in check_output\r\n    **kwargs).stdout\r\n  File \"/home/anaconda3/lib/python3.6/subprocess.py\", line 418, in run\r\n    output=stdout, stderr=stderr)\r\nsubprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"main.py\", line 24, in <module>\r\n    from encoding.utils import *\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/encoding/__init__.py\", line 13, in <module>\r\n    from . import nn, functions, dilated, parallel, utils, models, datasets\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/encoding/nn/__init__.py\", line 12, in <module>\r\n    from .encoding import *\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/encoding/nn/encoding.py\", line 18, in <module>\r\n    from ..functions import scaled_l2, aggregate, pairwise_cosine\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/encoding/functions/__init__.py\", line 2, in <module>\r\n    from .encoding import *\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/encoding/functions/encoding.py\", line 14, in <module>\r\n    from .. import lib\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/encoding/lib/__init__.py\", line 15, in <module>\r\n    ], build_directory=cpu_path, verbose=False)\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py\", line 514, in load\r\n    with_cuda=with_cuda)\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py\", line 682, in _jit_compile\r\n    _build_extension_module(name, build_directory)\r\n  File \"/home/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py\", line 765, in _build_extension_module\r\n    name, error.output.decode()))\r\nRuntimeError: Error building extension 'enclib_cpu': [1/4] c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/home/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o\r\nFAILED: syncbn_cpu.o \r\nc++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/home/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o\r\n/home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp:1:26: fatal error: torch/tensor.h: No such file or directory\r\ncompilation terminated.\r\n[2/4] c++ -MMD -MF roi_align_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/home/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/roi_align_cpu.cpp -o roi_align_cpu.o\r\nFAILED: roi_align_cpu.o \r\nc++ -MMD -MF roi_align_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/home/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/roi_align_cpu.cpp -o roi_align_cpu.o\r\n/home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/roi_align_cpu.cpp:1:26: fatal error: torch/tensor.h: No such file or directory\r\ncompilation terminated.\r\n[3/4] c++ -MMD -MF nms_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/home/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/nms_cpu.cpp -o nms_cpu.o\r\nFAILED: nms_cpu.o \r\nc++ -MMD -MF nms_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/home/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/nms_cpu.cpp -o nms_cpu.o\r\n/home/anaconda3/lib/python3.6/site-packages/encoding/lib/cpu/nms_cpu.cpp:1:26: fatal error: torch/tensor.h: No such file or directory\r\ncompilation terminated.\r\nninja: build stopped: subcommand failed."},"comment":{"url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/issues/comments/438620395","html_url":"https://github.com/zhanghang1989/PyTorch-Encoding/issues/140#issuecomment-438620395","issue_url":"https://api.github.com/repos/zhanghang1989/PyTorch-Encoding/issues/140","id":438620395,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODYyMDM5NQ==","user":{"login":"LebML","id":23502786,"node_id":"MDQ6VXNlcjIzNTAyNzg2","avatar_url":"https://avatars0.githubusercontent.com/u/23502786?v=4","gravatar_id":"","url":"https://api.github.com/users/LebML","html_url":"https://github.com/LebML","followers_url":"https://api.github.com/users/LebML/followers","following_url":"https://api.github.com/users/LebML/following{/other_user}","gists_url":"https://api.github.com/users/LebML/gists{/gist_id}","starred_url":"https://api.github.com/users/LebML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LebML/subscriptions","organizations_url":"https://api.github.com/users/LebML/orgs","repos_url":"https://api.github.com/users/LebML/repos","events_url":"https://api.github.com/users/LebML/events{/privacy}","received_events_url":"https://api.github.com/users/LebML/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T10:50:09Z","updated_at":"2018-11-14T10:50:09Z","author_association":"NONE","body":"Thanks for the quick reply.\r\nUnfortunately the error message persists even after changing the name.\r\n(I changed pipPath/torch/lib/include/torch/torch.h to extension.h, where pipPath = folder that includes all pip installs).\r\n\r\nHeres the error message i get when running model/download_models.py. I will highlight the errors in bold:\r\n\r\n`/home/ev/.local/lib/python3.5/site-packages/torch/utils/cpp_extension.py:118: UserWarning: \r\n\r\n                               !! WARNING !!\r\n\r\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nYour compiler (c++) may be ABI-incompatible with PyTorch!\r\nPlease use a compiler that is ABI-compatible with GCC 4.9 and above.\r\nSee https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.\r\n\r\nSee https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6\r\nfor instructions on how to install GCC 4.9 or higher.\r\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n\r\n                              !! WARNING !!\r\n\r\n  warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))\r\nTraceback (most recent call last):\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/torch/utils/cpp_extension.py\", line 759, in _build_extension_module\r\n    ['ninja', '-v'], stderr=subprocess.STDOUT, cwd=build_directory)\r\n  File \"/usr/lib/python3.5/subprocess.py\", line 626, in check_output\r\n    **kwargs).stdout\r\n  File \"/usr/lib/python3.5/subprocess.py\", line 708, in run\r\n    output=stdout, stderr=stderr)\r\nsubprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"model/download_models.py\", line 1, in <module>\r\n    import encoding\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/encoding/__init__.py\", line 13, in <module>\r\n    from . import nn, functions, dilated, parallel, utils, models, datasets\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/encoding/nn/__init__.py\", line 12, in <module>\r\n    from .encoding import *\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/encoding/nn/encoding.py\", line 18, in <module>\r\n    from ..functions import scaled_l2, aggregate, pairwise_cosine\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/encoding/functions/__init__.py\", line 2, in <module>\r\n    from .encoding import *\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/encoding/functions/encoding.py\", line 14, in <module>\r\n    from .. import lib\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/encoding/lib/__init__.py\", line 15, in <module>\r\n    ], build_directory=cpu_path, verbose=False)\r\n  File \"/home/evangello/.local/lib/python3.5/site-packages/torch/utils/cpp_extension.py\", line 514, in load\r\n    with_cuda=with_cuda)\r\n  File \"/home/evangello/.local/lib/python3.5/site-packages/torch/utils/cpp_extension.py\", line 682, in _jit_compile\r\n    _build_extension_module(name, build_directory)\r\n  File \"/home/ev/.local/lib/python3.5/site-packages/torch/utils/cpp_extension.py\", line 765, in _build_extension_module\r\n    name, error.output.decode()))\r\nRuntimeError: Error building extension 'enclib_cpu': [1/4] c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/TH -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o\r\nFAILED: syncbn_cpu.o \r\nc++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/TH -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o\r\n/home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/syncbn_cpu.cpp:1:26: fatal error: torch/tensor.h: No such file or directory\r\ncompilation terminated.\r\n[2/4] c++ -MMD -MF roi_align_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/TH -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/roi_align_cpu.cpp -o roi_align_cpu.o\r\nFAILED: roi_align_cpu.o \r\nc++ -MMD -MF roi_align_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/TH -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/roi_align_cpu.cpp -o roi_align_cpu.o\r\n/home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/roi_align_cpu.cpp:1:26: fatal error: torch/tensor.h: No such file or directory\r\ncompilation terminated.\r\n[3/4] c++ -MMD -MF nms_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/TH -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/nms_cpu.cpp -o nms_cpu.o\r\nFAILED: nms_cpu.o \r\nc++ -MMD -MF nms_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/TH -I/home/ev/.local/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/include/python3.5m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/nms_cpu.cpp -o nms_cpu.o\r\n/home/ev/.local/lib/python3.5/site-packages/encoding/lib/cpu/nms_cpu.cpp:1:26: fatal error: torch/tensor.h: No such file or directory\r\ncompilation terminated.\r\nninja: build stopped: subcommand failed.\r\n`\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"LebML"}}