Can't build Paddle on Ubuntu 18.04 - warnings are being treated as errors
Created by: ddokupil
When trying to build paddle on Ubuntu 18.04 with gcc 7.5 make terminates due to -Werrors. Relevant part of logs pasted below. Full log attached.
/repos/paddle_paddle/paddle/fluid/operators/op_debug_string_test.cc:42:35: required from here /repos/paddle_paddle/build/third_party/boost/src/extern_boost/boost/variant/variant.hpp:1294:38: error: the compiler can assume that the address of 'operand' will never be NULL [-Werror=address] initializer::initialize( ~~~~~~~~~~~~~~~~~~~~~~~^ storage_.address() ~~~~~~~~~~~~~~~~~~ , operand ~~~~~~~~~ ) ~ [ 41%] Linking CXX static library libpass_builder.a [ 41%] Built target pass_builder Scanning dependencies of target memory_reuse_pass [ 41%] Building CXX object paddle/fluid/framework/ir/memory_optimize_pass/CMakeFiles/memory_reuse_pass.dir/memory_reuse_pass.cc.o /repos/paddle_paddle/build/third_party/boost/src/extern_boost/boost/variant/variant.hpp: In member function 'void boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::convert_construct(T&, int, mpl_::false_) [with T = const char [1]; T0_ = boost::blank; T1 = int; T2 = float; T3 = std::cxx11::basic_string; T4 = std::vector; T5 = std::vector; T6 = std::vector<std::cxx11::basic_string >; T7 = bool; T8 = std::vector; T9 = paddle::framework::BlockDesc*; T10 = long int; T11 = std::vectorpaddle::framework::BlockDesc*; T12 = std::vector; T13 = boost::detail::variant::void; T14 = boost::detail::variant::void; T15 = boost::detail::variant::void_; T16 = boost::detail::variant::void_; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_]': /repos/paddle_paddle/build/third_party/boost/src/extern_boost/boost/variant/variant.hpp:1293:23: error: nonnull argument 'operand' compared to NULL [-Werror=nonnull-compare] indicate_which( ~~~~~~~~~~~~~~^ initializer::initialize( ~~~~~~~~~~~~~~~~~~~~~~~~ storage_.address() ~~~~~~~~~~~~~~~~~~ , operand ~~~~~~~~~ ) ~ ); build_ubuntu-18_04_mkldnn.log.txt