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
9.04k stars 1.99k forks source link

make fastdfs报错 #409

Open cnsdhzzl opened 4 years ago

cnsdhzzl commented 4 years ago

cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O1 -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I../common -I/usr/local/include In file included from /usr/include/fastcommon/connection_pool.h:20:0, from ../common/fdfs_global.h:16, from ../common/fdfs_global.c:21: /usr/include/fastcommon/hash.h:208:1: 错误:未知的类型名‘string_t’ static inline void hash_find1(HashArray pHash, const string_t key) ^ /usr/include/fastcommon/hash.h: 在函数‘hash_find1’中: /usr/include/fastcommon/hash.h:210:32: 错误:在非结构或联合中请求成员‘str’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h:210:42: 错误:在非结构或联合中请求成员‘len’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h: 在文件作用域: /usr/include/fastcommon/hash.h:221:1: 错误:未知的类型名‘string_t’ int hash_find2(HashArray pHash, const string_t key, string_t value); ^ /usr/include/fastcommon/hash.h:221:55: 错误:未知的类型名‘string_t’ int hash_find2(HashArray pHash, const string_t key, string_t value); ^ /usr/include/fastcommon/hash.h:230:1: 错误:未知的类型名‘string_t’ HashData hash_find1_ex(HashArray pHash, const string_t key); ^ make: [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O1 -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon In file included from /usr/include/fastcommon/connection_pool.h:20:0, from ../common/fdfs_global.h:16, from ../common/fdfs_global.c:21: /usr/include/fastcommon/hash.h:208:1: 错误:未知的类型名‘string_t’ static inline void hash_find1(HashArray pHash, const string_t key) ^ /usr/include/fastcommon/hash.h: 在函数‘hash_find1’中: /usr/include/fastcommon/hash.h:210:32: 错误:在非结构或联合中请求成员‘str’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h:210:42: 错误:在非结构或联合中请求成员‘len’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h: 在文件作用域: /usr/include/fastcommon/hash.h:221:1: 错误:未知的类型名‘string_t’ int hash_find2(HashArray pHash, const string_t key, string_t value); ^ /usr/include/fastcommon/hash.h:221:55: 错误:未知的类型名‘string_t’ int hash_find2(HashArray pHash, const string_t key, string_t value); ^ /usr/include/fastcommon/hash.h:230:1: 错误:未知的类型名‘string_t’ HashData hash_find1_ex(HashArray pHash, const string_t key); ^ make: [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O1 -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I../common -I../tracker -I/usr/include/fastcommon In file included from /usr/include/fastcommon/connection_pool.h:20:0, from ../common/fdfs_global.h:16, from ../common/fdfs_global.c:21: /usr/include/fastcommon/hash.h:208:1: 错误:未知的类型名‘string_t’ static inline void hash_find1(HashArray pHash, const string_t key) ^ /usr/include/fastcommon/hash.h: 在函数‘hash_find1’中: /usr/include/fastcommon/hash.h:210:32: 错误:在非结构或联合中请求成员‘str’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h:210:42: 错误:在非结构或联合中请求成员‘len’ return hash_find(pHash, key->str, key->len); ^ /usr/include/fastcommon/hash.h: 在文件作用域: /usr/include/fastcommon/hash.h:221:1: 错误:未知的类型名‘string_t’ int hash_find2(HashArray pHash, const string_t key, string_t value); ^ /usr/include/fastcommon/hash.h:221:55: 错误:未知的类型名‘string_t’ int hash_find2(HashArray pHash, const string_t key, string_t value); ^ /usr/include/fastcommon/hash.h:230:1: 错误:未知的类型名‘string_t’ HashData hash_find1_ex(HashArray pHash, const string_t key);

shijunfeng commented 4 years ago

我也遇到同样的错误怎么解决

shijunfeng commented 4 years ago

@cnsdhzzl

ghost commented 4 years ago

我也是,请问解决了吗

happyfish100 commented 4 years ago

FastDFS和libfastcommon版本不匹配的问题。 请重新编译和安装 libfastcommon,然后再编译FastDFS即可。