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

nginx加载fastdfs-nginx-module模块make时出现一大堆错误 #101

Open
plmoknijb123 opened this issue Jan 16, 2024 · 2 comments
Open

Comments

@plmoknijb123
Copy link

In file included from /usr/local/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/usr/local/fastdfs-nginx-module/src/common.c: In function ‘fdfs_mod_init’:
/usr/local/fastdfs-nginx-module/src/common.c:222:2: error: ‘g_fdfs_connect_timeout’ undeclared (first use in this function)
222 | g_fdfs_connect_timeout = iniGetIntValue(NULL, "connect_timeout",
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/fastdfs-nginx-module/src/common.c:222:2: note: each undeclared identifier is reported only once for each function it appears in
/usr/local/fastdfs-nginx-module/src/common.c:229:2: error: ‘g_fdfs_network_timeout’ undeclared (first use in this function)
229 | g_fdfs_network_timeout = iniGetIntValue(NULL, "network_timeout",
| ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/fastdfs-nginx-module/src/common.c:342:20: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘FDFSStorePathInfo’ {aka ‘struct ’} [-Wformat=]
342 | "store_path%d=%s, ", i,
| ~^
| |
| char *
343 | g_fdfs_store_paths.paths[i]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| FDFSStorePathInfo {aka struct }
/usr/local/fastdfs-nginx-module/src/common.c:368:3: error: ‘g_fdfs_base_path’ undeclared (first use in this function); did you mean ‘g_fdfs_store_paths’?
368 | g_fdfs_base_path, url_have_group_name, buff,
| ^~~~~~~~~~~~~~~~
| g_fdfs_store_paths
/usr/local/fastdfs-nginx-module/src/common.c:379:3: 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
/usr/local/fastdfs-nginx-module/src/common.c:391:23: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘FDFSStorePathInfo’ {aka ‘struct ’} [-Wformat=]
391 | ", store_path%d=%s", i,
| ~^
| |
| char *
392 | group_store_paths[k].store_paths.paths[i]);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| FDFSStorePathInfo {aka struct }
/usr/local/fastdfs-nginx-module/src/common.c: In function ‘fdfs_http_request_handler’:
/usr/local/fastdfs-nginx-module/src/common.c:863:31: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘FDFSStorePathInfo’ {aka ‘struct ’} [-Wformat=]
863 | sizeof(full_filename), "%s/data/%s",
| ~^
| |
| char *
864 | pStorePaths->paths[store_path_index],
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| FDFSStorePathInfo {aka struct }
/usr/local/fastdfs-nginx-module/src/common.c:1158:30: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘FDFSStorePathInfo’ {aka ‘struct ’} [-Wformat=]
1158 | sizeof(full_filename), "%s/data/%s",
| ~^
| |
| char *
1159 | pStorePaths->paths[store_path_index],
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| FDFSStorePathInfo {aka struct }
/usr/local/fastdfs-nginx-module/src/common.c: In function ‘fdfs_get_params_from_tracker’:
/usr/local/fastdfs-nginx-module/src/common.c:1277:43: error: macro "fdfs_get_ini_context_from_tracker" passed 5 arguments, but takes just 3
1277 | &iniContext, &continue_flag, false, NULL)) != 0)
| ^
In file included from /usr/include/fastdfs/fdfs_client.h:14,
from /usr/local/fastdfs-nginx-module/src/common.c:28,
from /usr/local/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/usr/include/fastdfs/tracker_proto.h:341: note: macro "fdfs_get_ini_context_from_tracker" defined here
341 | #define fdfs_get_ini_context_from_tracker(pTrackerGroup,
|
In file included from /usr/local/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:6:
/usr/local/fastdfs-nginx-module/src/common.c:1276:14: error: ‘fdfs_get_ini_context_from_tracker’ undeclared (first use in this function); did you mean ‘fdfs_get_ini_context_from_tracker_ex’?
1276 | if ((result=fdfs_get_ini_context_from_tracker(&g_tracker_group,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| fdfs_get_ini_context_from_tracker_ex
/usr/local/fastdfs-nginx-module/src/common.c:1273:7: warning: variable ‘continue_flag’ set but not used [-Wunused-but-set-variable]
1273 | bool continue_flag;
| ^~~~~~~~~~~~~
make[1]: *** [objs/Makefile:1209:objs/addon/src/ngx_http_fastdfs_module.o] 错误 1
make[1]: 离开目录“/usr/local/nginx-1.18.0”
make: *** [Makefile:8:build] 错误 2

@MyGit-Z
Copy link

MyGit-Z commented Mar 28, 2024

如果安装的是fastdfs6.06版本,换用fastdfs-nginx-module-1.22就行了

@happyfish100
Copy link
Owner

fastdfs 和 fastdfs-nginx-module 都使用最新的 master版本就可以了。

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

3 participants