The "fix" for this ebuild (present in libesmtp-1.0-r1) for gcc 2.95.3 was in bug 20199, and made it into the ebuild, however this change seems to have broken the ebuild for gcc 3.3. Note that the previous ebuild (1.0) does compile properly. It fails with: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -pthread -std=c99 -pedantic -march=athlon-xp -O3 -mmmx -msse -m3dnow -mfpmath=sse -pipe -fomit-frame-pointer -fforce-addr -funroll-loops -frerun-loop-opt -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-promo -c ntlmdes.c -fPIC -DPIC -o .libs/ntlmdes.lo cc1: warning: "-Wsign-promo" is valid for C++ but not for C/ObjC cc1: warning: "-Wsign-promo" is valid for C++ but not for C/ObjC ntlmdes.c: In function `lm_deshash': ntlmdes.c:64: error: incompatible types in initialization ntlmdes.c:64: error: incompatible types in initialization ntlmdes.c:64: error: incompatible types in initialization ntlmdes.c:64: error: incompatible type for argument 1 of `memset' make[2]: *** [ntlmdes.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/libesmtp-1.0-r1/work/libesmtp-1.0/ntlm' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/libesmtp-1.0-r1/work/libesmtp-1.0' make: *** [all-recursive-am] Error 2 !!! ERROR: net-libs/libesmtp-1.0-r1 failed. !!! Function src_compile, Line 42, Exitcode 2 !!! emake failed
Please try to compile cvs version 1.2 of the libesmtp-1.0-r1 ebuild.
The 1.2 CVS version didn't fix the problem. I tracked this down a little more - to --enable-ntlm (enabled by the --enable-all added in -r1) to an OpenSSL 0.9.7 compatibility issue. Because 'des_key_schedule' has changed (actually, it no longer exists in 0.9.7 - it changed to DES_key_schedule), the code on line 64 of ntlm no longer works - I even tried loading 0.9.7's "old" des support which does provide des_key_schedule, but apparently that still had changed slightly from 0.9.6. However, I do have a fix - changing line 64: memset (ks, 0, sizeof ks); to: bzero (ks, sizeof ks); appears to fix the problem - and bzero should do the same thing as memset with 0 for the second argument. Why bzero works where memset fails I don't know - however the attached patch fixes the problem. Applying it in the ebuild should fix the problem.
Created attachment 15772 [details, diff] Fix for ntlm with openssl 0.9.7
Oops, I meant line 64 of ntlm/ntlmdes.c in comment 2.
Created attachment 15781 [details, diff] Updated libesmtp patch A collegue of mine pointed out that bzero is deprecated; this is the "better" patch - it changes ``memset (ks, 0, sizeof ks);'' to ``memset (&ks, 0, sizeof ks);''
Patch added to 1.0-r1. Thanks for finding this!