davidwang456 / fastdfs

Automatically exported from code.google.com/p/fastdfs
GNU General Public License v3.0
0 stars 0 forks source link

fastdfs-nginx-module有错误 #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
gcc version 4.2.4
nginx-0.8.53
fastdfs-nginx-module_v1.01.tar.gz

编译时过不去,报错如下:
make[1]: Entering directory `/root/nginx-0.8.53'
gcc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter 
-Wunused-function -Wunused-variable -Wunused-value -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 \
                /root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c
cc1: warnings being treated as errors
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c: In function 
'fdfs_output_headers':
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:141: warning: pointer 
targets in assignment differ in signedness
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c: In function 
'ngx_http_fastdfs_proxy_create_request':
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:382: warning: pointer 
targets in passing argument 1 of '__builtin_strchr' differ in signedness
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c: In function 
'ngx_http_fastdfs_handler':
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:734: warning: pointer 
targets in assignment differ in signedness
/root/fastdfs-nginx-module/src/ngx_http_fastdfs_module.c:735: warning: pointer 
targets in assignment differ in signedness
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1
make[1]: Leaving directory `/root/nginx-0.8.53'
make: *** [build] Error 2

Original issue reported on code.google.com by e...@nginxs.com on 1 Dec 2010 at 8:48

GoogleCodeExporter commented 8 years ago
这是在什么系统下哇?编译检查得这么严格

Original comment by happyfis...@gmail.com on 1 Dec 2010 at 10:28

GoogleCodeExporter commented 8 years ago
提示这4处地方已经修复。请check out出最新代码试试。例如:
svn export http://fastdfs-nginx-module.googlecode.com/svn/trunk/ 
fastdfs-nginx-module-read-only

Original comment by happyfis...@gmail.com on 1 Dec 2010 at 10:49

GoogleCodeExporter commented 8 years ago
编译已经好了·我在storaged也做了软连接

用nginx访问还是出错·可能是我的使用方法有问题·

能在  wiki或者 什么地方做个事例么?呵呵

我的错误如下:

192.168.6.2 - - [02/Dec/2010:11:12:51 +0800] "GET /M00/00/00/aaa\x00HTTP/1.1" 
400 587 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 
2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 
1.1.4322)"
192.168.6.2 - - [02/Dec/2010:11:13:13 +0800] "GET 
/M00/00/00/aaa.html\x00HTTP/1.1" 400 587 "-" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 
3.5.30729; InfoPath.2; .NET CLR 1.1.4322)"
192.168.6.2 - - [02/Dec/2010:11:20:07 +0800] "GET 
/M00/00/00/aaa.html\x00HTTP/1.1" 400 587 "-" "Mozilla/4.0 (compatible; MSIE 
6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 
3.5.30729; InfoPath.2; .NET CLR 1.1.4322)"

Original comment by e...@nginxs.com on 2 Dec 2010 at 3:26

GoogleCodeExporter commented 8 years ago
使用 fdfs_test或fdfs_test1上传文件,参照返回的那个URL链接。

Original comment by happyfis...@gmail.com on 2 Dec 2010 at 7:10

