alibaba / alibaba/euler

编译出错tensorflow_framework.so

Open
#285 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.9k
Forks
553
PR merge metrics
No merged PRs in 30d

Description

tensorflow_framework library found: in /home/linjian/anaconda3/envs/tensorflow/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so
-- Configuring incomplete, errors occurred!

-------------------------------------------------------------------
以上是编译后出现的错误提示!请问下是什么原因?谢谢了。下面是出错的日志:

--------------------------------------------------------------------
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/linjian/euler-master/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f7abf/fast"
/usr/bin/make -f CMakeFiles/cmTC_f7abf.dir/build.make CMakeFiles/cmTC_f7abf.dir/build
make[1]: Entering directory '/home/linjian/euler-master/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_f7abf.dir/CheckSymbolExists.cxx.o
/usr/bin/c++ -fPIE -std=gnu++11 -o CMakeFiles/cmTC_f7abf.dir/CheckSymbolExists.cxx.o -c /home/linjian/euler-master/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx
Linking CXX executable cmTC_f7abf
/opt/cmake-3.9.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f7abf.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_f7abf.dir/CheckSymbolExists.cxx.o -o cmTC_f7abf
CMakeFiles/cmTC_f7abf.dir/CheckSymbolExists.cxx.o:在函数‘main’中:
CheckSymbolExists.cxx:(.text+0x1b):对‘pthread_create’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_f7abf.dir/build.make:97: recipe for target 'cmTC_f7abf' failed
make[1]: *** [cmTC_f7abf] Error 1
make[1]: Leaving directory '/home/linjian/euler-master/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_f7abf/fast' failed
make: *** [cmTC_f7abf/fast] Error 2

File /home/linjian/euler-master/build/CMakeFiles/CMakeTmp/CheckSymbolExists.cxx:
/* */
#include

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:
Change Dir: /home/linjian/euler-master/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_598cb/fast"
/usr/bin/make -f CMakeFiles/cmTC_598cb.dir/build.make CMakeFiles/cmTC_598cb.dir/build
make[1]: Entering directory '/home/linjian/euler-master/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_598cb.dir/CheckFunctionExists.cxx.o
/usr/bin/c++ -DCHECK_FUNCTION_EXISTS=pthread_create -fPIE -std=gnu++11 -o CMakeFiles/cmTC_598cb.dir/CheckFunctionExists.cxx.o -c /home/linjian/euler-master/build/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx
Linking CXX executable cmTC_598cb
/opt/cmake-3.9.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_598cb.dir/link.txt --verbose=1
/usr/bin/c++ -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_598cb.dir/CheckFunctionExists.cxx.o -o cmTC_598cb -lpthreads
/usr/bin/ld: 找不到 -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_598cb.dir/build.make:97: recipe for target 'cmTC_598cb' failed
make[1]: *** [cmTC_598cb] Error 1
make[1]: Leaving directory '/home/linjian/euler-master/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_598cb/fast' failed
make: *** [cmTC_598cb/fast] Error 2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CMake configure output in build/CMakeFiles/CMakeTmp, especially the generated CheckSymbolExists.cxx and CheckFunctionExists.cxx checks for pthread_create. Determine why the configuration links without pthread support and why it tries -lpthreads; done means the CMake configuration completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python, tensorflow
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.