happyfish100 / fastdfs-nginx-module

FastDFS nginx module
GNU Lesser General Public License v3.0
434 stars 260 forks source link

ubuntu编译失败,很恼火 #97

Open liangrj914 opened 1 year ago

liangrj914 commented 1 year ago
In file included from /software/fdfs/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6: /software/fdfs/fastdfs-nginx-module/src/common.c: In function ‘fdfs_mod_init’: /software/fdfs/fastdfs-nginx-module/src/common.c:342:48: error: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘FDFSStorePathInfo’ [-Werror=format=] 342 "store_path%d=%s, ", i, \ ~^
char *
343 g_fdfs_store_paths.paths[i]);
~~~~~~~
FDFSStorePathInfo
/software/fdfs/fastdfs-nginx-module/src/common.c:379:17: error: ‘g_storage_id_count’ undeclared (first use in this function); did you mean ‘g_storage_ids_by_ip’? 379 g_storage_id_count, flv_support, flv_extension); ^~~~~~ g_storage_ids_by_ip /software/fdfs/fastdfs-nginx-module/src/common.c:379:17: note: each undeclared identifier is reported only once for each function it appears in /software/fdfs/fastdfs-nginx-module/src/common.c:391:58: error: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘FDFSStorePathInfo’ [-Werror=format=] 391 ", store_path%d=%s", i, \ ~^
char *
392 group_store_paths[k].store_paths.paths[i]);
~~~~~~~~~
FDFSStorePathInfo
/software/fdfs/fastdfs-nginx-module/src/common.c: In function ‘fdfs_http_request_handler’: /software/fdfs/fastdfs-nginx-module/src/common.c:867:66: error: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘FDFSStorePathInfo’ [-Werror=format=] 867 sizeof(full_filename), "%s/data/%s", \ ~^
char *
868 pStorePaths->paths[store_path_index], \
~~~~~~~~
FDFSStorePathInfo
/software/fdfs/fastdfs-nginx-module/src/common.c:1162:58: error: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘FDFSStorePathInfo’ [-Werror=format=] 1162 sizeof(full_filename), "%s/data/%s", \ ~^
char *
1163 pStorePaths->paths[store_path_index], \
~~~~~~~~
FDFSStorePathInfo

cc1: all warnings being treated as errors make[1]: [objs/Makefile:1445: objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Leaving directory '/software/fdfs/nginx-1.20.2' make: [Makefile:10: build] Error 2

happyfish100 commented 1 year ago

应该是fastdfs 版本不匹配的问题。FastDFS和nginx扩展模块都用最新版本,就不会存在这个问题了。

liangrj914 commented 1 year ago

编译有报了,6.0.93

@.***

@.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年02月24日 10:01 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [happyfish100/fastdfs-nginx-module] ubuntu编译失败,很恼火 (Issue #97) |

应该是fastdfs 版本不匹配的问题。FastDFS和nginx扩展模块都用最新版本,就不会存在这个问题了。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

happyfish100 commented 1 year ago

强烈推荐使用最新的 6.9.4,编译和安装说明参见源码目录下的文件INSTALL