happyfish100 / fastdfs

FastDFS is an open source high performance distributed file system (DFS). It's major functions include: file storing, file syncing and file accessing, and design for high capacity and load balance. Wechat/Weixin public account (Chinese Language): fastdfs
GNU General Public License v3.0
8.99k stars 1.98k forks source link

hash_destroy未定义引用 #607

Closed An-ease closed 1 year ago

An-ease commented 1 year ago

/usr/bin/ld: ../common/fdfs_http_shared.o: in function fdfs_http_get_content_type_by_extname': /root/third/fastdfs-6.03_dev/client/../common/fdfs_http_shared.c:75: undefined reference tohash_find_ex' /usr/bin/ld: ../common/fdfs_http_shared.o: in function fdfs_http_params_load': /root/third/fastdfs-6.03_dev/client/../common/fdfs_http_shared.c:285: undefined reference tohash_destroy' /usr/bin/ld: ../common/fdfs_http_shared.o: in function fdfs_http_params_destroy': /root/third/fastdfs-6.03_dev/client/../common/fdfs_http_shared.c:304: undefined reference tohash_destroy' /usr/bin/ld: ../common/mime_file_parser.o: in function load_mime_types_from_file': /root/third/fastdfs-6.03_dev/client/../common/mime_file_parser.c:72: undefined reference tohash_init_ex' /usr/bin/ld: /root/third/fastdfs-6.03_dev/client/../common/mime_file_parser.c:111: undefined reference to hash_insert_ex' /usr/bin/ld: ../tracker/fdfs_server_id_func.o: in functionfdfs_load_storage_ids': /root/third/fastdfs-6.03_dev/tracker/fdfs_server_id_func.c:341: undefined reference to `trim' collect2: error: ld returned 1 exit status make: *** [Makefile:59: fdfs_monitor] Error 1

5.12,6.03-dev,6.9.2,6.03版本均出现此问题

happyfish100 commented 1 year ago

建议使用最新版本6.9.2。 相应地需要使用最新的libfastcommon

happyfish100 commented 1 year ago

libfastcommon最新版本是 1.0.64,直接使用 master分支也是可以的。

happyfish100 commented 1 year ago

如果安装过很早以前版本的libfastcommon,可能会出现多个libfastcommon版本的问题, 请执行如下命令:/bin/rm -rf /usr/local/lib/libfastcommon.so /usr/local/include/fastcommon 然后再重新编译和安装 FastDFS。

An-ease commented 1 year ago

感谢,已经解决,确实是common和dfs版本不匹配问题