Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu编译失败,很恼火 #97

Open
liangrj914 opened this issue Feb 24, 2023 · 3 comments
Open

ubuntu编译失败,很恼火 #97

liangrj914 opened this issue Feb 24, 2023 · 3 comments

Comments

@liangrj914
Copy link

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
Copy link
Owner

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

@liangrj914
Copy link
Author

liangrj914 commented Feb 24, 2023 via email

@happyfish100
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants