编译遇到问题 找不到 UINT64_MAX
cmake 选项
cmake ..
-DWITH_GPU=OFF
-DCMAKE_INSTALL_PREFIX=/home/lizhipeng/tools/paddle
-DWITH_C_API=ON
错误信息: -- extern_gflags configure command succeeded. See also /home/lizhipeng/tools/paddle/Paddle/build/third_party/gflags/src/extern_gflags-stamp/extern_gflags-configure-.log [ 1%] Performing build step for 'extern_gflags' Scanning dependencies of target gflags_static [ 12%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags.cc.o [ 25%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags_reporting.cc.o [ 37%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags_completions.cc.o [ 50%] Linking CXX static library lib/libgflags.a [ 50%] Built target gflags_static Scanning dependencies of target gflags_nothreads_static [ 62%] Building CXX object CMakeFiles/gflags_nothreads_static.dir/src/gflags.cc.o [ 75%] Building CXX object CMakeFiles/gflags_nothreads_static.dir/src/gflags_reporting.cc.o [ 87%] Building CXX object CMakeFiles/gflags_nothreads_static.dir/src/gflags_completions.cc.o [100%] Linking CXX static library lib/libgflags_nothreads.a [100%] Built target gflags_nothreads_static [ 7%] Built target extern_lib_any [ 7%] Built target cblas [ 8%] Built target extern_warpctc [ 9%] Built target extern_pybind [ 9%] Generating ../../paddle/python/paddle/proto/TrainerConfig_pb2.py [ 9%] Generating ../../paddle/python/paddle/proto/ParameterService_pb2.py [ 9%] Generating ../../paddle/python/paddle/proto/ParameterServerConfig_pb2.py [ 9%] Generating ../../paddle/python/paddle/proto/ParameterConfig_pb2.py [ 9%] Generating ../../paddle/python/paddle/proto/OptimizerConfig_pb2.py [ 9%] Generating ../../paddle/python/paddle/proto/ModelConfig_pb2.py [ 9%] Generating ../../paddle/python/paddle/proto/DataFormat_pb2.py [ 10%] Generating ../../paddle/python/paddle/proto/DataConfig_pb2.py [ 10%] Built target gen_proto_py [ 12%] Built target paddle_proto [ 12%] Built target serialization_test [ 13%] Built target paddle_optimizer [ 14%] Built target parameter_optimizer_test [ 14%] Built target paddle_cuda [ 15%] Built target paddle_trainer_lib [ 17%] Built target paddle_function [ 18%] Built target paddle_utils [ 19%] Built target paddle_math [ 19%] Building CXX object paddle/gserver/CMakeFiles/paddle_gserver.dir/dataproviders/PyDataProvider2.cpp.o In file included from /home/lizhipeng/tools/paddle/Paddle/paddle/gserver/dataproviders/PyDataProvider2.cpp:30:0: /home/lizhipeng/tools/paddle/Paddle/paddle/utils/Stat.h: In constructor ‘paddle::StatInfo::StatInfo(paddle::Stat)’:) /home/lizhipeng/tools/paddle/Paddle/paddle/utils/Stat.h:41:12: error: ‘UINT64_MAX’ was not declared in this scopeco min_ = UINT64_MAX; ^ /home/lizhipeng/tools/paddle/Paddle/paddle/utils/Stat.h: In member function ‘void paddle::StatInfo::reset()’:() /home/lizhipeng/tools/paddle/Paddle/paddle/utils/Stat.h:48:12: error: ‘UINT64_MAX’ was not declared in this scopeco min_ = UINT64_MAX; ^ /home/lizhipeng/tools/paddle/Paddle/paddle/gserver/dataproviders/PyDataProvider2.cpp: In member function ‘virtual bool paddle::CacheOnePassInMemory::reset()’:() /home/lizhipeng/tools/paddle/Paddle/paddle/gserver/dataproviders/PyDataProvider2.cpp:1003:3: error: control reaches end of non-void function [-Werror=return-type] } ^ /home/lizhipeng/tools/paddle/Paddle/paddle/gserver/dataproviders/PyDataProvider2.cpp: In static member function ‘static paddle::IPyDataProviderCache paddle::IPyDataProviderCache::create(padd dle::CacheType)’:e /home/lizhipeng/tools/paddle/Paddle/paddle/gserver/dataproviders/PyDataProvider2.cpp:1030:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1plus: all warnings being treated as errors make64[2]: *** [paddle/gserver/CMakeFiles/paddle_gserver.dir/dataproviders/PyDataProvider2.cpp.o] Error 1 make64[1]: *** [paddle/gserver/CMakeFiles/paddle_gserver.dir/all] Error 2 make64: *** [all] Error 2
-DWITH_C_API=ON开启的时候请关闭-DWITH_PYTHON 和 -DWITH_SWIG_PY
@typhoonzero 需要在安装文档中说明一下么?
@luotao1 是有必要,先保持这个issue open后续fix文档之后关闭~
@luotao1 @typhoonzero
cmake 选项更改之后,依然出现问题
cmake
cmake ..
-DWITH_GPU=OFF
-DCMAKE_INSTALL_PREFIX=/home/lizhipeng/tools/paddlei.c_api
-DWITH_C_API=ON
-DWITH_PYTHON=OFF
-DWITH_SWIG=OFF
错误信息: -- Found Paddle host system: centos, version: 6.3 -- Found Paddle host system's CPU: 8 cores -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) Boost found. -- Do not have AVX2 intrinsics and disabled MKL-DNN -- Protobuf protoc executable: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/protobuf/bin/protoc -- Protobuf library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/protobuf/lib/libprotobuf.a -- Protobuf version: 3.1 -- Found cblas and lapack in MKLML (include: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/include, library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libmklml_intel.so) -- BLAS library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libmklml_intel.so -- warp-ctc library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/warpctc/lib/libwarpctc.so -- Enable Intel OpenMP with /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libiomp5.so -- Paddle version is 0.10.0 -- Skip compiling with MKLDNNMatrix -- Skip compiling with MKLDNNLayers and MKLDNNActivations -- generating grpc send_recv.proto -- Configuring done -- Generating done -- Build files have been written to: /home/lizhipeng/tools/paddle.c_api/Paddle/build (paddle.c_api) [lizhipeng@cp01-lizhipeng02-linux build]$ ls CMakeCache.txt CPackConfig.cmake Makefile cmake_command.sh paddle third_party CMakeFiles CPackSourceConfig.cmake cblas_dummy.c cmake_install.cmake proto (paddle.c_api) [lizhipeng@cp01-lizhipeng02-linux build]$ mv cmake_command.sh ../ (paddle.c_api) [lizhipeng@cp01-lizhipeng02-linux build]$ rm -rf * (paddle.c_api) [lizhipeng@cp01-lizhipeng02-linux build]$ mv ../cmake_command.sh ./ (paddle.c_api) [lizhipeng@cp01-lizhipeng02-linux build]$ sh cmake_command.sh -- Found Paddle host system: centos, version: 6.3 -- Found Paddle host system's CPU: 8 cores -- The CXX compiler identification is GNU 4.8.2 -- The C compiler identification is GNU 4.8.2 -- The Golang compiler identification is go1.1.2 linux/amd64 -- Check for working Golang compiler: /usr/bin/go -- Check for working CXX compiler: /opt/compiler/gcc-4.8.2/bin/g++ -- Check for working CXX compiler: /opt/compiler/gcc-4.8.2/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: /opt/compiler/gcc-4.8.2/bin/gcc -- Check for working C compiler: /opt/compiler/gcc-4.8.2/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE) -- Found Git: /usr/bin/git (found version "1.7.1") -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE Boost found. -- Performing Test MMX_FOUND -- Performing Test MMX_FOUND - Success -- Performing Test SSE2_FOUND -- Performing Test SSE2_FOUND - Success -- Performing Test SSE3_FOUND -- Performing Test SSE3_FOUND - Success -- Performing Test AVX_FOUND -- Performing Test AVX_FOUND - Success -- Performing Test AVX2_FOUND -- Performing Test AVX2_FOUND - Failed -- Do not have AVX2 intrinsics and disabled MKL-DNN -- Protobuf protoc executable: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/protobuf/bin/protoc -- Protobuf library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/protobuf/lib/libprotobuf.a -- Protobuf version: 3.1 -- Found cblas and lapack in MKLML (include: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/include, library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libmklml_intel.so) -- BLAS library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libmklml_intel.so -- Found SWIG: /home/lizhipeng/local_install/bin/swig (found version "3.0.12") -- warp-ctc library: /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/warpctc/lib/libwarpctc.so -- Enable Intel OpenMP with /home/lizhipeng/tools/paddle.c_api/Paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libiomp5.so -- Looking for UINT64_MAX -- Looking for UINT64_MAX - not found -- Looking for UINT64_MAX -- Looking for UINT64_MAX - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of pthread_spinlock_t -- Check size of pthread_spinlock_t - done -- Check size of pthread_barrier_t -- Check size of pthread_barrier_t - done -- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC -- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__fPIC -- Performing Test CXX_COMPILER_SUPPORT_FLAG__fPIC - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer -- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer -- Performing Test CXX_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wall -- Performing Test C_COMPILER_SUPPORT_FLAG__Wall - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wall -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wall - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wextra -- Performing Test C_COMPILER_SUPPORT_FLAG__Wextra - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wextra -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wextra - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Werror -- Performing Test C_COMPILER_SUPPORT_FLAG__Werror - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Werror -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Werror - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor -- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Failed -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor -- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Failed -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_parameter -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_function -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality - Failed -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality - Failed -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes - Failed -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes - Failed -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_terminate -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_terminate - Failed -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_terminate -- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_terminate - Failed -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_function - Success -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds -- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_array_bounds - Success -- Paddle version is 0.10.0 -- Skip compiling with MKLDNNMatrix -- Skip compiling with MKLDNNLayers and MKLDNNActivations -- generating grpc send_recv.proto CMake Error at /home/lizhipeng/local_install/share/cmake-3.6/Modules/ExternalProject.cmake:1083 (file): file problem creating directory: /pip/src/pip-stamp Call Stack (most recent call first): /home/lizhipeng/local_install/share/cmake-3.6/Modules/ExternalProject.cmake:2425 (_ep_set_directories) paddle/api/CMakeLists.txt:96 (ExternalProject_Add)
CMake Error at /home/lizhipeng/local_install/share/cmake-3.6/Modules/ExternalProject.cmake:1085 (message): dir '/pip/src/pip-stamp' does not exist after file(MAKE_DIRECTORY) Call Stack (most recent call first): /home/lizhipeng/local_install/share/cmake-3.6/Modules/ExternalProject.cmake:2425 (_ep_set_directories) paddle/api/CMakeLists.txt:96 (ExternalProject_Add)
-- Configuring incomplete, errors occurred! See also "/home/lizhipeng/tools/paddle.c_api/Paddle/build/CMakeFiles/CMakeOutput.log". See also "/home/lizhipeng/tools/paddle.c_api/Paddle/build/CMakeFiles/CMakeError.log".
应该是cmake没有找到pip,尝试安装pip时创建目录失败
删掉build目录重新cmake下,cmake会cache上一次执行的结果
第二个参数是:-DWITH_SWIG_PY
该issue长期没有更新,暂时先关闭了,如果需继续讨论再打开