chf99cn:编译出错

发布于 2022-09-23 15:32:35 字数 4881 浏览 18 评论 0

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

来世叙缘 2022-09-30 15:32:35

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:
非常感谢!我将这个修改加入到最新版本中。
目前正准备做一个正式的测试。测试结果敬请期待。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文