免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6173 | 回复: 14
打印 上一主题 下一主题

[FastDFS] 编译nginx报错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-05-14 11:16 |只看该作者 |倒序浏览
服务器版本:
centos6.4-x86_64
FastDFS V4.06
nginx-1.4.1
fastdfs-nginx-module_v1.15

编译nginx时报错如下,


/home/fastdfs-nginx-module/src/common.c:43: 错误:expected specifier-qualifier-list before ‘FDFSStorePaths’
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_load_groups_store_paths’中:
/home/fastdfs-nginx-module/src/common.c:123: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
cc1: warnings being treated as errors
/home/fastdfs-nginx-module/src/common.c:123: 错误:隐式声明函数‘storage_load_paths_from_conf_file_ex’
/home/fastdfs-nginx-module/src/common.c:123: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_mod_init’中:
/home/fastdfs-nginx-module/src/common.c:293: 错误:隐式声明函数‘fdfs_load_storage_ids_from_file’
/home/fastdfs-nginx-module/src/common.c:336: 错误:在非结构或联合中请求成员‘count’
/home/fastdfs-nginx-module/src/common.c:339: 错误:在非结构或联合中请求成员‘count’
/home/fastdfs-nginx-module/src/common.c:341: 错误:在非结构或联合中请求成员‘paths’
/home/fastdfs-nginx-module/src/common.c:383: 错误:‘g_storage_id_count’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:383: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/home/fastdfs-nginx-module/src/common.c:383: 错误:所在的函数内也只报告一次。)
/home/fastdfs-nginx-module/src/common.c:392: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c:394: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c:399: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_http_request_handler’中:
/home/fastdfs-nginx-module/src/common.c:556: 错误:‘FDFSStorePaths’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:556: 错误:‘pStorePaths’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:674: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c:754: 错误:隐式声明函数‘storage_split_filename_no_check’
/home/fastdfs-nginx-module/src/common.c:808: 错误:隐式声明函数‘trunk_file_stat_ex1’
/home/fastdfs-nginx-module/src/common.c:904: 错误:‘FDFSFileInfo’没有名为‘source_id’的成员
/home/fastdfs-nginx-module/src/common.c:973: 错误:隐式声明函数‘fdfs_http_get_file_extension’
/home/fastdfs-nginx-module/src/common.c:973: 错误:赋值时将整数赋给指针,未作类型转换
/home/fastdfs-nginx-module/src/common.c:977: 错误:传递‘fdfs_http_get_content_type_by_extname’的第 3 个参数时将整数赋给指针,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:104: 附注:需要类型‘char *’,但实参的类型为‘int’
/home/fastdfs-nginx-module/src/common.c:977: 错误:传递‘fdfs_http_get_content_type_by_extname’的第 4 个参数时将指针赋给整数,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:104: 附注:需要类型‘int’,但实参的类型为‘char *’
/home/fastdfs-nginx-module/src/common.c:977: 错误:提供给函数‘fdfs_http_get_content_type_by_extname’的实参太多
/home/fastdfs-nginx-module/src/common.c:1092: 错误:‘ConnectionInfo’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:1092: 错误:expected ‘;’ before ‘storage_server’
/home/fastdfs-nginx-module/src/common.c:1096: 错误:‘storage_server’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:1133: 错误:隐式声明函数‘trunk_get_full_filename_ex’
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_get_params_from_tracker’中:
/home/fastdfs-nginx-module/src/common.c:1276: 错误:隐式声明函数‘fdfs_get_storage_ids_from_tracker_group’
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] 错误 1
make[1]: Leaving directory `/root/nginx-1.4.1'
make: *** [build] 错误 2
make -f objs/Makefile install
make[1]: Entering directory `/root/nginx-1.4.1'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"'  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/include/fastdfs -I /usr/local/include/fastcommon/ -I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/src/ngx_http_fastdfs_module.o \
                /home/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c
