sharky.deepsoft.com% ./tclkit-linux-x86
% source snodbc.kit
% package require snodbc
couldn't load file "/tmp/tclQeRZUE": /tmp/tclQeRZUE: failed to map
segment from shared object: Operation not permitted
%
sharky.deepsoft.com% strings tclkit-linux-x86|grep TMP
sharky.deepsoft.com% strings tclkit-linux-x86 | grep tmp
TclDatetmp
/tmp
/tmp
sharky.deepsoft.com% ./tclkit-linux-x86
% set tcl_patchLevel
8.4.15
% sharky.deepsoft.com% mount | grep tmp
simfs on /tmp type simfs (rw,nosuid,nodev,noexec)
simfs on /var/tmp type simfs (rw,nosuid,nodev,noexec)
sharky.deepsoft.com%
--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
hel...@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk
Not to my knowledge. We've worked around this problem (permissions
don't allow loading shared libraries from /tmp on some Linux systems) at
the application level, so that if the existing "load" of a shared
library from within the starkit fails, we catch that and manually copy
and load it from elsewhere.
Mark
I took a look at the kbskit source files (which I had handy), just to
see where /tmp was being used instead of TMPDIR.
Here are the only places I could find in the kbskit sources (and its
sources includes a few extensions that are addons...
tcl/compat/tmpnam.c - P_tmpdir uses hard coded /tmp
tcl/macosx/tclMacOSXNotify.c /tmp notifier log file
snack 2.2.10 wrap.tcl demo uses /tmp
img's libjpeg/jmemname.c uses /usr/tmp as temporary directory
img's libtiff's fax2ps tool uses /tmp for temporary fax file
iwidgets generic canvasprintbox writes a /tmp/xge file
sqlite 3.3.17 generic/tclsqlite3.c initializes a directory with the
/var/tmp, /usr/tmp, and /tmp dir names. However, it also makes
use of
TEMP/TMP/TMPDIR variables in a different place in the code.
tcllib's bench libbench.tcl uses $TEMP on windows and /tmp otherwise
for a temp file name.
tclx's edprocs.tcl uses /tmp for a temporary file
tkhtml 3.0's hv/tst_main.tcl uses /tmp for an image
xotcl 1.5.3's generic aol-xotcl.tcl uses /tmp for an working script
file
xotcl 1.5.3's library actiweb/WebDocument.xoltc uses /tmp for temp
files.
ditto library/comm/Httpd.xotcl uses /tmp/log for a log file
ditto library/comm/PCache.xotcl uses /tmp for cache
~
>
> On Jul 13, 11:52 pm, Robert Heller <hel...@deepsoft.com> wrote:
> > It appears that all of the current 8.4 Linux x86 Tcl Kits at http://www.equi4.com/pub/tk/downloads.htmluse /tmp/ as a *hardwired*
> > location for loading embedded shared libraries. Do there exist versions
> > that honor TMPDIR instead?
>
> I took a look at the kbskit source files (which I had handy), just to
> see where /tmp was being used instead of TMPDIR.
>
> Here are the only places I could find in the kbskit sources (and its
> sources includes a few extensions that are addons...
>
> tcl/compat/tmpnam.c - P_tmpdir uses hard coded /tmp
This is probably the one that is being used for copying shared libraries
to a place where the O/S can load them.
> tcl/macosx/tclMacOSXNotify.c /tmp notifier log file
> snack 2.2.10 wrap.tcl demo uses /tmp
> img's libjpeg/jmemname.c uses /usr/tmp as temporary directory
> img's libtiff's fax2ps tool uses /tmp for temporary fax file
> iwidgets generic canvasprintbox writes a /tmp/xge file
> sqlite 3.3.17 generic/tclsqlite3.c initializes a directory with the
> /var/tmp, /usr/tmp, and /tmp dir names. However, it also makes
> use of
> TEMP/TMP/TMPDIR variables in a different place in the code.
> tcllib's bench libbench.tcl uses $TEMP on windows and /tmp otherwise
> for a temp file name.
> tclx's edprocs.tcl uses /tmp for a temporary file
> tkhtml 3.0's hv/tst_main.tcl uses /tmp for an image
> xotcl 1.5.3's generic aol-xotcl.tcl uses /tmp for an working script
> file
> xotcl 1.5.3's library actiweb/WebDocument.xoltc uses /tmp for temp
> files.
> ditto library/comm/Httpd.xotcl uses /tmp/log for a log file
> ditto library/comm/PCache.xotcl uses /tmp for cache
> ~
>
>
--
Wouldn't a platform-independent tmpdir/tmpfile function or an
extension to the 'file' command in the core or tcllib be a good idea?
R'
Its already in tcllib: ::fileutil::tempdir and ::fileutil::tempfile
kind regards
--
Matthias Kraft
Software AG, Germany