Overview
| Artifact ID: | fd114133d0385fcd634b972fb67bfd081f9b5774 |
|---|---|
| Ticket: | 218110ffffffffffffffffffffffffffffffffff
'gcc -Wl,-rpath' breaks 'make test' |
| User & Date: | nobody on 2000-10-26 00:53:14 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
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 - foundin changed to: "obsolete: 8.1b3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "61. (unused)"
- title changed to: ""gcc -Wl,-rpath" breaks "make test""
- type changed to: "Bug"