您的位置:首页 > Web前端

编译cyrus-sasl报错digestmd5.c:279: warning: pointer targets in initialization differ in signedness

2012-04-02 02:09 507 查看
报错如下:

digestmd5.c:279: warning: pointer targets in initialization differ in signedness
digestmd5.c: In function 'DigestCalcResponse':
digestmd5.c:366: warning: pointer targets in passing argument 2 of 'utils->MD5Update' differ in signedness
digestmd5.c:366: note: expected 'const unsigned char *' but argument is of type 'char *'
digestmd5.c: At top level:
digestmd5.c:812: error: expected specifier-qualifier-list before 'des_key_schedule'
digestmd5.c: In function 'dec_3des':
digestmd5.c:849: warning: implicit declaration of function 'des_ede2_cbc_encrypt'
digestmd5.c:852: error: 'des_context_t' has no member named 'keysched'
digestmd5.c:853: error: 'des_context_t' has no member named 'keysched2'
digestmd5.c:854: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:855: error: 'DES_DECRYPT' undeclared (first use in this function)
digestmd5.c:855: error: (Each undeclared identifier is reported only once
digestmd5.c:855: error: for each function it appears in.)
digestmd5.c:842: warning: unused parameter 'digest'
digestmd5.c: In function 'enc_3des':
digestmd5.c:900: error: 'des_context_t' has no member named 'keysched'
digestmd5.c:901: error: 'des_context_t' has no member named 'keysched2'
digestmd5.c:902: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:903: error: 'DES_ENCRYPT' undeclared (first use in this function)
digestmd5.c: In function 'init_3des':
digestmd5.c:923: warning: implicit declaration of function 'des_key_sched'
digestmd5.c:923: error: 'des_cblock' undeclared (first use in this function)
digestmd5.c:923: error: expected expression before ')' token
digestmd5.c:927: error: expected expression before ')' token
digestmd5.c:929: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:936: error: expected expression before ')' token
digestmd5.c:940: error: expected expression before ')' token
digestmd5.c:943: error: 'des_context_t' has no member named 'ivec'
digestmd5.c: In function 'dec_des':
digestmd5.c:967: warning: implicit declaration of function 'des_cbc_encrypt'
digestmd5.c:970: error: 'des_context_t' has no member named 'keysched'
digestmd5.c:971: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:972: error: 'DES_DECRYPT' undeclared (first use in this function)
digestmd5.c:976: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:960: warning: unused parameter 'digest'
digestmd5.c: In function 'enc_des':
digestmd5.c:1021: error: 'des_context_t' has no member named 'keysched'
digestmd5.c:1022: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:1023: error: 'DES_ENCRYPT' undeclared (first use in this function)
digestmd5.c:1027: error: 'des_context_t' has no member named 'ivec'
digestmd5.c: In function 'init_des':
digestmd5.c:1047: error: 'des_cblock' undeclared (first use in this function)
digestmd5.c:1047: error: expected expression before ')' token
digestmd5.c:1049: error: 'des_context_t' has no member named 'ivec'
digestmd5.c:1056: error: expected expression before ')' token
digestmd5.c:1058: error: 'des_context_t' has no member named 'ivec'
digestmd5.c: In function 'dec_rc4':
digestmd5.c:1211: warning: unused parameter 'digest'
digestmd5.c: In function 'digestmd5_encode':
digestmd5.c:1401: warning: pointer targets in passing argument 5 of 'text->utils->hmac_md5' differ in signedness
digestmd5.c:1401: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c: In function 'digestmd5_decode_packet':
digestmd5.c:1492: warning: pointer targets in assignment differ in signedness
digestmd5.c: In function 'digestmd5_server_mech_new':
digestmd5.c:1792: warning: unused parameter 'challenge'
digestmd5.c:1793: warning: unused parameter 'challen'
digestmd5.c: In function 'digestmd5_server_mech_step1':
digestmd5.c:1942: warning: pointer targets in passing argument 6 of 'add_to_challenge' differ in signedness
digestmd5.c:505: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:1815: warning: unused parameter 'clientin'
digestmd5.c:1816: warning: unused parameter 'clientinlen'
digestmd5.c:1819: warning: unused parameter 'oparams'
digestmd5.c: In function 'digestmd5_server_mech_step2':
digestmd5.c:2230: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2233: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2254: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/usr/include/string.h:399: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2254: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2254: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2254: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/usr/include/string.h:399: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2254: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2254: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2254: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2254: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2254: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2254: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/usr/include/string.h:399: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/usr/include/string.h:399: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 2 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/usr/include/string.h:399: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 2 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/usr/include/string.h:399: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 2 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2266: warning: pointer targets in passing argument 2 of '__builtin_strcmp' differ in signedness
digestmd5.c:2266: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2331: warning: pointer targets in passing argument 1 of '__builtin_strncpy' differ in signedness
digestmd5.c:2331: note: expected 'char *' but argument is of type 'unsigned char *'
digestmd5.c:2349: warning: pointer targets in passing argument 2 of 'DigestCalcSecret' differ in signedness
digestmd5.c:430: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2349: warning: pointer targets in passing argument 3 of 'DigestCalcSecret' differ in signedness
digestmd5.c:430: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2494: warning: pointer targets in passing argument 2 of 'text->cipher_init' differ in signedness
digestmd5.c:2494: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2494: warning: pointer targets in passing argument 3 of 'text->cipher_init' differ in signedness
digestmd5.c:2494: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2698:15: error: #elif with no expression
digestmd5.c: In function 'make_client_response':
digestmd5.c:2990: warning: pointer targets in passing argument 3 of 'calculate_response' differ in signedness
digestmd5.c:2831: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2990: warning: pointer targets in passing argument 11 of 'calculate_response' differ in signedness
digestmd5.c:2831: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3014: warning: pointer targets in passing argument 6 of 'add_to_challenge' differ in signedness
digestmd5.c:505: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3125: warning: pointer targets in passing argument 2 of 'text->cipher_init' differ in signedness
digestmd5.c:3125: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3125: warning: pointer targets in passing argument 3 of 'text->cipher_init' differ in signedness
digestmd5.c:3125: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c: In function 'digestmd5_client_mech_step1':
digestmd5.c:3712: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:3715: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:3683: warning: unused parameter 'serverin'
digestmd5.c:3684: warning: unused parameter 'serverinlen'
digestmd5.c: In function 'digestmd5_client_mech_step3':
digestmd5.c:3818: warning: unused parameter 'prompt_need'
digestmd5.c:3819: warning: unused parameter 'clientout'
digestmd5.c:3820: warning: unused parameter 'clientoutlen'
digestmd5.c: In function 'digestmd5_client_mech_step':
digestmd5.c:3980: warning: pointer targets in assignment differ in signedness
digestmd5.c:4017:15: error: #elif with no expression
make[2]: *** [digestmd5.lo] Error 1
make[2]: Leaving directory `/root/cyrus-sasl-2.1.21/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/cyrus-sasl-2.1.21'
make: *** [all] Error 2

Google了一下,找到一段回帖。
Did you read this
http://www.linuxfromscratch.org/blfs...yrus-sasl.html

Your configure options are wrong.
Please omit "--with-openssl=/usr --with-mysql=/usr"
( Probably use the suggested 'configure' strictly as it is.)

And the "sed entry" is required for bug fixing :
code:

sed -i.bak 's/#elif WITH_DES/#elif defined(WITH_DES)/' \
plugins/digestmd5.c
修改的是cyrus-sasl-2.1.21/plugins/digestmd5.c
在编译出现下面的错误:
auth_getpwent.c:48:20: des.h: No such file or directory
make[3]: *** [auth_getpwent.o] Error 1
make[3]: Leaving directory `/root/cyrus-sasl-2.1.21/saslauthd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/cyrus-sasl-2.1.21/saslauthd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/cyrus-sasl-2.1.21'
make: *** [all] Error 2
  修改/root/cyrus-sasl-2.1.21/saslauthd/Makefiles内的变量CFLAGS添加-I/opt/openssl/include/openssl
或者直接
mail~#cp /root/cyrus-sasl-2.1.21/mac/libdes/public/des.h /root/cyrus-sasl-2.1.21/
mail~#make
mail~#make install
mail~#vi /etc/ld.so.conf #添加以下内容
/usr/lib/sals2
/opt/sasl2/lib/sasl2
mail~#ldconfig
本文出自 “闲逛之” 博客,请务必保留此出处http://lk1273.blog.51cto.com/2313775/823571
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