使用Docker编译源码生成Ubuntu的*whl包的时候,报错
Created by: yeyupiaoling
报错信息如下
root@ng9e65017-master-instance-6fs0oczg:~# cd /mnt/Paddle/
root@ng9e65017-master-instance-6fs0oczg:/mnt/Paddle# docker run -it -v $PWD:/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=OFF" -e "-DWITH_TESTING=OFF" paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5 bash -x /paddle/paddle/scripts/docker/build.sh
Unable to find image 'paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5' locally
cuda8.0_cudnn5: Pulling from paddlepaddle/paddle_manylinux_devel
b26de5a391ad: Pull complete
a860867675b2: Pull complete
2bb9cff4191c: Pull complete
3aba8ab86873: Pull complete
9049a3eb854a: Pull complete
2eeeee2cf356: Pull complete
94b0cc7a7f56: Pull complete
7a6ffb25b5c2: Pull complete
aae8a9571a10: Pull complete
98e38f3d9bd6: Pull complete
227600d15519: Pull complete
bfdc7823d165: Pull complete
981a5388ad80: Pull complete
3465c54c486b: Pull complete
43271940fb74: Pull complete
a96aedd5b88f: Pull complete
162390d278bf: Pull complete
487a7f044b26: Pull complete
Digest: sha256:22b4a3f34f46b645d624f30f9b12cbafc6ee517c784029d50eb26a68be502b16
Status: Downloaded newer image for paddlepaddle/paddle_manylinux_devel:cuda8.0_cudnn5
+ set -xe
+ cmake_gen ''
+ mkdir -p /paddle/build
+ cd /paddle/build
+ rm '*.deb'
+ true
+ rm -rf /paddle/paddle/dist
+ PYTHON_FLAGS=
+ '[' '' '!=' '' ']'
+ cat
========================================
Configuring cmake in /paddle/build ...
-DCMAKE_BUILD_TYPE=Release
-DWITH_DSO=ON
-DWITH_DOC=OFF
-DWITH_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
-DWITH_SWIG_PY=ON
-DCUDNN_ROOT=/usr/
-DWITH_STYLE_CHECK=ON
-DWITH_TESTING=ON
-DWITH_FAST_BUNDLE_TEST=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
========================================
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_DSO=ON -DWITH_DOC=OFF -DWITH_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_STYLE_CHECK=ON -DWITH_TESTING=ON -DWITH_FAST_BUNDLE_TEST=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-- Found Paddle host system: centos, version: 6.9
-- Found Paddle host system's CPU: 6 cores
-- The CXX compiler identification is GNU 4.8.2
-- The C compiler identification is GNU 4.8.2
-- Check for working CXX compiler: /opt/rh/devtoolset-2/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-2/root/usr/bin/c++ -- 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/rh/devtoolset-2/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-2/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
-- 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
-- Found Git: /usr/bin/git (found version "1.7.1")
-- 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 - Success
-- 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/mklml_lnx_2018.0.1.20171007/include, library: /paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libmklml_intel.so)
-- BLAS library: /paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/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/mklml_lnx_2018.0.1.20171007
-- MKLDNN library: /paddle/build/third_party/install/mkldnn/lib/libmkldnn.so
-- Found SWIG: /usr/local/bin/swig (found version "2.0.12")
-- warp-ctc library: /paddle/build/third_party/install/warpctc/lib/libwarpctc.so
-- Enable Intel OpenMP with /paddle/build/third_party/install/mklml/mklml_lnx_2018.0.1.20171007/lib/libiomp5.so
-- 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.11.1a1
-- Compile with MKLDNNMatrix
-- Compile with MKLDNNLayers and MKLDNNActivations
-- Compile with MKLPackedLayers
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__ftls_model_global_dynamic
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__ftls_model_global_dynamic - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_parentheses_equality
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_parentheses_equality - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_self_assign
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_self_assign - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_maybe_uninitialized
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_maybe_uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_missing_field_initializers
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_missing_field_initializers - Success
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 "GemmConvOpTest" in directory /paddle/paddle/function
linked by target "DepthwiseConvOpTest" in directory /paddle/paddle/function
linked by target "Im2ColTest" in directory /paddle/paddle/function
linked by target "test_StringUtils" in directory /paddle/paddle/utils/tests
linked by target "test_Thread" in directory /paddle/paddle/utils/tests
linked by target "test_Error" in directory /paddle/paddle/utils/tests
linked by target "test_CustomStackTracePrint" in directory /paddle/paddle/utils/tests
linked by target "test_CustomStackTrace" in directory /paddle/paddle/utils/tests
linked by target "test_ThreadBarrier" in directory /paddle/paddle/utils/tests
linked by target "test_SpinLock" in directory /paddle/paddle/utils/tests
linked by target "test_SIMDFlags" in directory /paddle/paddle/utils/tests
linked by target "test_CpuGpuVector" in directory /paddle/paddle/math/tests
linked by target "test_Matrix" in directory /paddle/paddle/math/tests
linked by target "test_sparseMatrixCompare" in directory /paddle/paddle/math/tests
linked by target "test_matrixCompare" in directory /paddle/paddle/math/tests
linked by target "test_perturbation" in directory /paddle/paddle/math/tests
linked by target "test_TrainingAlgorithm" in directory /paddle/paddle/math/tests
linked by target "test_SIMDFunctions" in directory /paddle/paddle/math/tests
linked by target "test_RowBuffer" in directory /paddle/paddle/math/tests
linked by target "test_SparseMatrix" in directory /paddle/paddle/math/tests
linked by target "test_ExecViaCpu" in directory /paddle/paddle/math/tests
linked by target "test_BaseMatrix" in directory /paddle/paddle/math/tests
linked by target "test_Allocator" in directory /paddle/paddle/math/tests
linked by target "test_FPException" in directory /paddle/paddle/math/tests
linked by target "test_Tensor" in directory /paddle/paddle/math/tests
linked by target "test_lazyAssign" in directory /paddle/paddle/math/tests
linked by target "test_GpuProfiler" in directory /paddle/paddle/math/tests
linked by target "test_CompareSparse" in directory /paddle/paddle/gserver/tests
linked by target "test_CRFLayerGrad" in directory /paddle/paddle/gserver/tests
linked by target "test_LayerGrad" in directory /paddle/paddle/gserver/tests
linked by target "test_ConvTrans" in directory /paddle/paddle/gserver/tests
linked by target "test_PriorBox" in directory /paddle/paddle/gserver/tests
linked by target "test_RecurrentGradientMachine" in directory /paddle/paddle/gserver/tests
linked by target "test_MultinomialSampler" in directory /paddle/paddle/gserver/tests
linked by target "test_LinearChainCRF" in directory /paddle/paddle/gserver/tests
linked by target "test_ActivationGrad" in directory /paddle/paddle/gserver/tests
linked by target "test_RecurrentLayer" in directory /paddle/paddle/gserver/tests
linked by target "test_DetectionOutput" in directory /paddle/paddle/gserver/tests
linked by target "test_ConvUnify" in directory /paddle/paddle/gserver/tests
linked by target "test_NetworkCompare" in directory /paddle/paddle/gserver/tests
linked by target "test_MKLDNN" in directory /paddle/paddle/gserver/tests
linked by target "test_WarpCTCLayer" in directory /paddle/paddle/gserver/tests
linked by target "test_Evaluator" in directory /paddle/paddle/gserver/tests
linked by target "test_BatchNorm" in directory /paddle/paddle/gserver/tests
linked by target "test_CrossEntropyOverBeamGrad" in directory /paddle/paddle/gserver/tests
linked by target "test_KmaxSeqScore" in directory /paddle/paddle/gserver/tests
linked by target "test_Expand" in directory /paddle/paddle/gserver/tests
linked by target "test_MaxPoolingWithMaskOutput" in directory /paddle/paddle/gserver/tests
linked by target "test_PyDataProvider2" in directory /paddle/paddle/gserver/tests
linked by target "test_PyDataProvider" in directory /paddle/paddle/gserver/tests
linked by target "test_SeqSliceLayerGrad" in directory /paddle/paddle/gserver/tests
linked by target "test_CompareTwoNets" in directory /paddle/paddle/gserver/tests
linked by target "test_argument" in directory /paddle/paddle/parameter/tests
linked by target "test_common" in directory /paddle/paddle/parameter/tests
linked by target "paddle_pserver_main" in directory /paddle/paddle/pserver
linked by target "socket_test" in directory /paddle/paddle/pserver/test
linked by target "test_ParameterServer2" in directory /paddle/paddle/pserver/test
linked by target "test_ProtoServer" in directory /paddle/paddle/pserver/test
linked by target "paddle_trainer" in directory /paddle/paddle/trainer
linked by target "paddle_merge_model" in directory /paddle/paddle/trainer
linked by target "test_PyDataProviderWrapper" in directory /paddle/paddle/trainer/tests
linked by target "test_Trainer" in directory /paddle/paddle/trainer/tests
linked by target "test_Compare" in directory /paddle/paddle/trainer/tests
linked by target "test_TrainerOnePass" in directory /paddle/paddle/trainer/tests
linked by target "test_recurrent_machine_generation" in directory /paddle/paddle/trainer/tests
linked by target "_swig_paddle" in directory /paddle/paddle/api
linked by target "protobuf_equal" in directory /paddle/python/paddle/trainer_config_helpers/tests
-- Configuring incomplete, errors occurred!
See also "/paddle/build/CMakeFiles/CMakeOutput.log".
See also "/paddle/build/CMakeFiles/CMakeError.log".
在错误日志CMakeError.log
信息如下:
Determining if the pthread_create exist failed with the following output:
Change Dir: /paddle/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_ea34e/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_ea34e.dir/build.make CMakeFiles/cmTC_ea34e.dir/build
gmake[1]: Entering directory `/paddle/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ea34e.dir/CheckSymbolExists.c.o
/opt/rh/devtoolset-2/root/usr/bin/cc -fPIC -o CMakeFiles/cmTC_ea34e.dir/CheckSymbolExists.c.o -c /paddle/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_ea34e
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ea34e.dir/link.txt --verbose=1
/opt/rh/devtoolset-2/root/usr/bin/cc -fPIC CMakeFiles/cmTC_ea34e.dir/CheckSymbolExists.c.o -o cmTC_ea34e -rdynamic
CMakeFiles/cmTC_ea34e.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTC_ea34e] Error 1
gmake[1]: Leaving directory `/paddle/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_ea34e/fast] Error 2
File /paddle/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output: