Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

内部一键编译版本,安装报错

Open HugoLian opened this issue 9 years ago • 5 comments

问题不太好描述,我直接把报错信息贴出来吧,请各位大神帮我看一下吧:

【重要说明:这个版本的paddle我之前安装了两台机器,都没问题,新换了一台机器报这个错误,有人说把gcc换成~/.jumbo的gcc,更换之后换了个其他报错,还是安装不下去,因此还是希望不改变原有paddle编译环境,能解决这个问题,如果可以,希望有人能去我的机器上看一下,非常感谢。。。】

-- The CXX compiler identification is GNU 4.8.2
-- The C compiler identification is GNU 4.8.2
-- 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++ -- broken
CMake Error at /home/iknow/.jumbo/share/cmake-3.2/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "/opt/compiler/gcc-4.8.2/bin/g++" is not able to compile a
  simple test program.

  It fails with the following output:

   Change Dir: /home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp

  

  Run Build Command:"/usr/bin/gmake" "cmTryCompileExec2132874655/fast"

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2132874655.dir/build.make
  CMakeFiles/cmTryCompileExec2132874655.dir/build

  gmake[1]: Entering directory
  `/home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp'


  /home/iknow/.jumbo/bin/cmake -E cmake_progress_report
  /home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building CXX object
  CMakeFiles/cmTryCompileExec2132874655.dir/testCXXCompiler.cxx.o

  /opt/compiler/gcc-4.8.2/bin/g++ -o
  CMakeFiles/cmTryCompileExec2132874655.dir/testCXXCompiler.cxx.o -c
  /home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx


  Linking CXX executable cmTryCompileExec2132874655

  /home/iknow/.jumbo/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec2132874655.dir/link.txt --verbose=1

  /opt/compiler/gcc-4.8.2/bin/g++
  CMakeFiles/cmTryCompileExec2132874655.dir/testCXXCompiler.cxx.o -o
  cmTryCompileExec2132874655 -rdynamic

  
  /home/opt/gcc-4.8.2.bpkg-r2/gcc-4.8.2.bpkg-r2/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../lib64/libstdc++.so:
  undefined reference to `memcpy@GLIBC_2.14'

  
  /home/opt/gcc-4.8.2.bpkg-r2/gcc-4.8.2.bpkg-r2/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../lib64/libstdc++.so:
  undefined reference to `clock_gettime@GLIBC_2.17'

  /lib64/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'

  collect2: error: ld returned 1 exit status

  gmake[1]: *** [cmTryCompileExec2132874655] Error 1

  gmake[1]: Leaving directory
  `/home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp'


  gmake: *** [cmTryCompileExec2132874655/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!

还给了error.log 和output.log两个文件,如果需要其中的信息请再评论告之,非常感谢! 另:我说的内部一键编译版本是这个: git clone http://gitlab.baidu.com/idl-dl/paddle_internal_release_tools.git 然后sh build.sh cpu nonrdma安装的这个版本。

HugoLian avatar Jul 18 '17 07:07 HugoLian

CmakeOutput.log上的日志为:

keOutput.log
The system is: Linux - 2.6.32_1-12-0-0 - x86_64
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /opt/compiler/gcc-4.8.2/bin/g++ 
Build flags: 
Id flags: -c

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

The CXX compiler identification is GNU, found in "/home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/3.2.2/CompilerIdCXX/CMakeCXXCompilerId.o"

Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /opt/compiler/gcc-4.8.2/bin/gcc 
Build flags: 
Id flags: -c
             
The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"

The C compiler identification is GNU, found in "/home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/3.2.2/CompilerIdC/CMakeCCompilerId.o"

CmakeError.log上的日志是:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/compiler/gcc-4.8.2/bin/g++ 
Build flags: 
Id flags: 

The output was:
1
/home/opt/gcc-4.8.2.bpkg-r2/gcc-4.8.2.bpkg-r2/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../lib64/libstdc++.so: undefined reference to `memcpy@GLIBC_2.14'
/home/opt/gcc-4.8.2.bpkg-r2/gcc-4.8.2.bpkg-r2/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../lib64/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'
/lib64/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status


Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.Compiler: /opt/compiler/gcc-4.8.2/bin/gcc 
Build flags: 
Id flags: 

The output was:
1
/lib64/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status


Determining if the CXX compiler works failed with the following output:
Change Dir: /home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTryCompileExec2132874655/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec2132874655.dir/build.make CMakeFiles/cmTryCompileExec2132874655.dir/build
gmake[1]: Entering directory `/home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp'
/home/iknow/.jumbo/bin/cmake -E cmake_progress_report /home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec2132874655.dir/testCXXCompiler.cxx.o
/opt/compiler/gcc-4.8.2/bin/g++     -o CMakeFiles/cmTryCompileExec2132874655.dir/testCXXCompiler.cxx.o -c /home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTryCompileExec2132874655
/home/iknow/.jumbo/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2132874655.dir/link.txt --verbose=1
/opt/compiler/gcc-4.8.2/bin/g++        CMakeFiles/cmTryCompileExec2132874655.dir/testCXXCompiler.cxx.o  -o cmTryCompileExec2132874655 -rdynamic 
/home/opt/gcc-4.8.2.bpkg-r2/gcc-4.8.2.bpkg-r2/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../lib64/libstdc++.so: undefined reference to `memcpy@GLIBC_2.14'
/home/opt/gcc-4.8.2.bpkg-r2/gcc-4.8.2.bpkg-r2/sbin/../lib/gcc/x86_64-baidu-linux-gnu/4.8.2/../../../../lib64/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'
/lib64/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec2132874655] Error 1
gmake[1]: Leaving directory `/home/iknow/paddle/paddle_internal_release_tools/idl/paddle/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec2132874655/fast] Error 2

HugoLian avatar Jul 18 '17 07:07 HugoLian

image

可以参考 http://wiki.baidu.com/pages/viewpage.action?pageId=327596892 里的

由于环境特殊,内网用源码安装比较容易出错。 没有特殊需求,用一键下载的靠谱一些

Superjomn avatar Jul 18 '17 07:07 Superjomn

首先 cd build && rm -rf * 然后 cmake .. -DWITH_GPU=ON -DCMAKE_CXX_COMPILER=... -DCMAKE_C_COMPILER=...

gangliao avatar Jul 19 '17 07:07 gangliao

Close this issue due to inactivity. please feel free to reopen it if more information is available.

JiayiFeng avatar Aug 30 '17 00:08 JiayiFeng

glibc需要升级到2.17以上

guanshan avatar Sep 12 '18 08:09 guanshan