Skip Menu |
 

Download (untitled) / with headers
text/plain 8.2KiB
From crossd@cs.rpi.edu Wed Jun 21 16:18:10 2000
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2])
by rt-11.mit.edu (8.9.3/8.9.3) with SMTP id QAA00067
for <bugs@RT-11.MIT.EDU>; Wed, 21 Jun 2000 16:18:09 -0400 (EDT)
Received: from mumble.cs.rpi.edu by MIT.EDU with SMTP
id AA12277; Wed, 21 Jun 00 16:17:47 EDT
Received: from bill.cs.rpi.edu (bill.cs.rpi.edu [128.213.2.2])
by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id QAA46958;
Wed, 21 Jun 2000 16:18:03 -0400 (EDT)
Received: (from crossd@localhost)
by bill.cs.rpi.edu (8.9.3+Sun/8.9.3) id QAA16668;
Wed, 21 Jun 2000 16:18:03 -0400 (EDT)
Message-Id: <200006212018.QAA16668@bill.cs.rpi.edu>
Date: Wed, 21 Jun 2000 16:18:03 -0400 (EDT)
From: "David E. Cross" <crossd@cs.rpi.edu>
Reply-To: crossd@cs.rpi.edu
To: krb5-bugs@MIT.EDU
Cc: crossd@cs.rpi.edu
Subject: Shared Libraries under FreeBSD4.x
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 863
>Category: krb5-build
>Synopsis: Shared libraries are not correctly built under FreeBSD
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: tlyu
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Wed Jun 21 16:19:01 EDT 2000
>Last-Modified: Thu Jun 22 15:35:00 EDT 2000
>Originator: David E. Cross
>Organization:
Computer Science Laboratory, Rensselaer Polytechnic Institute
Show quoted text
>Release: krb5-1.2-beta4
>Environment:

System: FreeBSD gemini.crossd.cs.rpi.edu 4.0-STABLE FreeBSD 4.0-STABLE #0: Wed J
un 21 13:15:07 EDT 2000 root@gemini.crossd.cs.rpi.edu:/usr/src/sys/compile/GEMIN
I i386


Show quoted text
>Description:
Upon building mit-krb5 and installing into a directory that has not
been ldconfig(8)-ed, or installing multiple versions of krb5 on the
same system, either no shared libraries are found, or the incorrect
libraries for a build.
Show quoted text
>How-To-Repeat:
Build to a non-standard place, attempt to execute any shared library
program, like kdb5_util
Show quoted text
>Fix:
The configure script sets CC_LINK_SHARED to include '-Wl,-rpath
-Wl,-R$(PROG_PATH)'. Note that -rpath has no path to it. Removing
'-Wl,-rpath' entirely appears to fix this problem.

Note: I am unable to fully test this as I am not cluefull with
autoconf and the .m4 files to be able to regenerate all of the
'configure' scripts in all of the subdirectories. I can verify, by
hand, that linking with '-Wl,-rpath -Wl,-R/usr/rpics/lib' will not
embed the correct path into the object files, and
'-Wl,-R/usr/rpics' does work correctly.


Show quoted text
>Audit-Trail:

From: Tom Yu <tlyu@MIT.EDU>
To: crossd@cs.rpi.edu
Cc: krb5-bugs@MIT.EDU
Subject: Re: krb5-build/863: Shared Libraries under FreeBSD4.x
Date: 21 Jun 2000 18:05:15 -0400

Show quoted text
>>>>> "crossd" == David E Cross <crossd@cs.rpi.edu> writes:

Show quoted text
crossd> The configure script sets CC_LINK_SHARED to include
crossd> '-Wl,-rpath -Wl,-R$(PROG_PATH)'. Note that -rpath has no path
crossd> to it. Removing '-Wl,-rpath' entirely appears to fix this
crossd> problem.

Show quoted text
crossd> Note: I am unable to fully test this as I am not cluefull with
crossd> autoconf and the .m4 files to be able to regenerate all of the
crossd> 'configure' scripts in all of the subdirectories. I can
crossd> verify, by hand, that linking with '-Wl,-rpath
crossd> -Wl,-R/usr/rpics/lib' will not embed the correct path into the
crossd> object files, and '-Wl,-R/usr/rpics' does work correctly.

Thanks for this fix. I've included a patch to aclocal.m4; please
check to see if it works. The procedure for regenerating the
configure scripts is (assuming you have gm4 installed):

cd src/util/autoconf
./configure && make
cd ../..
util/reconf

After that, it is likely best to configure and make in a fresh build
tree. Hopefully that will do the right thing. Please test this patch
soon, since we'd like to ship real soon now and I'd like to make sure
that this doesn't break anything.

---Tom

Index: aclocal.m4
===================================================================
RCS file: /cvs/krbdev/krb5/src/aclocal.m4,v
retrieving revision 1.177.2.5
diff -c -r1.177.2.5 aclocal.m4
*** aclocal.m4 2000/06/08 22:03:46 1.177.2.5
--- aclocal.m4 2000/06/21 21:59:54
***************
*** 1247,1253 ****
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
! CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,-R$(PROG_RPATH)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
--- 1247,1253 ----
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
! CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-R$(PROG_RPATH)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'

From: "David E. Cross" <crossd@cs.rpi.edu>
To: Tom Yu <tlyu@MIT.EDU>
Cc: crossd@cs.rpi.edu, krb5-bugs@MIT.EDU, crossd@cs.rpi.edu
Subject: Re: krb5-build/863: Shared Libraries under FreeBSD4.x
Date: Wed, 21 Jun 2000 23:32:14 -0400

I realized that I made a mistake in the fix that I gave you. The fix still
"works", but it is not "correct". I will test both tonight and get word to
you by morning; including the "correct" fix.

--
David Cross | email: crossd@cs.rpi.edu
Lab Director | Rm: 308 Lally Hall
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science | Fax: 518.276.4033
I speak only for myself. | WinNT:Linux::Linux:FreeBSD

From: "David E. Cross" <crossd@cs.rpi.edu>
To: Tom Yu <tlyu@MIT.EDU>
Cc: crossd@cs.rpi.edu, krb5-bugs@MIT.EDU, crossd@cs.rpi.edu
Subject: Re: krb5-build/863: Shared Libraries under FreeBSD4.x
Date: Thu, 22 Jun 2000 04:19:05 -0400

Ok, included below is the 'correct' diff from beta4. In short the
difference is:

old:
-Wl,-rpath -Wl,-R/path/to/libraries

new:
-Wl,-rpath -Wl,/path/to/libraries

That is to say "-R" has been removed. This makes it identical to the
other platforms (solaris, irix, linux). The -R was likely left in as a
typo from the modification from "aout". No one noticed (or cared) until
now since 'ldconfig' made it 'just work'. Since Kth Heimdal is now
included as an optional part of the base; and /usr/lib is mandated to be
searched first (unless you mess with the black magic ;) it came forward
as a problem (you get *really* interesting errors when you attempt to run
MIT krb5kdc against KTH Heimdal krb5 libraries ;)

As tested as I could do, I think a beta5, or RC1 would be good :)

*** aclocal.m4.old Thu Jun 22 03:57:18 2000
--- aclocal.m4 Thu Jun 22 03:57:42 2000
***************
*** 1247,1253 ****
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
! CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,-R$(PROG_RPATH)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
--- 1247,1253 ----
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
! CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'

--
David Cross | email: crossd@cs.rpi.edu
Lab Director | Rm: 308 Lally Hall
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science | Fax: 518.276.4033
I speak only for myself. | WinNT:Linux::Linux:FreeBSD

From: Tom Yu <tlyu@MIT.EDU>
To: "David E. Cross" <crossd@cs.rpi.edu>
Cc: krb5-bugs@MIT.EDU
Subject: Re: krb5-build/863: Shared Libraries under FreeBSD4.x
Date: 22 Jun 2000 15:34:00 -0400

Show quoted text
>>>>> "crossd" == David E Cross <crossd@cs.rpi.edu> writes:

Show quoted text
crossd> new:
crossd> -Wl,-rpath -Wl,/path/to/libraries

Ok thanks.

Show quoted text
crossd> (you get *really* interesting errors when you attempt to run
crossd> MIT krb5kdc against KTH Heimdal krb5 libraries ;)

I can imagine...

Show quoted text
crossd> As tested as I could do, I think a beta5, or RC1 would be good :)

Eh... we're kinda pressed for time, so there may not be a beta5. It
was broken to begin with; if it's not actively preventing compilation,
the worst case is that it's still broken the same way it was before, I
imagine.

---Tom
Show quoted text
>Unformatted: