Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21914 - libesmtp-1.0-r1 does not compile with openssl 0.9.7
Summary: libesmtp-1.0-r1 does not compile with openssl 0.9.7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 20199
Blocks:
  Show dependency tree
 
Reported: 2003-05-29 15:38 UTC by Jason Rhinelander
Modified: 2003-09-17 12:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for ntlm with openssl 0.9.7 (libesmtp.patch,352 bytes, patch)
2003-08-08 12:38 UTC, Jason Rhinelander
Details | Diff
Updated libesmtp patch (libesmtp.patch,354 bytes, patch)
2003-08-08 19:52 UTC, Jason Rhinelander
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Rhinelander 2003-05-29 15:38:13 UTC
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
Comment 1 Daniel Ahlberg (RETIRED) gentoo-dev 2003-08-08 05:10:53 UTC
Please try to compile cvs version 1.2 of the libesmtp-1.0-r1 ebuild. 
Comment 2 Jason Rhinelander 2003-08-08 12:37:20 UTC
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.
Comment 3 Jason Rhinelander 2003-08-08 12:38:18 UTC
Created attachment 15772 [details, diff]
Fix for ntlm with openssl 0.9.7
Comment 4 Jason Rhinelander 2003-08-08 12:39:41 UTC
Oops, I meant line 64 of ntlm/ntlmdes.c in comment 2.
Comment 5 Jason Rhinelander 2003-08-08 19:52:59 UTC
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);''
Comment 6 Daniel Ahlberg (RETIRED) gentoo-dev 2003-09-17 12:59:45 UTC
Patch added to 1.0-r1. Thanks for finding this!