In file included from /home/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/home/fastdfs-nginx-module/src/common.c:43: 错误:expected specifier-qualifier-list before ‘FDFSStorePaths’
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_load_groups_store_paths’中:
/home/fastdfs-nginx-module/src/common.c:123: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
cc1: warnings being treated as errors
/home/fastdfs-nginx-module/src/common.c:123: 错误:隐式声明函数‘storage_load_paths_from_conf_file_ex’
/home/fastdfs-nginx-module/src/common.c:123: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_mod_init’中:
/home/fastdfs-nginx-module/src/common.c:293: 错误:隐式声明函数‘fdfs_load_storage_ids_from_file’
/home/fastdfs-nginx-module/src/common.c:336: 错误:在非结构或联合中请求成员‘count’
/home/fastdfs-nginx-module/src/common.c:339: 错误:在非结构或联合中请求成员‘count’
/home/fastdfs-nginx-module/src/common.c:341: 错误:在非结构或联合中请求成员‘paths’
/home/fastdfs-nginx-module/src/common.c:383: 错误:‘g_storage_id_count’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:383: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/home/fastdfs-nginx-module/src/common.c:383: 错误:所在的函数内也只报告一次。)
/home/fastdfs-nginx-module/src/common.c:392: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c:394: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c:399: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_http_request_handler’中:
/home/fastdfs-nginx-module/src/common.c:556: 错误:‘FDFSStorePaths’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:556: 错误:‘pStorePaths’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:674: 错误:‘GroupStorePaths’没有名为‘store_paths’的成员
/home/fastdfs-nginx-module/src/common.c:754: 错误:隐式声明函数‘storage_split_filename_no_check’
/home/fastdfs-nginx-module/src/common.c:808: 错误:隐式声明函数‘trunk_file_stat_ex1’
/home/fastdfs-nginx-module/src/common.c:904: 错误:‘FDFSFileInfo’没有名为‘source_id’的成员
/home/fastdfs-nginx-module/src/common.c:973: 错误:隐式声明函数‘fdfs_http_get_file_extension’
/home/fastdfs-nginx-module/src/common.c:973: 错误:赋值时将整数赋给指针,未作类型转换
/home/fastdfs-nginx-module/src/common.c:977: 错误:传递‘fdfs_http_get_content_type_by_extname’的第 3 个参数时将整数赋给指针,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:104: 附注:需要类型‘char *’,但实参的类型为‘int’
/home/fastdfs-nginx-module/src/common.c:977: 错误:传递‘fdfs_http_get_content_type_by_extname’的第 4 个参数时将指针赋给整数,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:104: 附注:需要类型‘int’,但实参的类型为‘char *’
/home/fastdfs-nginx-module/src/common.c:977: 错误:提供给函数‘fdfs_http_get_content_type_by_extname’的实参太多
/home/fastdfs-nginx-module/src/common.c:1092: 错误:‘ConnectionInfo’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:1092: 错误:expected ‘;’ before ‘storage_server’
/home/fastdfs-nginx-module/src/common.c:1096: 错误:‘storage_server’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:1133: 错误:隐式声明函数‘trunk_get_full_filename_ex’
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_get_params_from_tracker’中:
/home/fastdfs-nginx-module/src/common.c:1276: 错误:隐式声明函数‘fdfs_get_storage_ids_from_tracker_group’
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] 错误 1
make[1]: Leaving directory `/root/nginx-1.4.1'
make: *** [install] 错误 2


各位,支支招吧。

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
2 [报告]
发表于 2013-05-14 13:32 |只看该作者
先编译和安装FastDFS v4.06

论坛徽章:
0
3 [报告]
发表于 2013-05-14 13:49 |只看该作者
本帖最后由 tgnan 于 2013-05-14 13:52 编辑
happy_fish100 发表于 2013-05-14 13:32
先编译和安装FastDFS v4.06




我是先编译和按安装FastDFSv4.06先的。
然后再编译和安装nginx及mudule模块的。



你的意思是fastdfs的安装必须在nginx之前么?
且,我这边出错的原因就是这个么?、

论坛徽章:
0
4 [报告]
发表于 2013-05-14 13:59 |只看该作者
happy_fish100 发表于 2013-05-14 13:32
先编译和安装FastDFS v4.06



余老师,回答的不对。。
我是先编译和安装FastDFSv4.06的,,
我认为还是版本之间的兼容性问题。甚或是系统的问题。

我将nginx版本降低到0.8.53 和module版本降低到1.08.
还是报错的。/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_mod_init’中:
/home/fastdfs-nginx-module/src/common.c:187: 错误:‘g_fdfs_path_count’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:187: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/home/fastdfs-nginx-module/src/common.c:187: 错误:所在的函数内也只报告一次。)
In file included from /home/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_http_request_handler’中:
/home/fastdfs-nginx-module/src/common.c:640: 警告:传递‘fdfs_http_get_content_type_by_extname’的第 3 个参数时将指针赋给整数,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:116: 附注:需要类型‘int’,但实参的类型为‘char *’
/home/fastdfs-nginx-module/src/common.c:640: 警告:传递‘fdfs_http_get_content_type_by_extname’的第 4 个参数时将整数赋给指针,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:116: 附注:需要类型‘char *’,但实参的类型为‘long unsigned int’
/home/fastdfs-nginx-module/src/common.c:640: 错误:提供给函数‘fdfs_http_get_content_type_by_extname’的实参太少
/home/fastdfs-nginx-module/src/common.c:722: 错误:‘TrackerServerInfo’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:722: 错误:expected ‘;’ before ‘storage_server’
/home/fastdfs-nginx-module/src/common.c:726: 错误:‘storage_server’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:773: 错误:下标运算的左操作数既非数组也非指针
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] 错误 1
make[1]: Leaving directory `/root/nginx-0.8.53'
make: *** [build] 错误 2
make -f objs/Makefile install
make[1]: Entering directory `/root/nginx-0.8.53'
gcc -c -D_FILE_OFFSET_BITS=64 -DFDFS_OUTPUT_CHUNK_SIZE='256*1024' -DFDFS_MOD_CONF_FILENAME='"/etc/fdfs/mod_fastdfs.conf"'  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/include/fastdfs -I /usr/local/include/fastcommon/ -I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/src/ngx_http_fastdfs_module.o \
                /home/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c
In file included from /home/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_mod_init’中:
/home/fastdfs-nginx-module/src/common.c:187: 错误:‘g_fdfs_path_count’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:187: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
/home/fastdfs-nginx-module/src/common.c:187: 错误:所在的函数内也只报告一次。)
In file included from /home/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/home/fastdfs-nginx-module/src/common.c: 在函数‘fdfs_http_request_handler’中:
/home/fastdfs-nginx-module/src/common.c:640: 警告:传递‘fdfs_http_get_content_type_by_extname’的第 3 个参数时将指针赋给整数,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:116: 附注:需要类型‘int’,但实参的类型为‘char *’
/home/fastdfs-nginx-module/src/common.c:640: 警告:传递‘fdfs_http_get_content_type_by_extname’的第 4 个参数时将整数赋给指针,未作类型转换
/usr/local/include/fastdfs/fdfs_http_shared.h:116: 附注:需要类型‘char *’,但实参的类型为‘long unsigned int’
/home/fastdfs-nginx-module/src/common.c:640: 错误:提供给函数‘fdfs_http_get_content_type_by_extname’的实参太少
/home/fastdfs-nginx-module/src/common.c:722: 错误:‘TrackerServerInfo’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:722: 错误:expected ‘;’ before ‘storage_server’
/home/fastdfs-nginx-module/src/common.c:726: 错误:‘storage_server’未声明(在此函数内第一次使用)
/home/fastdfs-nginx-module/src/common.c:773: 错误:下标运算的左操作数既非数组也非指针
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] 错误 1
make[1]: Leaving directory `/root/nginx-0.8.53'
make: *** [install] 错误 2




