Skip Menu |
 

From: Ken Raeburn <raeburn@raeburn.org>
To: krb5-bugs@mit.edu
Subject: two bugs in tcl-based tests
Date: Thu, 24 Oct 2002 17:12:04 -0400
Download (untitled) / with headers
text/plain 2.7KiB
When building the test programs that use the Tcl library, we need to
incorporate TCL_LD_SEARCH_FLAGS from tclConfig.sh into the link
command. Otherwise, the programs can fail during "make check".

In tclConfig.sh:
# Flags to pass to ld, such as "-R /usr/local/tcl/lib", that tell the
# run-time dynamic linker where to look for shared libraries such as
# libtcl.so. Used when linking applications. Only works if there
# is a variable "LIB_RUNTIME_DIR" defined in the Makefile.
TCL_LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'

In my nightly Solaris build:
gcc -L../../../lib -L/mit/krbdev/arch/sun4x_58/v7/lib -o ovsec_kadm_clnt_tcl tcl_ovsec_kadm.o tcl_kadm5.o test.o \
-lkadm5clnt -lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lsocket -lnsl -lresolv -L/mit/krbdev/arch/sun4x_58/v7/lib -ltcl8.3 -ldl -lsocket -lnsl -lm -ldl

In the "make check" output:
ld.so.1: /var/krbsnap/autobuild/work-20021024.0400/krb5-current/src/kadmin/../kadmin/testing/util/ovsec_kadm_srv_tcl: fatal: libtcl8.3.so: open failed: No such file or directory
Killed



Secondary bug:

The above failure seems to be ignored, and "make check" marches right
along into running dejagnu, which of course chokes:

making check in lib/rpc...
making check in lib/rpc/unit-test...
../../../kadmin/testing/scripts/env-setup.sh ./../../../kadmin/testing/scripts/start_servers
/var/krbsnap/autobuild/work-20021024.0400/krb5-current/src/kadmin/./../kadmin/testing/scripts/stop_servers_local: kill: permission denied
ld.so.1: /var/krbsnap/autobuild/work-20021024.0400/krb5-current/src/kadmin/../kadmin/testing/util/ovsec_kadm_srv_tcl: fatal: libtcl8.3.so: open failed: No such file or directory
Killed
ld.so.1: /var/krbsnap/autobuild/work-20021024.0400/krb5-current/src/kadmin/../kadmin/testing/util/ovsec_kadm_srv_tcl: fatal: libtcl8.3.so: open failed: No such file or directory
Killed
RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab ../../../kadmin/testing/scripts/env-setup.sh \
runtest --debug --srcdir . --host sparc-sun-solaris2.8 SERVER=./server CLIENT=./client \
KINIT=../../../clients/kinit/kinit \
KDESTROY=../../../clients/kdestroy/kdestroy \
PASS="tcp udp" --tool rpc_test
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
Test Run By krbsnap on Thu Oct 24 04:44:34 2002
Native configuration is sparc-sun-solaris2.8

=== rpc_test tests ===

Schedule of variations:
unix

Running target unix
Using /u1/kr/gnu/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /u1/kr/gnu/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
TOP=/var/krbsnap/autobuild/work-20021024.0400/krb5-current/src/kadmin/../kadmin
ERROR: unexpected output {l} from subprocess, expecting tcl prompt
We've got TCL_RPATH already, though it's not used enough. Perhaps using
it in more places would be adequate. Maybe in theory not quite so
portable across platforms, but it doesn't tie us to using the same
compiler as TCL_LD_SEARCH_FLAGS can (e.g., "-Wl,-R,foo").
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #1228] two bugs in tcl-based tests
From: Tom Yu <tlyu@mit.edu>
Date: Wed, 30 Oct 2002 17:33:37 -0500
RT-Send-Cc:
Show quoted text
>>>>> "raeburn" == Ken Raeburn via RT <rt-comment@krbdev.mit.edu> writes:

Show quoted text
raeburn> We've got TCL_RPATH already, though it's not used enough.
raeburn> Perhaps using it in more places would be adequate. Maybe in
raeburn> theory not quite so portable across platforms, but it doesn't
raeburn> tie us to using the same compiler as TCL_LD_SEARCH_FLAGS can
raeburn> (e.g., "-Wl,-R,foo").

Part of the problem is that TCL_RPATH only gets used inside
CC_LINK_SHARED. CC_LINK gets set to $(CC_LINK_SHARED) only if you're
building shared krb5 libs. If you have a shared tcl lib and aren't
building shared krb5 libs, I can see how it would fail.

The easy solution to this would depend on whether it being possible to
have multiple -R or other equivalent RPATH flags concatentate on one
compiler command line. More difficult solutions exist, but they
involve things like making a special CC_LINK_TCL_PROG variable or
something like that.

---Tom
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #1228] two bugs in tcl-based tests
From: Ken Raeburn <raeburn@MIT.EDU>
Date: Wed, 30 Oct 2002 18:02:17 -0500
RT-Send-Cc:
Yes, this is a build with --disable-shared using a Tcl installation
with shared libraries.
From: tlyu@mit.edu
Subject: CVS Commit
New Makefile variable RPATH_FLAG, possibly used even when we're not
building shared libs. TCL_MAYBE_RPATH gets used to account for
linking a shared tcl lib when we're not building shared libs.


To generate a diff of this commit:



cvs diff -r5.381 -r5.382 krb5/src/ChangeLog
cvs diff -r1.244 -r1.245 krb5/src/aclocal.m4
cvs diff -r5.169 -r5.170 krb5/src/config/ChangeLog
cvs diff -r1.83 -r1.84 krb5/src/config/pre.in
cvs diff -r5.8 -r5.9 krb5/src/config/shlib.conf
cvs diff -r1.35 -r1.36 krb5/src/kadmin/testing/util/ChangeLog
cvs diff -r1.19 -r1.20 krb5/src/kadmin/testing/util/Makefile.in
From: tlyu@mit.edu
Subject: CVS Commit
Fix TCL_RPATH to explicitly insert system library path into
"-blibpath:" on AIX.


To generate a diff of this commit:



cvs diff -r5.382 -r5.383 krb5/src/ChangeLog
cvs diff -r1.245 -r1.246 krb5/src/aclocal.m4
cvs diff -r5.171 -r5.172 krb5/src/config/ChangeLog
cvs diff -r5.9 -r5.10 krb5/src/config/shlib.conf