Skip to content

[layers] Layers branch building fails due to CPP extensions #534

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

Closed
tonyf opened this issue Jun 22, 2018 · 2 comments
Closed

[layers] Layers branch building fails due to CPP extensions #534

tonyf opened this issue Jun 22, 2018 · 2 comments

Comments

@tonyf
Copy link

tonyf commented Jun 22, 2018

Building the layers branch is failing.

building 'torchvision._C' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/home/tonyfrancisv/vision/torchvision/csrc -I/home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include -I/home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/TH -I/home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.5m -I/home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/include/python3.5m -c /home/tonyfrancisv/vision/torchvision/csrc/vision.cpp -o build/temp.linux-x86_64-3.5/home/tonyfrancisv/vision/torchvision/csrc/vision.o -DTORCH_EXTENSION_NAME=torchvision.C -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/pybind11/pytypes.h:12:0,
from /home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/pybind11/cast.h:13,
from /home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/pybind11/attr.h:13,
from /home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/pybind11/pybind11.h:43,
from /home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/torch/torch.h:6,
from /home/tonyfrancisv/vision/torchvision/csrc/cpu/vision.h:2,
from /home/tonyfrancisv/vision/torchvision/csrc/nms.h:2,
from /home/tonyfrancisv/vision/torchvision/csrc/vision.cpp:1:
:0:33: error: expected initializer before ‘.’ token
/home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/pybind11/detail/common.h:212:47: note: in definition of macro ‘PYBIND11_CONCAT’
#define PYBIND11_CONCAT(first, second) first##second
^
/home/tonyfrancisv/vision/torchvision/csrc/vision.cpp:6:1: note: in expansion of macro ‘PYBIND11_MODULE’
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
^
/home/tonyfrancisv/vision/torchvision/csrc/vision.cpp:6:17: note: in expansion of macro ‘TORCH_EXTENSION_NAME’
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
^
:0:33: error: expected initializer before ‘.’ token
/home/tonyfrancisv/.local/share/virtualenvs/vision-SNqDYWG8/lib/python3.5/site-packages/torch/lib/include/pybind11/detail/common.h:171:51: note: in definition of macro ‘PYBIND11_PLUGIN_IMPL’
extern "C" PYBIND11_EXPORT PyObject *PyInit
##name()
^
/home/tonyfrancisv/vision/torchvision/csrc/vision.cpp:6:1: note: in expansion of macro ‘PYBIND11_MODULE’
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
^
/home/tonyfrancisv/vision/torchvision/csrc/vision.cpp:6:17: note: in expansion of macro ‘TORCH_EXTENSION_NAME’
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@ahirner
Copy link

ahirner commented Jul 2, 2018

This is related to a PYBIND11_MODULE issue, fixed in pytorch master.
FWIW, the current layer branch compiled for me after #540.

@fmassa
Copy link
Member

fmassa commented Jul 3, 2018

Closing after #540
Note that you might need PyTorch compiled from master

@fmassa fmassa closed this as completed Jul 3, 2018
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

3 participants