GoogleCodeExporter commented 8 years ago
/usr/local/include/fdfs_http_shared.h:28: error: expected 
specifier-qualifier-list before ‘HashArray’
In file included from 
/opt/fastdfs-nginx-module-read-only/src//ngx_http_fastdfs_module.c:6:
/opt/fastdfs-nginx-module-read-only/src//common.c:27:27: error: 
local_ip_func.h: No such file or directory
/opt/fastdfs-nginx-module-read-only/src//common.c:28:26: error: trunk_shared.h: 
No such file or directory
In file included from 
/opt/fastdfs-nginx-module-read-only/src//ngx_http_fastdfs_module.c:6:
/opt/fastdfs-nginx-module-read-only/src//common.c: In function 
‘fdfs_mod_init’:
/opt/fastdfs-nginx-module-read-only/src//common.c:47: error: ‘IniContext’ 
undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:47: error: (Each undeclared 
identifier is reported only once
/opt/fastdfs-nginx-module-read-only/src//common.c:47: error: for each function 
it appears in.)
/opt/fastdfs-nginx-module-read-only/src//common.c:47: error: expected ‘;’ 
before ‘iniContext’
/opt/fastdfs-nginx-module-read-only/src//common.c:54: error: too few arguments 
to function ‘log_init’
cc1: warnings being treated as errors
/opt/fastdfs-nginx-module-read-only/src//common.c:55: error: implicit 
declaration of function ‘trunk_shared_init’
/opt/fastdfs-nginx-module-read-only/src//common.c:57: error: implicit 
declaration of function ‘iniLoadFromFile’
/opt/fastdfs-nginx-module-read-only/src//common.c:57: error: ‘iniContext’ 
undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:67: error: implicit 
declaration of function ‘storage_load_paths_from_conf_file’
/opt/fastdfs-nginx-module-read-only/src//common.c:72: error: 
‘g_fdfs_connect_timeout’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:73: error: 
‘DEFAULT_CONNECT_TIMEOUT’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:72: error: passing argument 2 
of ‘iniGetIntValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:41: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:79: error: 
‘g_fdfs_network_timeout’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:79: error: passing argument 2 
of ‘iniGetIntValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:41: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:86: error: too few arguments 
to function ‘load_log_level’
/opt/fastdfs-nginx-module-read-only/src//common.c:88: error: passing argument 2 
of ‘iniGetStrValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:36: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:91: error: implicit 
declaration of function ‘log_set_filename’
/opt/fastdfs-nginx-module-read-only/src//common.c:97: error: implicit 
declaration of function ‘fdfs_load_tracker_group_ex’
/opt/fastdfs-nginx-module-read-only/src//common.c:97: error: 
‘g_tracker_group’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:104: error: passing argument 
2 of ‘iniGetIntValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:41: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:107: error: passing argument 
2 of ‘iniGetBoolValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:48: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:109: error: passing argument 
2 of ‘iniGetStrValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:36: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:128: error: passing argument 
2 of ‘fdfs_http_params_load’ makes integer from pointer without a cast
/usr/local/include/fdfs_http_shared.h:50: note: expected ‘int’ but argument 
is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:128: error: passing argument 
3 of ‘fdfs_http_params_load’ from incompatible pointer type
/usr/local/include/fdfs_http_shared.h:50: note: expected ‘const char *’ but 
argument is of type ‘struct FDFSHTTPParams *’
/opt/fastdfs-nginx-module-read-only/src//common.c:128: error: too few arguments 
to function ‘fdfs_http_params_load’
/opt/fastdfs-nginx-module-read-only/src//common.c:134: error: passing argument 
2 of ‘iniGetStrValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:36: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:143: error: passing argument 
2 of ‘iniGetStrValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:36: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
/opt/fastdfs-nginx-module-read-only/src//common.c:146: error: 
‘g_if_alias_prefix’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:156: error: implicit 
declaration of function ‘iniFreeContext’
/opt/fastdfs-nginx-module-read-only/src//common.c:162: error: implicit 
declaration of function ‘load_local_host_ip_addrs’
/opt/fastdfs-nginx-module-read-only/src//common.c:185: error: 
‘g_fdfs_base_path’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:188: error: 
‘g_local_host_ip_count’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:165: error: 
‘FDFSHTTPParams’ has no member named ‘need_find_content_type’
/opt/fastdfs-nginx-module-read-only/src//common.c:165: error: 
‘FDFSHTTPParams’ has no member named ‘default_content_type’
/opt/fastdfs-nginx-module-read-only/src//common.c:165: error: 
‘FDFSHTTPParams’ has no member named ‘token_ttl’
/opt/fastdfs-nginx-module-read-only/src//common.c:165: error: 
‘FDFSHTTPParams’ has no member named ‘anti_steal_secret_key’
/opt/fastdfs-nginx-module-read-only/src//common.c:165: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_content_type’
/opt/fastdfs-nginx-module-read-only/src//common.c:165: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_buff’
/opt/fastdfs-nginx-module-read-only/src//common.c: In function 
‘fdfs_http_request_handler’:
/opt/fastdfs-nginx-module-read-only/src//common.c:256: error: 
‘FDFSFileInfo’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:256: error: expected ‘;’ 
before ‘file_info’
/opt/fastdfs-nginx-module-read-only/src//common.c:260: error: 
‘FDFSTrunkFullInfo’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:260: error: expected ‘;’ 
before ‘trunkInfo’
/opt/fastdfs-nginx-module-read-only/src//common.c:261: error: 
‘FDFSTrunkHeader’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:261: error: expected ‘;’ 
before ‘trunkHeader’
/opt/fastdfs-nginx-module-read-only/src//common.c:355: error: 
‘FDFSHTTPParams’ has no member named ‘anti_steal_secret_key’
/opt/fastdfs-nginx-module-read-only/src//common.c:355: error: 
‘FDFSHTTPParams’ has no member named ‘token_ttl’
/opt/fastdfs-nginx-module-read-only/src//common.c:359: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_content_type’
/opt/fastdfs-nginx-module-read-only/src//common.c:361: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_buff’
/opt/fastdfs-nginx-module-read-only/src//common.c:362: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_content_type’
/opt/fastdfs-nginx-module-read-only/src//common.c:365: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_buff’
/opt/fastdfs-nginx-module-read-only/src//common.c:367: error: 
‘FDFSHTTPParams’ has no member named ‘token_check_fail_buff’
/opt/fastdfs-nginx-module-read-only/src//common.c:384: error: implicit 
declaration of function ‘storage_split_filename_ex’
/opt/fastdfs-nginx-module-read-only/src//common.c:397: error: implicit 
declaration of function ‘fdfs_get_file_info_ex1’
/opt/fastdfs-nginx-module-read-only/src//common.c:397: error: ‘file_info’ 
undeclared (first use in this function)
In file included from 
/opt/fastdfs-nginx-module-read-only/src//ngx_http_fastdfs_module.c:6:
/opt/fastdfs-nginx-module-read-only/src//common.c:431: error: implicit 
declaration of function ‘trunk_file_stat’
/opt/fastdfs-nginx-module-read-only/src//common.c:432: error: ‘trunkInfo’ 
undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:432: error: ‘trunkHeader’ 
undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:447: error: implicit 
declaration of function ‘is_local_host_ip’
/opt/fastdfs-nginx-module-read-only/src//common.c:529: error: 
‘FDFSHTTPParams’ has no member named ‘need_find_content_type’
/opt/fastdfs-nginx-module-read-only/src//common.c:588: error: implicit 
declaration of function ‘STORAGE_IS_TRUNK_FILE’
/opt/fastdfs-nginx-module-read-only/src//common.c:591: error: implicit 
declaration of function ‘trunk_get_full_filename’
/opt/fastdfs-nginx-module-read-only/src//common.c:594: error: implicit 
declaration of function ‘TRUNK_FILE_START_OFFSET’
/opt/fastdfs-nginx-module-read-only/src//common.c:600: error: 
‘g_fdfs_store_paths’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:625: error: implicit 
declaration of function ‘STRERROR’
/opt/fastdfs-nginx-module-read-only/src//common.c: In function 
‘fdfs_get_params_from_tracker’:
/opt/fastdfs-nginx-module-read-only/src//common.c:667: error: ‘IniContext’ 
undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:667: error: expected ‘;’ 
before ‘iniContext’
/opt/fastdfs-nginx-module-read-only/src//common.c:672: error: implicit 
declaration of function ‘fdfs_get_ini_context_from_tracker’
/opt/fastdfs-nginx-module-read-only/src//common.c:672: error: 
‘g_tracker_group’ undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:673: error: ‘iniContext’ 
undeclared (first use in this function)
/opt/fastdfs-nginx-module-read-only/src//common.c:678: error: passing argument 
2 of ‘iniGetIntValue’ from incompatible pointer type
/usr/local/include/ini_file_reader.h:41: note: expected ‘struct IniItemInfo 
*’ but argument is of type ‘char *’
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1
make[1]: Leaving directory `/opt/nginx-0.8.53'
make: *** [build] Error 2
zcq100@ubuntu-server:/opt/nginx-0.8.53$ 

编译不通过呢

Original comment by zcq100 on 10 Jun 2011 at 3:05

GoogleCodeExporter commented 8 years ago
 client_func.c, line: 111, conf file "/etc/fdfs/mod_fastdfs.conf", host "tracker" is invalid

我在起动 nginx时报错(Error message when I start nginx)

Original comment by mym198...@gmail.com on 28 Oct 2011 at 1:57