summaryrefslogtreecommitdiff
path: root/caffe2
diff options
context:
space:
mode:
authorSam Leeman-Munk <sam.leeman-munk@sas.com>2019-04-19 21:35:35 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-04-19 21:41:36 -0700
commit9f4f7e16216ba1dfc50d2663e2e60d881ff57301 (patch)
tree38cc254c856ed4c9d91751f6d15e7d2daf9e6e0b /caffe2
parentd17c22d024467b7185e33c4652b44739f67965be (diff)
downloadpytorch-9f4f7e16216ba1dfc50d2663e2e60d881ff57301.tar.gz
pytorch-9f4f7e16216ba1dfc50d2663e2e60d881ff57301.tar.bz2
pytorch-9f4f7e16216ba1dfc50d2663e2e60d881ff57301.zip
Support compilation on gcc-7.4.0 (#19470)
Summary: There are two corrections in this pull request. The first is specific to gcc-7.4.0. compiled with -std=c++14 gcc-7.4.0 has __cplusplus = 201402L This does not meet the check set in Deprecated.h, which asks for >201402L. The compiler goes down to the __GNUC__ check, which passes and sets C10_DEPRECATED_MESSAGE to a value that c++14 does not appear to support or even recognize, leading to a compile time error. My recommended solution, which worked for my case, was to change the = into a >= The second correction comes in response to this error: caffe2/operators/crash_op.cc: In member function ‘virtual bool caffe2::CrashOp::RunOnDevice()’: caffe2/operators/crash_op.cc:14:11: error: ‘SIGABRT’ was not declared in this scope I am merely committing to the repository the solution suggested here (which worked for me) https://discuss.pytorch.org/t/building-pytorch-from-source-in-conda-fails-in-pytorch-caffe2-operators-crash-op-cc/42859 Pull Request resolved: https://github.com/pytorch/pytorch/pull/19470 Differential Revision: D15019529 Pulled By: ailzhang fbshipit-source-id: 9ce9d713c860ee5fd4266e5c2a7f336a97d7a90d
Diffstat (limited to 'caffe2')
-rw-r--r--caffe2/operators/crash_op.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/caffe2/operators/crash_op.cc b/caffe2/operators/crash_op.cc
index a7bb9b1f84..70ef069cfd 100644
--- a/caffe2/operators/crash_op.cc
+++ b/caffe2/operators/crash_op.cc
@@ -2,6 +2,7 @@
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
+#include <csignal>
namespace caffe2 {