论坛徽章:
0
5 [报告]
发表于 2013-05-14 14:24 |只看该作者
FastDFS 是否按照默认路径安装的

论坛徽章:
0
6 [报告]
发表于 2013-05-14 15:52 |只看该作者
john_04047210 发表于 2013-05-14 14:24
FastDFS 是否按照默认路径安装的



安装步骤如下:

#wget http://fastdfs.googlecode.com/files/FastDFS_v4.06.tar.gz
#tar -zxvf FastDFS_v4.06.tar.gz
#cd FastDFS
由于要使用内置的 http 服务,make.sh 文件,找到#WITH_LINUX_SERVICE=1
修改成WITH_LINUX_SERVICE=1
#./make.sh;./make.sh install

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
7 [报告]
发表于 2013-05-14 20:48 |只看该作者
FDFS server和nginx扩展模块都用最新版本,没有问题!

论坛徽章:
0
8 [报告]
发表于 2013-05-15 00:33 |只看该作者
happy_fish100 发表于 2013-05-14 20:48
FDFS server和nginx扩展模块都用最新版本,没有问题!



我甚感奇怪。

论坛徽章:
0
9 [报告]
发表于 2013-05-15 11:12 |只看该作者
我现在很奇怪,我装好后,所有的安装都没有问题,但就是上传后的文件不能下载下来,nginx需要装哪台机器,刚开始跟tracker装在同一台机器上的,现在装在storage机器上,但都无法下载文件,谁可以解答下,谢谢

论坛徽章:
0
10 [报告]
发表于 2013-05-15 14:28 |只看该作者
john_04047210 发表于 2013-05-15 11:12
我现在很奇怪,我装好后,所有的安装都没有问题,但就是上传后的文件不能下载下来,nginx需要装哪台机器,刚 ...



楼上,你比我先进一步了。。呵呵、、
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP