Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.411 (Entity 5.404) X-RT-Original-Encoding: iso-8859-1 Content-Length: 7264 From krb5-bugs-incoming-bounces@PCH.mit.edu Tue Mar 29 18:17:22 2005 Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90]) by krbdev.mit.edu (8.9.3p2) with ESMTP id SAA13201; Tue, 29 Mar 2005 18:17:22 -0500 (EST) Received: from pch.mit.edu (pch.mit.edu [127.0.0.1]) by pch.mit.edu (8.12.8p2/8.12.8) with ESMTP id j2TNGqh7020617 for ; Tue, 29 Mar 2005 18:16:52 -0500 Received: from pacific-carrier-annex.mit.edu (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.7.21.83]) by pch.mit.edu (8.12.8p2/8.12.8) with ESMTP id j2TA3rh7000521 for ; Tue, 29 Mar 2005 05:03:53 -0500 Received: from afstest.ucs.ualberta.ca (afstest.ucs.ualberta.ca [129.128.5.35])j2TA3kIO022877 for ; Tue, 29 Mar 2005 05:03:46 -0500 (EST) Received: (from antoine@localhost) by afstest.ucs.ualberta.ca (8.11.7p1+Sun/8.11.6) id j2TA3jN03876; Tue, 29 Mar 2005 03:03:45 -0700 (MST) Date: Tue, 29 Mar 2005 03:03:45 -0700 (MST) Message-Id: <200503291003.j2TA3jN03876@afstest.ucs.ualberta.ca> To: krb5-bugs@mit.edu From: antoine.verheijen@ualberta.ca X-send-pr-version: 3.99 X-Spam-Score: -4.74 X-Spam-Flag: NO X-Scanned-By: MIMEDefang 2.42 X-Mailman-Approved-At: Tue, 29 Mar 2005 18:16:51 -0500 Subject: libk5crypto.a on Solaris (CORRECTION) X-BeenThere: krb5-bugs-incoming@mailman.mit.edu X-Mailman-Version: 2.1 Precedence: list Reply-To: antoine.verheijen@ualberta.ca Sender: krb5-bugs-incoming-bounces@PCH.mit.edu Errors-To: krb5-bugs-incoming-bounces@PCH.mit.edu >Submitter-Id: net >Originator: Antoine Verheijen >Organization: University of Alberta >Confidential: no >Synopsis: Static version of k5crypto library complains when used in Solaris >Severity: non-critical >Priority: low >Category: krb5-libs >Class: change-request >Release: 1.4 >Environment: Sun, Solaris 8, sparc System: SunOS afstest 5.8 Generic_117350-19 sun4u sparc SUNW,UltraAX-i2 Architecture: sun4 >Description: PLEASE NOTE: This message repeats an earlier one I send but corrects the included suggested fix which was faulty in the earlier message. Please accept my apologies! We use both the static and shared versions of the MIT krb5 libraries. The static version of k5crypto (libk5crypto.a) produces the following complaint when used on a Solaris machine: ild: the archive /usr/local/lib/libk5crypto.a has entries with the same name -- consistency checks during incremental links are not possible for these entries This results because there are two arcfour.o files (lib/crypto/enc_provider/arcfour.o and lib/crypto/arcfour/arcfour.o) and two string_to_key.o files (lib/crypto/string_to_key.o and lib/crypto/arcfour/string_to_key.o) used to build the k5crypto library. The actual symbols provided by each duplicate file name are different. The library still works ... but the complaint message is distracting. The "problem" does not affect the shared library. >How-To-Repeat: Link any program requiring use of the k5crypto library, such as "kinit", with the static libraries instead of the shared libraries. >Fix: The easiest way to correct this is to rename the files in src/lib/crypto/arcfour. This would also require a few minor changes in some of the files. The following small script would provided the appropriate changes. Admittedly, the header files don't need to be renamed but it provides for consistency. ------------------------------------------------------------------------------------- #!/bin/sh # Change to arcfour directory. cd src/lib/crypto/arcfour # Patch any files before renaming them. patch -p4 << .EOF diff -u -r src-/lib/crypto/arcfour/Makefile.in src/lib/crypto/arcfour/Makefile.in --- src-/lib/crypto/arcfour/Makefile.in 2004-04-24 16:23:19.000001000 -0600 +++ src/lib/crypto/arcfour/Makefile.in 2005-03-28 22:09:56.000004000 -0700 @@ -14,16 +14,16 @@ RUN_SETUP = @KRB5_RUN_ENV@ KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf STLIBOBJS=\\ - arcfour.o \\ - string_to_key.o + arc4.o \\ + arc4_string_to_key.o OBJS=\\ - $(OUTPRE)arcfour.$(OBJEXT) \\ - $(OUTPRE)string_to_key.$(OBJEXT) + $(OUTPRE)arc4.$(OBJEXT) \\ + $(OUTPRE)arc4_string_to_key.$(OBJEXT) SRCS=\\ - $(srcdir)/arcfour.c \\ - $(srcdir)/string_to_key.c + $(srcdir)/arc4.c \\ + $(srcdir)/arc4_string_to_key.c ##DOS##LIBOBJS = $(OBJS) @@ -42,17 +42,17 @@ # Makefile dependencies follow. This must be the last section in # the Makefile.in file # -arcfour.so arcfour.po $(OUTPRE)arcfour.$(OBJEXT): arcfour.c $(SRCTOP)/include/k5-int.h \\ +arc4.so arc4.po $(OUTPRE)arc4.$(OBJEXT): arc4.c $(SRCTOP)/include/k5-int.h \\ $(BUILDTOP)/include/krb5/osconf.h $(BUILDTOP)/include/krb5/autoconf.h \\ $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \\ $(BUILDTOP)/include/krb5.h $(COM_ERR_DEPS) $(BUILDTOP)/include/profile.h \\ $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \\ - $(SRCTOP)/include/krb5/kdb.h arcfour-int.h arcfour.h -string_to_key.so string_to_key.po $(OUTPRE)string_to_key.$(OBJEXT): string_to_key.c $(SRCTOP)/include/k5-int.h \\ + $(SRCTOP)/include/krb5/kdb.h arc4-int.h arc4.h +arc4_string_to_key.so arc4_string_to_key.po $(OUTPRE)arc4_string_to_key.$(OBJEXT): arc4_string_to_key.c $(SRCTOP)/include/k5-int.h \\ $(BUILDTOP)/include/krb5/osconf.h $(BUILDTOP)/include/krb5/autoconf.h \\ $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-thread.h \\ $(BUILDTOP)/include/krb5.h $(COM_ERR_DEPS) $(BUILDTOP)/include/profile.h \\ $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \\ $(SRCTOP)/include/krb5/kdb.h $(srcdir)/../md4/rsa-md4.h \\ - arcfour-int.h arcfour.h + arc4-int.h arc4.h diff -u -r src-/lib/crypto/arcfour/arcfour-int.h src/lib/crypto/arcfour/arcfour-int.h --- src-/lib/crypto/arcfour/arcfour-int.h 2001-11-06 08:25:48.000001000 -0700 +++ src/lib/crypto/arcfour/arcfour-int.h 2005-03-28 22:11:50.000002000 -0700 @@ -9,7 +9,7 @@ #ifndef ARCFOUR_INT_H #define ARCFOUR_INT_H -#include "arcfour.h" +#include "arc4.h" #define CONFOUNDERLENGTH 8 diff -u -r src-/lib/crypto/arcfour/arcfour.c src/lib/crypto/arcfour/arcfour.c --- src-/lib/crypto/arcfour/arcfour.c 2004-02-18 19:46:26.000001000 -0700 +++ src/lib/crypto/arcfour/arcfour.c 2005-03-28 22:10:23.000002000 -0700 @@ -7,7 +7,7 @@ */ #include "k5-int.h" -#include "arcfour-int.h" +#include "arc4-int.h" static const char *const l40 = "fortybits"; void diff -u -r src-/lib/crypto/arcfour/string_to_key.c src/lib/crypto/arcfour/string_to_key.c --- src-/lib/crypto/arcfour/string_to_key.c 2004-09-21 14:39:19.000001000 -0600 +++ src/lib/crypto/arcfour/string_to_key.c 2005-03-28 22:10:44.000002000 -0700 @@ -1,6 +1,6 @@ #include "k5-int.h" #include "rsa-md4.h" -#include "arcfour-int.h" +#include "arc4-int.h" static void asctouni(unsigned char *unicode, unsigned char *ascii, size_t len) { .EOF # Rename files. mv arcfour-int.h arc4-int.h mv arcfour.c arc4.c mv arcfour.h arc4.h mv string_to_key.c arc4_string_to_key.c -------------------------------------------------------------------------------------