build error of paddle fluid_inference tag:v1.7.2
Created by: itslgl
编译 Linux 预测库报错,请帮忙看看什么问题,谢谢
1)PaddlePaddle版本:Paddle tag:v1.7.2 2)root@file:/data/share/user/eric/paddle# cat fluid/build/version.txt GIT COMMIT ID: 92cc33c0 WITH_MKL: OFF WITH_MKLDNN: OFF WITH_GPU: OFF
3)bash build.sh
PADDLE_ROOT=/data/share/user/eric/paddle/fluid/build/
cd Paddle
mkdir build
cd build
/data/share/user/eric/paddle/fluid/cmake/cmake-3.17.1-Linux-x86_64/bin/cmake -DFLUID_INFERENCE_INSTALL_DIR=$PADDLE_ROOT
-DCMAKE_BUILD_TYPE=Release
-DWITH_PYTHON=OFF
-DWITH_MKL=OFF
-DWITH_GPU=OFF
-DON_INFER=ON
..
make
make inference_lib_dist
4)get below build error [ 13%] Building CXX object paddle/fluid/framework/CMakeFiles/unused_var_check.dir/unused_var_check.cc.o /data/share/user/eric/paddle/Paddle/paddle/fluid/framework/unused_var_check.cc: In function ‘void paddle::framework::CheckUnusedVar(const paddle::framework::OperatorBase&, const paddle::framework::Scope&)’: /data/share/user/eric/paddle/Paddle/paddle/fluid/framework/unused_var_check.cc:88:57: error: converting to ‘std::unordered_set<std::basic_string >’ from initializer list would use explicit constructor ‘std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Value = std::basic_string; _Hash = std::hash<std::basic_string >; _Pred = std::equal_to<std::basic_string >; _Alloc = std::allocator<std::basic_string >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::hasher = std::hash<std::basic_string >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<std::basic_string >; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::allocator_type = std::allocator<std::basic_string >]’ std::unordered_setstd::string no_need_buffer_ins = {}; ^ paddle/fluid/framework/CMakeFiles/unused_var_check.dir/build.make:82: recipe for target 'paddle/fluid/framework/CMakeFiles/unused_var_check.dir/unused_var_check.cc.o' failed make[3]: *** [paddle/fluid/framework/CMakeFiles/unused_var_check.dir/unused_var_check.cc.o] Error 1 CMakeFiles/Makefile2:5945: recipe for target 'paddle/fluid/framework/CMakeFiles/unused_var_check.dir/all' failed make[2]: *** [paddle/fluid/framework/CMakeFiles/unused_var_check.dir/all] Error 2 CMakeFiles/Makefile2:2699: recipe for target 'CMakeFiles/inference_lib_dist.dir/rule' failed make[1]: *** [CMakeFiles/inference_lib_dist.dir/rule] Error 2 Makefile:392: recipe for target 'inference_lib_dist' failed make: *** [inference_lib_dist] Error 2