Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

building encounter CMake Error on MAC: variables are set to NOTFOUND

Open brandonsj opened this issue 8 years ago • 2 comments

Hi buddy I encounter this problem while installing paddle on MAC OS I use pre-compiled paddle's image on docker

my input command is:

docker run -it -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 bash -x /paddle/paddle/scripts/paddle_build.sh build

screen log is:

+ main build
+ set -e
+ local CMD=build
+ init
+ RED='\033[0;31m'
+ BLUE='\033[0;34m'
+ BOLD='\033[1m'
+ NONE='\033[0m'
+++ dirname /paddle/paddle/scripts/paddle_build.sh
++ cd /paddle/paddle/scripts/../../
++ pwd
+ PADDLE_ROOT=/paddle
+ '[' -z '' ']'
+ SCRIPT_NAME=/paddle/paddle/scripts/paddle_build.sh
+ case $CMD in
+ cmake_gen ''
+ mkdir -p /paddle/build
+ cd /paddle/build
+ rm '*.deb'
+ true
+ rm -rf python/dist
+ PYTHON_FLAGS=
+ '[' '' '!=' '' ']'
+ cat
    ========================================
    Configuring cmake in /paddle/build ...
        -DCMAKE_BUILD_TYPE=Release
        
        -DWITH_DSO=ON
        -DWITH_DOC=OFF
        -DWITH_GPU=OFF
        -DWITH_AMD_GPU=OFF
        -DWITH_DISTRIBUTE=OFF
        -DWITH_MKL=ON
        -DWITH_AVX=OFF
        -DWITH_GOLANG=OFF
        -DCUDA_ARCH_NAME=All
        -DWITH_C_API=OFF
        -DWITH_PYTHON=ON
        -DWITH_SWIG_PY=ON
        -DCUDNN_ROOT=/usr/
        -DWITH_TESTING=OFF
        -DWITH_FAST_BUNDLE_TEST=ON
        -DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
        -DWITH_FLUID_ONLY=OFF
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
        -DWITH_CONTRIB=ON
        -DWITH_ANAKIN=OFF
        -DWITH_INFERENCE_DEMO=ON
    ========================================
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_DSO=ON -DWITH_DOC=OFF -DWITH_GPU=OFF -DWITH_AMD_GPU=OFF -DWITH_DISTRIBUTE=OFF -DWITH_MKL=ON -DWITH_AVX=OFF -DWITH_GOLANG=OFF -DCUDA_ARCH_NAME=All -DWITH_SWIG_PY=ON -DWITH_C_API=OFF -DWITH_PYTHON=ON -DCUDNN_ROOT=/usr/ -DWITH_TESTING=OFF -DWITH_FAST_BUNDLE_TEST=ON -DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake -DWITH_FLUID_ONLY=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_CONTRIB=ON -DWITH_ANAKIN=OFF -DWITH_INFERENCE_DEMO=ON
-- Found Paddle host system: centos, version: 6.9
-- Found Paddle host system's CPU: 2 cores
-- CXX compiler: /opt/rh/devtoolset-2/root/usr/bin/c++, version: GNU 4.8.2
-- C compiler: /opt/rh/devtoolset-2/root/usr/bin/cc, version: GNU 4.8.2
-- MKLML_VER: mklml_lnx_2018.0.3.20180406, MKLML_URL: http://paddlepaddledeps.cdn.bcebos.com/mklml_lnx_2018.0.3.20180406.tgz
-- Protobuf protoc executable: /paddle/build/third_party/install/protobuf/bin/protoc
-- Protobuf library: /paddle/build/third_party/install/protobuf/lib/libprotobuf.a
-- Protobuf version: 3.1
-- Could NOT find PythonInterp: Found unsuitable version "2.6.6", but required is at least "2.7" (found /usr/bin/python2)
-- Could NOT find PythonLibs (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.7")
-- Found cblas and lapack in MKLML (include: /paddle/build/third_party/install/mklml/include, library: /paddle/build/third_party/install/mklml/lib/libmklml_intel.so)
-- BLAS library: /paddle/build/third_party/install/mklml/lib/libmklml_intel.so
-- Set /paddle/build/third_party/install/mkldnn/lib to runtime path
-- Build MKLDNN with MKLML /paddle/build/third_party/install/mklml
-- MKLDNN library: /paddle/build/third_party/install/mkldnn/lib/libmkldnn.so
-- warp-ctc library: /paddle/build/third_party/install/warpctc/lib/libwarpctc.so
-- BOOST_TAR: boost_1_41_0, BOOST_URL: http://paddlepaddledeps.cdn.bcebos.com/boost_1_41_0.tar.gz
-- Enable Intel OpenMP with /paddle/build/third_party/install/mklml/lib/libiomp5.so
-- Paddle version is 0.12.0
-- installing contrib
-- Compile with MKLDNNMatrix
-- Compile with MKLDNNLayers and MKLDNNActivations
-- Compile with MKLPackedLayers
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY (ADVANCED)
    linked by target "paddle_pserver_main" in directory /paddle/paddle/legacy/pserver
    linked by target "paddle_trainer" in directory /paddle/paddle/legacy/trainer
    linked by target "paddle_merge_model" in directory /paddle/paddle/legacy/trainer
    linked by target "_swig_paddle" in directory /paddle/paddle/legacy/api

-- Configuring incomplete, errors occurred!
See also "/paddle/build/CMakeFiles/CMakeOutput.log".
See also "/paddle/build/CMakeFiles/CMakeError.log".

Thanks for help.

brandonsj avatar Jul 09 '18 11:07 brandonsj

如果只编译fluid版本,可以在docker命令里再加一个编译选项: -e "WITH_GPU=OFF" -e "WITH_TESTING=OFF" -e "WITH_FLUID_ONLY=ON"

luotao1 avatar Jul 09 '18 11:07 luotao1

Hello, this issue has not been updated in the past month. we will close it today for the sake of other user’s experience. If you still need to follow up on this question after closing, please feel free to reopen it. In that case, we will get back to you within 24 hours. We apologize for the inconvenience caused by the closure and thank you so much for your support of PaddlePaddle Group!

lucywsq avatar Oct 10 '18 08:10 lucywsq