Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3028 closed defect (fixed)

Error compiling Cyrus-sasl with digestmd5.c

Reported by: Maginot Owned by: Randy McMurchy
Priority: high Milestone:
Component: BOOK Version: SVN
Severity: major Keywords: Cyrus-sasl, digestmd5.c
Cc:

Description

When compiling Cyrus-sasl following the BLFS book an error with digestmd5.c is displayed in the make phase.

# make (...) if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../lib -I../sasldb -I../include -Wall -W -g -O2 -MT digestmd5.lo -MD -MP -MF ".deps/digestmd5.Tpo" \

-c -o digestmd5.lo test -f 'digestmd5.c' || echo './'digestmd5.c; \

then mv ".deps/digestmd5.Tpo" ".deps/digestmd5.Plo"; \ else rm -f ".deps/digestmd5.Tpo"; exit 1; \ fi

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../lib -I../sasldb -I../include -Wall -W -g -O2 -MT digestmd5.lo -MD -MP -MF .deps/digestmd5.Tpo -c digestmd5.c -fPIC -DPIC -o digestmd5.lo 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: In function 'dec_3des': digestmd5.c:842: warning: unused parameter 'digest' digestmd5.c: In function 'dec_des': digestmd5.c:960: warning: unused parameter 'digest' 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:1497: warning: pointer targets in assignment differ in signedness digestmd5.c: In function 'digestmd5_server_mech_new': digestmd5.c:1797: warning: unused parameter 'challenge' digestmd5.c:1798: warning: unused parameter 'challen' digestmd5.c: In function 'digestmd5_server_mech_step1': digestmd5.c:1947: 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:1820: warning: unused parameter 'clientin' digestmd5.c:1821: warning: unused parameter 'clientinlen' digestmd5.c:1824: warning: unused parameter 'oparams' digestmd5.c: In function 'digestmd5_server_mech_step2': digestmd5.c:2235: 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:2238: 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:2274: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /usr/include/string.h:397: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2274: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2274: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2274: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /usr/include/string.h:397: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2274: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2274: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2274: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2274: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2274: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2274: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /usr/include/string.h:397: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /usr/include/string.h:397: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 2 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /usr/include/string.h:397: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 2 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness /usr/include/string.h:397: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 2 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2286: warning: pointer targets in passing argument 2 of 'builtin_strcmp' differ in signedness digestmd5.c:2286: note: expected 'const char *' but argument is of type 'unsigned char *' digestmd5.c:2351: warning: pointer targets in passing argument 1 of 'builtin_strncpy' differ in signedness digestmd5.c:2351: note: expected 'char *' but argument is of type 'unsigned char *' digestmd5.c:2369: 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:2369: 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:2514: warning: pointer targets in passing argument 2 of 'text->cipher_init' differ in signedness digestmd5.c:2514: note: expected 'unsigned char *' but argument is of type 'char *' digestmd5.c:2514: warning: pointer targets in passing argument 3 of 'text->cipher_init' differ in signedness digestmd5.c:2514: note: expected 'unsigned char *' but argument is of type 'char *' digestmd5.c:2718:15: error: #elif with no expression digestmd5.c: In function 'make_client_response': digestmd5.c:3010: warning: pointer targets in passing argument 3 of 'calculate_response' differ in signedness digestmd5.c:2851: note: expected 'unsigned char *' but argument is of type 'char *' digestmd5.c:3010: warning: pointer targets in passing argument 11 of 'calculate_response' differ in signedness digestmd5.c:2851: note: expected 'unsigned char *' but argument is of type 'char *' digestmd5.c:3034: 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:3145: warning: pointer targets in passing argument 2 of 'text->cipher_init' differ in signedness digestmd5.c:3145: note: expected 'unsigned char *' but argument is of type 'char *' digestmd5.c:3145: warning: pointer targets in passing argument 3 of 'text->cipher_init' differ in signedness digestmd5.c:3145: note: expected 'unsigned char *' but argument is of type 'char *' digestmd5.c: In function 'digestmd5_client_mech_step1': digestmd5.c:3732: 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:3735: 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:3703: warning: unused parameter 'serverin' digestmd5.c:3704: warning: unused parameter 'serverinlen' digestmd5.c: In function 'digestmd5_client_mech_step3': digestmd5.c:3838: warning: unused parameter 'prompt_need' digestmd5.c:3839: warning: unused parameter 'clientout' digestmd5.c:3840: warning: unused parameter 'clientoutlen' digestmd5.c: In function 'digestmd5_client_mech_step': digestmd5.c:4000: warning: pointer targets in assignment differ in signedness digestmd5.c:4037:15: error: #elif with no expression make[2]: [digestmd5.lo] Erro 1 make[2]: Saindo do diretório `/sources/sources2/X/gnome-2.28/cyrus-sasl-2.1.22/plugins' make[1]: [all-recursive] Erro 1 make[1]: Saindo do diretório `/sources/sources2/X/gnome-2.28/cyrus-sasl-2.1.22' make: [all] Erro 2

The fix to this issue is found on CBLFS in the cyrus compiling topic, which is with this sed command: sed -i "/elif/s/WITH_DES/defined &/" plugins/digestmd5.c

After this the error doesn't come to happen again.

This error seens to happen with cyrus-sasl-2.1.22 and cyrus-sasl-2.1.23 (version used on CBLFS) I don't know if this come to happen to other versions... mayber this fix could be post in the Users Wiki in the Cyrus-sasl topic.

Change History (5)

comment:1 by Ag. Hatzimanikas, 12 years ago

See gcc bug:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36320

The compiler now (gcc-4.4*), evaluates #elif arguments to be valid expressions, even if previous #if/#elif are evaluated to non-zero.

See also:

http://cvs.fedoraproject.org/viewvc/rpms/cyrus-sasl/devel/cyrus-sasl-2.1.22-bad-elif.patch?view=markup

comment:2 by willimm, 12 years ago

Also see this mailing list thread in which I ran into this very same probrem and created a sed to fix it:

http://linuxfromscratch.org/pipermail/blfs-dev/2009-August/019801.html

The sed I used:

sed -i "s/#define WITH_DES/& 1/" {saslauthd/,}configure

This also worked:

sed 's@#elif WITH_DES$@#elif defined(WITH_DES)@ src/digest-md5.c

comment:3 by Randy McMurchy, 12 years ago

Owner: changed from blfs-book@… to Randy McMurchy
Status: newassigned

comment:4 by Randy McMurchy, 12 years ago

Resolution: fixed
Status: assignedclosed

Updated Cyrus-SASL to 2.1.23 (problem still exists).

Added a sed command to fix the problem.

comment:5 by (none), 12 years ago

Milestone: 6.5

Milestone 6.5 deleted

Note: See TracTickets for help on using tickets.