songjun54cm / fastdfs

Automatically exported from code.google.com/p/fastdfs
GNU General Public License v3.0
0 stars 0 forks source link

在ubuntu下make.sh文件有一点小问题 #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
由于我的系统是Ubuntu 11.10 x86_64 x86_64 x86_64 GNU/Linux
在执行时出现以下错误提示:

/home/zhxia/apps/db/FastDFS/tracker/../common/sched_thread.c:495: undefined 
reference to `pthread_create'
../common/pthread_func.o: In function `init_pthread_lock':
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:32: undefined 
reference to `pthread_mutexattr_init'
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:40: undefined 
reference to `pthread_mutexattr_settype'
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:57: undefined 
reference to `pthread_mutexattr_destroy'
../common/pthread_func.o: In function `init_pthread_attr':
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:84: undefined 
reference to `pthread_attr_getstacksize'
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:115: undefined 
reference to `pthread_attr_setstacksize'
../common/pthread_func.o: In function `create_work_threads':
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:156: undefined 
reference to `pthread_create'
../common/pthread_func.o: In function `kill_work_threads':
/home/zhxia/apps/db/FastDFS/tracker/../common/pthread_func.c:182: undefined 
reference to `pthread_kill'

经查,是在make.sh的92行的判断遗漏了本系统,需要加一个:
[ -f /usr/lib/x86_64-linux-gnu/libpthread.a ]

即可以正常编译!

Original issue reported on code.google.com by zhxi...@gmail.com on 25 Feb 2013 at 10:31

GoogleCodeExporter commented 9 years ago
恩,这个问题论坛中有人问过,并且有人解答了。
就是你说的这个做法。
感谢你的反馈和支持!

Original comment by happyfis...@gmail.com on 26 Feb 2013 at 3:29