Artifacts Associated With Ticket 611108ffffffffffffffffffffffffffffffffff
Ticket change [202e2a87d0] (rid 91271) by jkbonfield on 2002-09-18 14:11:38:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
With 8.4.0 (compared to 8.3.1) "load libfred.so" no longer works unless libfred.so is in the current directory. Previously this searched the LD_LIBRARY_PATH on Unix, or PATH on Windows. (The searching is really done by dlopen().) Since the inclusion of Tcl_FS* in 8.4 load now always calls dlopen() with a full pathname, thus preventing the system from searching LD_LIBRARY_PATH. The cause is in TclpDlopen: native = Tcl_FSGetNativePath(pathPtr); handle = dlopen(native, RTLD_NOW | RTLD_GLOBAL); Tcl_GetString(pathPtr) returns "libfred.so", but native is now /some/dir/libfred.so. So removing the Tcl_FSGetNativePath cures this bug (at the extent of breaking much more). I do not know what the proper solution is, but perhaps one way would be to extend load with a -native switch to accept the argument given to it as a native name already (and so it will not need to call Tcl_FSGetNativePath). - foundin initialized to: "obsolete: 8.4.0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jkbonfield"
- subsystem initialized to: "40. Dynamic Loading"
- title initialized to: "LD_LIBRARY_PATH no longer used"
- type initialized to: "Bug"
Ticket change [70d8d3a9ac] (rid 100562) by vincentdarley on 2002-09-19 15:59:36:
- icomment:
Logged In: YES user_id=32170 Take a look at tclWinLoad.c which shows you how you can do this: char *fileName = Tcl_GetString(pathPtr); nativeName = Tcl_WinUtfToTChar(fileName, -1, &ds); handle = (*tclWinProcs->loadLibraryProc) (nativeName); just use 'Tcl_GetString' and a manual 'Tcl_UtfToExternal' conversion inside TclpDlopen for . Alternatively, if you simply use pkgIndex.tcl files to load your extensions, you won't run into this problem at all. - login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [0b77009e7f] (rid 113992) by vincentdarley on 2002-10-03 20:13:10:
- icomment:
File Added - 32306: tclload.diff Logged In: YES user_id=32170 Here's a patch which fixes this problem. There is actually an important subtlety here which means we need to test both with Tcl_FSGetNativePath and with Tcl_GetString. Please test asap, and we'll commit if all goes well.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [62a77e6862] (rid 92441) by jkbonfield on 2002-10-03 20:32:45:
- icomment:
Logged In: YES user_id=154581 It doesn't get too far. It complains about tcl_UtfToExternal being called with the wrong number of arguments. This was on an Intel based linux: gcc -pipe -c -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_SHLIB_EXT=\".so\" ./../unix/tclLoadDl.c ./../unix/tclLoadDl.c: In function `TclpDlopen': ./../unix/tclLoadDl.c:88: warning: passing arg 1 of `Tcl_UtfToExternal' from incompatible pointer type ./../unix/tclLoadDl.c:88: warning: passing arg 2 of `Tcl_UtfToExternal' makes pointer from integer without a cast ./../unix/tclLoadDl.c:88: warning: passing arg 3 of `Tcl_UtfToExternal' from incompatible pointer type ./../unix/tclLoadDl.c:88: too few arguments to function `Tcl_UtfToExternal' ./../unix/tclLoadDl.c:88: warning: assignment makes pointer from integer without a cast gmake: *** [tclLoadDl.o] Error 1
- login: "jkbonfield"
- mimetype: "text/plain"
- username: "jkbonfield"
- icomment:
Add attachment "tclload.diff" [41857cfba4] (rid 116203) by vincentdarley on 2002-10-03 22:18:09.
Ticket change [2aedfaa923] (rid 118651) by vincentdarley on 2002-10-03 22:18:09:
- icomment:
Logged In: YES user_id=32170 Sorry about that -- bad copy/pasting from the Windows version. I've attached a modified patch. Else you need to replace 'Tcl_UtfToExternal(' by 'Tcl_UtfToExternalDString(NULL,' - login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [a4f7fa75b8] (rid 110292) by vincentdarley on 2002-10-03 22:18:10:
- icomment:
File Deleted - 32306: File Added - 32316: tclload.diff
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [ef3c511b32] (rid 108958) by jkbonfield on 2002-10-04 00:19:09:
- icomment:
Logged In: YES user_id=154581 A preliminary test on linux and digital unix shows this as working. Next week I'll be able to do a more rigorous test on these platforms plus solaris and windows 2000. Thanks.
- login: "jkbonfield"
- mimetype: "text/plain"
- username: "jkbonfield"
- icomment:
Ticket change [3ea65a72ce] (rid 121307) by jkbonfield on 2002-10-07 20:36:32:
- icomment:
Logged In: YES user_id=154581 Further testing performed on Linux (RedHat 7.1), Digital Unix 4.0E, Solaris 2.8 and Windows 2000. This now appears to work correctly on all platforms. Thanks
- login: "jkbonfield"
- mimetype: "text/plain"
- username: "jkbonfield"
- icomment:
Ticket change [7da024271d] (rid 97271) by vincentdarley on 2002-10-10 19:26:41:
- closedate changed to: "2002-10-10T12:26:41"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Committed fix.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vincentdarley"