From: <no...@so...> - 2001-11-27 06:03:31
|
Bugs item #218110, was opened at 2000-10-25 17:53 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=218110&group_id=10894 Category: 49. Configure and Build Tools >Group: 8.3.4 >Status: Open >Resolution: Remind Priority: 2 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Mo DeJong (mdejong) >Summary: 'gcc -Wl,-rpath' breaks 'make test' Initial Comment: OriginalBugID: 1896 Bug Version: 8.1b3 SubmitDate: '1999-04-19' LastModified: '1999-08-13' Severity: SER Status: Closed Submitter: pat ChangedBy: hobbs RelatedBugIDs: 957 1951 2195 1409 OS: Other OSVersion: RedHat Linux on Alpha XL 300 Machine: NA FixedDate: '2000-10-25' FixedInVersion: NA ClosedDate: '1999-08-13' Name: Don Porter ObservedBehavior: I already have Tcl 8.1b2 installed under /usr/local . Download and build Tcl 8.1b3: $ cd tcl8.1b3/unix $ ./configure --enable-gcc --enable-shared $ make runtest ... gcc -pipe -rdynamic tclTestInit.o tclTest.o tclTestObj.o tclTestProcBodyObj.o tclThreadTest.o tclUnixTest.o -L/homeitl/dgp/tcl8.1b3/unix -ltcl8.1 -ldl -lm -lc -Wl,-rpath,/usr/local/lib -o tcltest LD_LIBRARY_PATH=`pwd`:; export LD_LIBRARY_PATH; SHLIB_PATH=`pwd`:; export SHLIB_PATH; TCL_LIBRARY="/homeitl/dgp/tcl8.1b3/library"; export TCL_LIBRARY; ./tcltest % info patch 8.1b2 DesiredBehavior: I want 'make runtest' and 'make test' to test the Tcl 8.1b3 library that I just built, *not* the Tcl 8.1b2 library installed as /usr/local/lib/libtcl8.1.so, which the new library will overwrite when it is installed. Because tcl8.1b3/unix/tcltest is linked with -Wl,-rpath,/usr/local/lib, the path /usr/local/lib is embedded in tcltest as the first place to look for the libtcl8.1.so shared library it needs. The -rpath apparently overrides the setting of LD_LIBRARY_PATH made when calling tcltest which attempts to direct tcltest to use the libtcl8.1.so in the current directory. So, tcltest loads /usr/local/lib/libtcl8.1.so, which is the 8.1b2 library. The upshot is that 'make test' actually tests the old, installed library and probably crashes, either because a new test reveals a crash in the old library, or because there are symbols missing in the old library which the new tcltest expects to find. The quick workaround is to advise all installers that they must run 'make install' before running 'make test', though that seems backwards. One would rather test before installing. In the longer term, this issue needs more careful thinking through. Testing in the build directory always been awkward (look at all those environment variable settings just trying to make it work!), and it's not getting better. Perhaps tclsh and tcltest could be linked differently? Use -rpath for tclsh, but not for tcltest? -Wl,-rpath are necessary for normal operations. This confusion may occur when users are dealing with minor version releases. See the related bug reports for the counter to this argument. -- 08/13/1999 hobbs ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2001-11-26 22:03 Message: Logged In: YES user_id=80530 I'm re-opening this report because this issue is still present in Tcl 8.3.4 and is still leading to false bug reports. The latest: http://sf.net/tracker/index.php?func=detail&aid=485334&group_id=10894&atid=110894 Some possible solutions: 1) Actually use different real names for the shared library of each patch release of Tcl, and link the tcltest executable against the real name, and tclsh against the soname; OR 2) Always build the tcltest executable with the --disable-shared configuration; OR 3) Whatever brilliant ideas Mo has to offer. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=110894&aid=218110&group_id=10894 |