SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
757 stars 271 forks source link

python setup.py install fails #106

Closed swethmandava closed 5 years ago

swethmandava commented 5 years ago

I'm trying to install warpctc on a docker container but it fails on python setup.py install. when I try to do it on my system, it works. Both have python3.6, cuda 10, GNU 5.4.0. The only difference I can find, if at all is that docker container has pytorch1.0.0a0 ( https://docs.nvidia.com/deeplearning/dgx/pytorch-release-notes/rel_18.11.html#rel_18.11) and my system has pytorch1.0.0.

Is this is a pytorch/sourcing issue?

gcc -pthread -B /opt/conda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/workspace/speech_recognition/warp-ctc/include -I/opt/conda/lib/python3.6/site-packages/torch/lib/include -I/opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/opt/conda/lib/python3.6/site-packages/torch/lib/include/TH -I/opt/conda/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/opt/conda/include/python3.6m -c src/binding.cpp -o build/temp.linux-x86_64-3.6/src/binding.o -std=c++11 -fPIC -DWARPCTC_ENABLE_GPU -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_warp_ctc cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/binding.cpp:19:13: error: ‘Tensor’ is not a member of ‘torch’ int cpu_ctc(torch::Tensor probs, ^ src/binding.cpp:19:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:20:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor grads, ^ src/binding.cpp:20:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:21:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor labels, ^ src/binding.cpp:21:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:22:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor label_sizes, ^ src/binding.cpp:22:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:23:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor sizes, ^ src/binding.cpp:23:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:24:13: error: expected primary-expression before ‘int’ int minibatch_size, ^ src/binding.cpp:25:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor costs, ^ src/binding.cpp:25:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:26:13: error: expected primary-expression before ‘int’ int blank_label) ^ src/binding.cpp:26:28: error: expression list treated as compound expression in initializer [-fpermissive] int blank_label) ^ src/binding.cpp:27:1: error: expected ‘,’ or ‘;’ before ‘{’ token { ^ src/binding.cpp:66:13: error: ‘Tensor’ is not a member of ‘torch’ int gpu_ctc(torch::Tensor probs, ^ src/binding.cpp:66:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:67:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor grads, ^ src/binding.cpp:67:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:68:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor labels, ^ src/binding.cpp:68:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:69:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor label_sizes, ^ src/binding.cpp:69:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:70:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor sizes, ^ src/binding.cpp:70:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:71:13: error: expected primary-expression before ‘int’ int minibatch_size, ^ src/binding.cpp:72:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor costs, ^ src/binding.cpp:72:13: note: suggested alternatives: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:610:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/Type.h:8, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Type.h:2, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:7, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^ src/binding.cpp:73:13: error: expected primary-expression before ‘int’ int blank_label) ^ src/binding.cpp:73:28: error: expression list treated as compound expression in initializer [-fpermissive] int blank_label) ^ src/binding.cpp:74:1: error: expected ‘,’ or ‘;’ before ‘{’ token { ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h: In instantiation of ‘pybind11::module& pybind11::module::def(const char*, Func&&, const Extra& ...) [with Func = int*; Extra = {char [27]}]’: src/binding.cpp:109:58: required from here /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: error: no matching function for call to ‘pybind11::cpp_function::cpp_function(int*, pybind11::name, pybind11::scope, pybind11::sibling, const char [27])’ sibling(getattr(*this, name_, none())), extra...); ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:79:5: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...) const, const Extra& ...) cpp_function(Return (Class::*f)(Arg...) const, const Extra&... extra) { ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:79:5: note: template argument deduction/substitution failed: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: note: mismatched types ‘Return (Class::*)(Arg ...) const’ and ‘int*’ sibling(getattr(*this, name_, none())), extra...); ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:72:5: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...), const Extra& ...) cpp_function(Return (Class::*f)(Arg...), const Extra&... extra) { ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:72:5: note: template argument deduction/substitution failed: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: note: mismatched types ‘Return (Class::*)(Arg ...)’ and ‘int*’ sibling(getattr(*this, name_, none())), extra...); ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:65:5: note: candidate: template<class Func, class ... Extra, class> pybind11::cpp_function::cpp_function(Func&&, const Extra& ...) cpp_function(Func &&f, const Extra&... extra) { ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:65:5: note: template argument deduction/substitution failed: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:58:5: note: candidate: template<class Return, class ... Args, class ... Extra> pybind11::cpp_function::cpp_function(Return (*)(Args ...), const Extra& ...) cpp_function(Return (*f)(Args...), const Extra&... extra) { ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:58:5: note: template argument deduction/substitution failed: In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: note: mismatched types ‘Return(Args ...)’ and ‘int’ sibling(getattr(*this, name_, none())), extra...); ^ In file included from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /opt/conda/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:54:5: note: candidate: pybind11::cpp_function::cpp_function(std::nullptr_t) cpp_function(std::nullptr_t) { } ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:54:5: note: candidate expects 1 argument, 5 provided /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:53:5: note: candidate: pybind11::cpp_function::cpp_function() cpp_function() { } ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:53:5: note: candidate expects 0 arguments, 5 provided /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(const pybind11::cpp_function&) class cpp_function : public function { ^ /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate expects 1 argument, 5 provided /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(pybind11::cpp_function&&) /opt/conda/lib/python3.6/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate expects 1 argument, 5 provided error: command 'gcc' failed with exit status 1

swethmandava commented 5 years ago

It seems to be a pytorch issue. Installing 1.0.0 makes it work in the container as well