Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Linux Tcl Kits which honor TMPDIR as opposed to hardwired /tmp/...

43 views
Skip to first unread message

Robert Heller

unread,
Jul 13, 2007, 11:52:28 PM7/13/07
to
It appears that all of the current 8.4 Linux x86 Tcl Kits at
http://www.equi4.com/pub/tk/downloads.html use /tmp/ as a *hardwired*
location for loading embedded shared libraries. Do there exist versions
that honor TMPDIR instead?

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

Mark Roseman

unread,
Jul 14, 2007, 8:16:39 AM7/14/07
to
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.html use /tmp/ as a *hardwired*
> location for loading embedded shared libraries. Do there exist versions
> that honor TMPDIR instead?

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

Larry W. Virden

unread,
Jul 17, 2007, 3:42:29 PM7/17/07
to
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
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
~

Robert Heller

unread,
Jul 17, 2007, 5:45:10 PM7/17/07
to
At Tue, 17 Jul 2007 12:42:29 -0700 "Larry W. Virden" <lvi...@gmail.com> wrote:

>
> 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
> ~
>
>

--

Ralf Fassel

unread,
Jul 18, 2007, 4:28:58 AM7/18/07
to
* "Larry W. Virden" <lvi...@gmail.com>

| tcllib's bench libbench.tcl uses $TEMP on windows and /tmp otherwise
| for a temp file name.

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'

Matthias Kraft

unread,
Jul 18, 2007, 4:44:17 AM7/18/07
to
Ralf Fassel schrieb:

> Wouldn't a platform-independent tmpdir/tmpfile function or an
> extension to the 'file' command in the core or tcllib be a good idea?

Its already in tcllib: ::fileutil::tempdir and ::fileutil::tempfile

kind regards
--
Matthias Kraft
Software AG, Germany

0 new messages