[plt-scheme] puzzling code compilation version warning for "mzscheme -M errortrace" in Emacs

From: Benjamin L. Russell (dekudekuplex at yahoo.com)
Date: Mon Apr 28 08:03:28 EDT 2008

This was a tricky one.

At first, I uninstalled both v371 and v372 of DrScheme and reinstalled v372 in "c:/Program Files/PLT", but when I restarted Emacs and pressed F5 to invoke 'run-scheme, I got the following error message:

--
Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
> standard-module-name-resolver: collection not found: "errortrace" in any of: (#<path:c:/bin/plt/collects>)

 === context ===
cloop

--

After some thought, I reasoned that the only reason that "c:/bin/plt/collects" should be referenced by MzScheme in Emacs after reinstalling v372 is if it were specified somewhere in Emacs itself, so I checked my _emacs file in my "c:/home/_emacs" directory.

There, I found the culprit:

--
;; Some file locations are relative to the HOME or the BIN directory
(defvar use-bin
  (if mswindows-p
      "c:/bin/"
    (concat (expand-file-name "~") "/bin/")))

;; Setup for PLT Scheme
(defvar plt-dir (concat use-bin "plt/"))
(defvar mzscheme-program (concat plt-dir "mzscheme.exe"))
--

I.e., plt-dir was set to "c:/bin/plt/" in my _emacs file, and Quack was trying to use this plt-dir in invoking "mzscheme -M errortrace".  No wonder!

At first, I tried to rename this directory to "c:/program files/plt/" in _emacs, as follows:

--
;; Some file locations are relative to the HOME or the BIN directory
(defvar use-bin
  (if mswindows-p
      "c:/bin/"
    (concat (expand-file-name "~") "/bin/")))
(defvar use-program_files "c:/program\ files/")

;; Setup for PLT Scheme
;; (defvar plt-dir (concat use-bin "plt/"))
(defvar plt-dir (concat use-program_files "plt/"))
(defvar mzscheme-program (concat plt-dir "mzscheme.exe"))
--

However, even though the space in the path was escaped, this still caused the same error in Emacs upon invocation of the 'run-scheme command.  I.e., apparently, Quack could not handle paths with spaces.

Then I remembered why I had put a copy of DrScheme v371 in "c:/bin/plt/" in the first place:  I had read a suggestion to do this several months ago, when first setting up Emacs on my old computer, in order to make it compatible with DrScheme v371 (v372 had not been released yet), and had then WinZipped that directory and transported and unWinZipped it back here, without going through the usual installation process.  Then I had forgotten about all this, and just installed DrScheme v372 (after it had been released) on this computer.

So now, I then re-un-installed DrScheme v372, and re-specified "c:/bin/PLT/", instead of the default "c:/Program Files/PLT", as the installation directory for DrScheme.

Then I restored my the relevant portion of my _emacs file again:

--
;; Some file locations are relative to the HOME or the BIN directory
(defvar use-bin
  (if mswindows-p
      "c:/bin/"
    (concat (expand-file-name "~") "/bin/")))

;; Setup for PLT Scheme
(defvar plt-dir (concat use-bin "plt/"))
(defvar mzscheme-program (concat plt-dir "mzscheme.exe"))
--

Then, I saved my _emacs file, exited Emacs, restarted Emacs, and then re-invoked 'run-scheme.  Voila:

--
Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
> 
--

Now I have "mzscheme -M errortrace" invoked successfully with v372!

Unfortunately, now I need to reinstall all my .plt files for PLAI, Concrete Abstractions, and all the libraries I downloaded from PLaneT.  But at least now I know exactly what to do....

Benjamin L. Russell

--- On Mon, 4/28/08, Eli Barzilay <eli at barzilay.org> wrote:

> From: Eli Barzilay <eli at barzilay.org>
> Subject: Re: [plt-scheme] puzzling code compilation version warning for "mzscheme -M errortrace" in Emacs
> To: "Benjamin L. Russell" <dekudekuplex at yahoo.com>
> Cc: "PLT Scheme List" <plt-scheme at list.cs.brown.edu>
> Date: Monday, April 28, 2008, 7:36 PM
> On Apr 28, Benjamin L. Russell wrote:
> > Wow!  I changed the reference from
> "C:\Program Files\PLT" to
> > "C:\bin\PLT" for the directory
> containing MzScheme.exe in my PATH
> > for my user and system environmental variables, and
> this removed the
> > version warning!
> > 
> > --
> > Welcome to MzScheme v371 [3m], Copyright (c) 2004-2007
> PLT Scheme Inc.
> > > 
> > --
> > 
> > The only issue now is that errortrace seems to work
> correctly for
> > MzScheme v371, but not for v372 ("C:\Program
> Files\PLT" contained
> > v372).
> 
> You need to use each MzScheme.exe executable with its own
> PLT tree.
> 
> 
> > What is really necessary is to find a way to invoke
> the
> > errortrace.zo in "C:\Program
> >
> Files\PLT\collects\errortrace\compiled",
> not
> >
> "c:\bin\plt\collects\errortrace\compiled\errortrace.zo",
> when
> > re-specifying "C:\Program Files\PLT"
> as the path for MzScheme.  I
> > checked my PATH variables, but neither of these
> directories was
> > initially listed in either my user or system PATH
> variables.  If
> > neither directory is listed, then 'run-scheme
> won't start in Emacs
> > without specification of a full path.
> 
> I think that a full path specification in Emacs is the only
> sane
> option on Windows.  If you don't do that, then it's
> probably better to
> add "c:\program files\plt" into your path
> -- either before "c:\bin",
> or just get rid of the 371 installation (and the respective
> executable) there.
> 
> 
> > Another solution might be to uninstall both v371
> (using
> > Uninstall.exe) and v372 (using the Windows uninstaller
> in the
> > Control Panel) (since v371 was not installed on this
> computer,
> > IIRC), and reinstall v372: That would be a more
> standard solution.
> 
> If you run into installation problems, it should be safe to
> just
> remove all PLT directories and executables, and then
> reinstall it.
> The new installation will overwrite the registry entries
> and start
> menu.
> 
> -- 
>           ((lambda (x) (x x)) (lambda (x) (x x)))         
> Eli Barzilay:
>                   http://www.barzilay.org/                
> Maze is Life!


Posted on the users mailing list.