Artifacts Associated With Ticket 218110
Ticket change [fd114133d0] (rid 108346) by nobody on 2000-10-26 00:53:14:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized 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 initialized to: "obsolete: 8.1b3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "61. (unused)"
- title initialized to: ""gcc -Wl,-rpath" breaks "make test""
- type initialized to: "Bug"
Ticket change [089b818470] (rid 89597) by welch on 2000-10-26 08:14:48:
- closedate changed to: "2000-10-26T01:14:48"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [7ac1cc8b7b] (rid 90391) by dgp on 2001-04-05 08:22:19:
- closedate changed to: "2001-04-05T01:22:19"
- closer changed to: "dgp"
- subsystem changed to: "53. Configuration and Build Tools"
- title changed to:
"gcc -Wl,-rpath" breaks "make test"
Ticket change [4c91f2b291] (rid 126913) by dgp on 2001-11-27 13:03:30:
- assignee changed to: "mdejong"
- foundin changed to: "obsolete: 8.3.4"
- icomment:
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. - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- status changed to: "Open"
- title changed to: "'gcc -Wl,-rpath' breaks 'make test'"
- username: "dgp"
Ticket change [200bcc8045] (rid 91247) by mdejong on 2001-12-19 18:57:57:
- icomment:
Logged In: YES user_id=90858 Here is my implementation of option 3. Basically, I just avoid using an executable with a burned in shared lib path. There is no reason to burn a shared library path into tcltest, so that problem is solved. As long as users run Tcl from the build dir via "make shell" then everyone will be happy. What do you think?
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Add attachment "build_tclsh.patch" [23c319f6da] (rid 130993) by mdejong on 2001-12-19 18:57:57.
Ticket change [82c7481334] (rid 117284) by mdejong on 2001-12-19 18:57:58:
- icomment:
File Added - 14914: build_tclsh.patch
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [610fe7bfbc] (rid 92182) by dgp on 2001-12-20 01:15:26:
- icomment:
Logged In: YES user_id=80530 It really feels like too much and too little at the same time. Leaving out the burned-in shared lib path in tcltest allows the LD_LIBRARY_PATH definition in 'make test' to control, so that 'make test' will work properly. However, when one wants to test just one test file: $ ./tcltest ../tests/append.test -verbose start and the already-installed Tcl library happens to be in the system load path, we still have the same problem of testing the wrong library. The workaround I've had to adopt is to always configure with --disable-shared when doing my development work. So: too little, doesn't fully solve the problem. On the "too much" side: I don't think it's reasonable to try to invent a new make pseudo-target for every activity someone might want to perform in the build area. It just doesn't feel like a solution to me; rather workaround piled on workaround. Besides, for all these pseudo-targets to be effective, we have to change the habits of everyone. Almost like forcing everyone to use a new language, rather than using the shell commands they already know. That's doomed to fail. Some of the README changes are good, and need to be done anyway. Also, removing @TCL_LD_SEARCH_FLAGS@ from the tcltest target will at least solve the problem with 'make test', which is probably 95% of the issue, so I'd support that change. The developers will still have to be aware of the problem and use --disable-shared.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "tcltest-real.patch" [a79dcccc6e] (rid 98836) by mdejong on 2001-12-20 03:47:17.
Ticket change [37d6759974] (rid 112097) by mdejong on 2001-12-20 03:47:17:
- icomment:
Logged In: YES user_id=90858 Well, I was assuming that people would not run the tcltest executable directly from the command line. They can run it from the Makefile via "make test" or "make runtest". Of course, there really is no reason we need to worry about burning in the build dir name into the shared lib path since the tcltest executable is not installed. If your concern is that too many people are used to running ./tcltest then the attached "quick and dirty" patch should do the trick in a more simple way. Of course, to really do this right would require some more serious hacking around in tcl.m4 to define some macros instead of this -R,-Wl with magic variable names junk. I don't think people running ./tclsh from the command line is a valid concern. They can just run "make shell" from the command line. We can't have an executable with a burned in path that works in both the build dir and the install dir.
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [c403dacf70] (rid 111772) by mdejong on 2001-12-20 03:47:19:
- icomment:
File Added - 14940: tcltest-real.patch
- login: "mdejong"
- mimetype: "text/plain"
- username: "mdejong"
- icomment:
Ticket change [fac10a63dd] (rid 91935) by dgp on 2001-12-20 09:50:03:
- icomment:
Logged In: YES user_id=80530 The quick and dirty patch makes me very happy... ...on Linux. On Solaris, the use of ./tcltest directly from the shell still picks up the installed library rather than the just built one. But even on Solaris, the QnD patch fixes 'make test', which is my number one concern.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0a13d04cdf] (rid 113755) by mdejong on 2002-01-12 02:21:14:
- closedate changed to: "2002-01-11T19:21:14"
- closer changed to: "mdejong"
- icomment:
Logged In: YES user_id=90858 I checked in the "quick and dirty" patch to fix the problem with tcltest on 2002-01-11. After further reflection, it did not feel so dirty.
- login: "mdejong"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "mdejong"