chf99cn:编译出错
chf99cn:
nm: '/usr/lib/libc_r.so': No such file
cc -O3 -Wall -D_FILE_OFFSET_BITS=64 -DOS_LINUX -o fdfs_trackerd fdfs_trackerd.c ../common/hash.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o tracker_proto.o tracker_mem.o tracker_service.o tracker_global.o tracker_func.o -L/usr/local/lib -I../common -I/usr/local/include
fdfs_trackerd.c: In function `main':
fdfs_trackerd.c:136: warning: cast to pointer from integer of different size
../common/shared_func.o(.text+0xd8f): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_init'
../common/shared_func.o(.text+0xdcb): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_settype'
../common/shared_func.o(.text+0xe26): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_destroy'
../common/shared_func.o(.text+0xe97): In function `init_pthread_attr':
: undefined reference to `pthread_attr_getstacksize'
../common/shared_func.o(.text+0xeb4): In function `init_pthread_attr':
: undefined reference to `pthread_attr_setstacksize'
../common/shared_func.o(.text+0x1f1e): In function `create_work_threads':
: undefined reference to `pthread_create'
../common/shared_func.o(.text+0x1fbd): In function `kill_work_threads':
: undefined reference to `pthread_kill'
collect2: ld returned 1 exit status
make: *** [fdfs_trackerd] Error 1
cc -O3 -Wall -D_FILE_OFFSET_BITS=64 -DOS_LINUX -o fdfs_storaged fdfs_storaged.c ../common/hash.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o ../common/fdfs_base64.o ../tracker/tracker_proto.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o -L/usr/local/lib -I../common -I../tracker -I/usr/local/include
fdfs_storaged.c: In function `main':
fdfs_storaged.c:190: warning: cast to pointer from integer of different size
../common/shared_func.o(.text+0xd8f): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_init'
../common/shared_func.o(.text+0xdcb): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_settype'
../common/shared_func.o(.text+0xe26): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_destroy'
../common/shared_func.o(.text+0xe97): In function `init_pthread_attr':
: undefined reference to `pthread_attr_getstacksize'
../common/shared_func.o(.text+0xeb4): In function `init_pthread_attr':
: undefined reference to `pthread_attr_setstacksize'
../common/shared_func.o(.text+0x1f1e): In function `create_work_threads':
: undefined reference to `pthread_create'
../common/shared_func.o(.text+0x1fbd): In function `kill_work_threads':
: undefined reference to `pthread_kill'
tracker_client_thread.o(.text+0x1371): In function `tracker_report_thread_start':
: undefined reference to `pthread_create'
storage_sync.o(.text+0x2505): In function `storage_sync_thread_start':
: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [fdfs_storaged] Error 1
cc -O3 -Wall -D_FILE_OFFSET_BITS=64 -DOS_LINUX -o fdfs_monitor fdfs_monitor.c ../common/hash.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o ../common/fdfs_base64.o ../tracker/tracker_proto.o tracker_client.o client_func.o client_global.o storage_client.o -L/usr/local/lib -I../common -I../tracker -I/usr/local/include
../common/shared_func.o(.text+0xd8f): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_init'
../common/shared_func.o(.text+0xdcb): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_settype'
../common/shared_func.o(.text+0xe26): In function `init_pthread_lock':
: undefined reference to `pthread_mutexattr_destroy'
../common/shared_func.o(.text+0xe97): In function `init_pthread_attr':
: undefined reference to `pthread_attr_getstacksize'
../common/shared_func.o(.text+0xeb4): In function `init_pthread_attr':
: undefined reference to `pthread_attr_setstacksize'
../common/shared_func.o(.text+0x1f1e): In function `create_work_threads':
: undefined reference to `pthread_create'
../common/shared_func.o(.text+0x1fbd): In function `kill_work_threads':
: undefined reference to `pthread_kill'
collect2: ld returned 1 exit status
make: *** [fdfs_monitor] Error 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
happy_fish100:
你下载的是最新版V1.11吗?解压后执行./make.sh即可进行编译,./make.sh install进行安装。
chf99cn:
我改了一下 make.sh文件,我是64位的.
if [ -f /usr/lib/libpthread.so ] || [ -f /usr/local/lib/libpthread.so ] || [ -f /usr/lib64/libpthread.so ] ...........
加了一件判断就好了。
另:好像没有看到FastDFS在并发情况下的测试报告?
happy_fish100:
非常感谢!我将这个修改加入到最新版本中。
目前正准备做一个正式的测试。测试结果敬请期待。