在OSRM-Project的“make”上找不到pthread_create

时间:2014-12-19 13:30:32

标签: linux compilation pthreads openstreetmap osrm

我正在尝试在我的linux服务器上设置OSRM项目,但是这样做时遇到了问题。我有最新版本的依赖项,并且还安装并设置了pthreads: pecl pthread安装

然后将其添加到php,并重新编译php。

以下是信息:

Centos 6 64bit,尝试设置OSRM-Project。

下载soure,然后:

cd osrm-backend
mkdir -p build
cd build
cmake -D STXXL_LIBRARY=/usr/local/include/stxxl.h ..
make

在make上构建失败:

  

确定pthread_create是否存在失败,并带有以下内容   输出:改变目录:   的/ var / www / html等/ OSRM-后端/建造/ CMakeFiles / CMakeTmp

     

运行Build命令:“/ usr / bin / gmake”“cmTryCompileExec3544628293 / fast”   / usr / bin / gmake -f CMakeFiles / cmTryCompileExec3544628293.dir / build.make   CMakeFiles / cmTryCompileExec3544628293.dir / build gmake [1]:进入   目录/var/www/html/osrm-backend/build/CMakeFiles/CMakeTmp' /usr/local/bin/cmake -E cmake_progress_report /var/www/html/osrm-backend/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3544628293.dir/CheckSymbolExists.c.o /usr/local/bin/cc -o CMakeFiles/cmTryCompileExec3544628293.dir/CheckSymbolExists.c.o -c /var/www/html/osrm-backend/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTryCompileExec3544628293 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3544628293.dir/link.txt --verbose=1 /usr/local/bin/cc
CMakeFiles/cmTryCompileExec3544628293.dir/CheckSymbolExists.c.o -o cmTryCompileExec3544628293 -rdynamic CMakeFiles/cmTryCompileExec3544628293.dir/CheckSymbolExists.c.o: In function
main':CheckSymbolExists.c :(。text + 0x16):未定义的引用   到pthread_create' collect2: error: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec3544628293] Error 1 gmake[1]: Leaving directory / var / www / html / osrm-backend / build / CMakeFiles / CMakeTmp'   gmake:*** [cmTryCompileExec3544628293 / fast]错误2

     

文件   /var/www/html/osrm-backend/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:   / * * /   #include

     

int main(int argc,char ** argv){(void)argv;   #ifndef pthread_create return((int *)(& pthread_create))[argc];   #else(void)argc;返回0;   #endif}

     

确定pthreads中是否存在函数pthread_create   输出失败:更改目录:   的/ var / www / html等/ OSRM-后端/建造/ CMakeFiles / CMakeTmp

     

运行Build命令:“/ usr / bin / gmake”“cmTryCompileExec4016411170 / fast”   / usr / bin / gmake -f CMakeFiles / cmTryCompileExec4016411170.dir / build.make   CMakeFiles / cmTryCompileExec4016411170.dir / build gmake [1]:进入   目录/var/www/html/osrm-backend/build/CMakeFiles/CMakeTmp' /usr/local/bin/cmake -E cmake_progress_report /var/www/html/osrm-backend/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec4016411170.dir/CheckFunctionExists.c.o /usr/local/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec4016411170.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake-3.1/Modules/CheckFunctionExists.c Linking C executable cmTryCompileExec4016411170 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4016411170.dir/link.txt --verbose=1 /usr/local/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec4016411170.dir/CheckFunctionExists.c.o -o cmTryCompileExec4016411170 -rdynamic -lpthreads /opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec4016411170] Error 1 gmake[1]: Leaving directory / var / www / html / osrm-backend / build / CMakeFiles / CMakeTmp'

0 个答案:

没有答案