tar version confusion [ Re: asdf-install for MCL]
james anderson <[email protected]>
| Newsgroups | gmane.lisp.cclan.general,gmane.lisp.mcl.general |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday, Jan 21, 2004, at 05:36 Europe/Berlin, Raffael Cavallaro
wrote:
>
> On Jan 20, 2004, at 7:43 PM, John Louch wrote:
>
>> This is a CFM issue. You can say:
>>
>> /System/Library/Frameworks/Carbon.framework/Versions/A/Support/
>> LaunchCFMApp
>> <path to mcl>
>>
>> Though unfortunately MCL crashed when launched this way, at least for
>> me.
>
> Well, this actually worked on my machine, so if you launch MCL from a
> terminal in the above fashion, then you can tell whether it was Finder
> launched or terminal launched by checking its parent process -
> WindowServer=Finder launch, bash/tcsh/other-shell=terminal launch.
>
> So James, I correct my previous correction of myself.
this ability would appear to be limited to 10.3.
10.2.8 refused to start mcl that way.
in any case, i have dissuaded myself that the pertinent distinction is
either the parent process or the environment.
the immediate distinction appears to be the tar implementation.
i looked at the respective process properties (edited here for
legibility at 1024*768)
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME
PPID PGID SESS JOBC COMMAND
janson 200 4.1 27.7 368360 145016 ?? Ss Fri10AM 85:10.91
1 200 21b2e88 0 /System/Library/CoreServices/WindowServer -daemon
PWD=/ SHLVL=1
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/
CoreServices _=/System/Library/CoreServices/WindowServer
janson 1799 3.0 1.6 206888 8356 ?? S 10:39AM 0:06.53
200 200 21b2e88 0 /Volumes/raidin.tschichold/Backups/MCL 5.0b/MCL
5.0b /Volumes/raidin.tschichold/Backups/MCL 5.0b/MCL 5.0b
-psn_0_32374785
HOME=/Users/janson SHELL=/bin/tcsh USER=janson
PATH=/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/teTeX/
bin/powerpc-apple-darwin-current:/usr/local/bin:/usr/X11R6/bin:/usr/
local/qt/bin
__CF_USER_TEXT_ENCODING=0x1F5:0:0 TERM=vt100 TERMCAP=M-??M-WM-`
TERM_PROGRAM=Apple_Terminal TERM_PROGRAM_VERSION=81 LOGNAME=janson
HOSTTYPE=macintosh
VENDOR=apple OSTYPE=darwin MACHTYPE=powerpc SHLVL=1
PWD=/Development/Source/SBCL/sbcl-0.8.7 GROUP=staff
HOST=tschichold.local.
MANPATH=/sw/share/man:/usr/share/man:/usr/local/man:/usr/X11R6/man:/
usr/local/qt/doc/man INFOPATH=/sw/share/info:/sw/info:/usr/share/info
PERL5LIB=/sw/lib/perl5
CVSROOT=/Volumes/raidin.tschichold/SourceRepository QTDIR=/usr/local/qt
DYLD_LIBRARY_PATH=/usr/local/qt/lib
janson 1292 0.0 6.7 356828 35120 ?? S Tue02AM 17:47.31
200 200 21b2e88 0 /Applications/MCL/MCL 5.0/MCL 5.0
/Applications/MCL/MCL 5.0/MCL 5.0 -psn_0_27656193
HOME=/Users/janson SHELL=/bin/tcsh USER=janson
PATH=/usr/bin:/bin:/sw/bin:/usr/local/bin:/usr/local/teTeX/bin/powerpc-
apple-darwin-current
__CF_USER_TEXT_ENCODING=0x1F5:0:0
and observed no difference with respect to either the presence of a
controlling terminal or the parent process id, but did observe that the
process which was started under the finder (the '/Applications/MCL/MCL
5.0/MCL 5.0' binary) lacked both a terminal type and a termcap setting.
(SHLVL turns out to be added by the popen call)
i observed no effect on the output when i adjusted those, whether
through the ~/.MacOSX/environment.plist (which upon rebooting did
succeed at making values known to MCL under the finder), or through
calling setenv (to add) or unsetenv (to remove) from MCL.
in the process, however, i did observe that i have two tar versions
installed. one in /usr/bin and one in /sw/bin.
the latter identifies itself as
[tschichold:~/.MacOSX]
janson% /sw/bin/tar --version
tar (GNU tar) 1.13.25
Copyright (C) 2001 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public
License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.
i don't know how to get the /usr/bin version to describe itself
[tschichold:~/.MacOSX]
janson% /usr/bin/tar -h
tar: Failed open to read on /dev/nrst0 <No such file or directory>
[tschichold:~/.MacOSX]
janson% /usr/bin/tar -help
/usr/bin/tar: illegal option -- l
usage: tar -{txru}[cevfbmopswzBHLPXZ014578] [tapefile] [blocksize]
[replstr] [-C directory] file1 file2...
[tschichold:~/.MacOSX]
janson% /usr/bin/tar -V
/usr/bin/tar: illegal option -- V
usage: tar -{txru}[cevfbmopswzBHLPXZ014578] [tapefile] [blocksize]
[replstr] [-C directory] file1 file2...
[tschichold:~/.MacOSX]
janson% what /usr/bin/tar
/usr/bin/tar
PROGRAM:pax PROJECT:file_cmds-60 DEVELOPER:root BUILT:Sun
Jul 14 03:45:07 PDT 2002
Copyright (c) 1992, 1993
but the behavior corresponds to that in the man page for the bsd
version, and the binary does have a UC regents string, so it appears to
be a bsd version. in any case, this behavior distinguishes the two and
if i look at which one runs at the far end of a popen, via
(CCL::CALL-SYSTEM "(pwd; echo ''; printenv; echo ''; which tar; echo
''; tar '--version'; echo ''; /usr/bin/tar '--version' ; echo '';
/sw/bin/tar '--version') 1>> /Users/janson/tar-20040121.txt 2>>
/Users/janson/tar-20040121.txt")
i observer that the output file contains
/
PWD=/
USER=janson
TERMCAP=øˇ◊‡
SHLVL=1
SHELL=/bin/tcsh
HOME=/Users/janson
TERM=VT100
PATH=/usr/bin:/bin:/sw/bin:/usr/local/bin:/usr/local/teTeX/bin/powerpc-
apple-darwin-current
__CF_USER_TEXT_ENCODING=0x1F5:0:0
_=/usr/bin/printenv
/sw/bin/tar
tar: Failed open to read on /dev/nrst0 <No such file or directory>
tar: Failed open to read on /dev/nrst0 <No such file or directory>
tar (GNU tar) 1.13.25
Copyright (C) 2001 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public
License;
see the file named COPYING for details.
Written by John Gilmore and Jay Fenlason.
which indicates that, even though 'which' suggests that a popen of
'tar' will run '/sw/bin/tar', in fact it runs '/usr/bin/tar'.
i have installed fink, but cannot pin down the origins of /sw/bin/tar,
as i find it in none of the tar files which fink has retained. it is
also somewhat confounding that it also doesn't behave like the source
in apple's darwin tree
(to wit:
http://www.opensource.apple.com/darwinsource/10.2.8/gnutar-413/tar/src/
tar.c) with respect to the version, so it's not clear that osx would
have installed it.
does anyone have any insight into
a - why 'which' indicates a different binary than the shell actually
runs?
b - which version of tar osx actually installs? and where?
c - is there's some way to get the implementation in /usr/bin/
(apparently the bsd version) to act 'properly' when run via a pipe?
thanks,
...
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn