Windows 8.1 SBCL 1.3.18 can't rename local-projects system-index.txt

41 views
Skip to first unread message

Chris

unread,
Oct 17, 2017, 4:49:26 PM10/17/17
to Quicklisp
I have Allegro, Lispworks, and SBCL on my Windows 8.1 machine, and several modules in ~/quicklisp/local-projects.  Allegro and Lispworks start fine, but I am unable to start SBCL because it tries to rename system-index.txt.

My .sbclrc contains

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))


;;; Load cs325.lisp to create the cs325 package.

(eval-when (:compile-toplevel :load-toplevel :execute)
  (ql:quickload "cs325")
  (setq *package* (find-package :cs325-user)))


When I open a command prompt and run SBCL I get

debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {1002DBA963}>:
  couldn't rename
    "C:\\Users\\riesbeck\\quicklisp\\local-projects\\system-index.txt"
  to
    "C:\\Users\\riesbeck\\quicklisp\\local-projects\\system-index.txt.bak":
      The process cannot access the file because it is being used by another process.

There is no system-index.txt.bak file, and this happens when I've just restarted my machine, no other Lisp is running, nothing that I can think of using system-index.txtsystem-index.txt is not read-only. I tried running cmd.exe as administrator. Same error.

What else should I be checking for or trying?

Zach Beane

unread,
Oct 17, 2017, 4:58:25 PM10/17/17
to quicklisp
Hmm! I think that .bak comes from this code:

    (defun make-system-index (pathname)
      "Create a system index file for all system files under
    PATHNAME. Current format is one native namestring per line."
      (setf pathname (truename pathname))
      (with-open-file (stream (system-index-file pathname)
      :direction :output
      :if-exists :rename-and-delete)
(dolist (system-file (local-project-system-files pathname))
  (let ((system-path (enough-namestring system-file pathname)))
    (write-line (native-namestring system-path) stream)))
(probe-file stream)))

I suspect SBCL's implementation of :if-exists :rename-and-delete is introducing the .bak pathname.

But I don't know why it would signal that error - is it possible to reproduce the error with a simpler :if-exists :rename-and-delete example? Perhaps there is an SBCL issue in play here.

Zach

--
You received this message because you are subscribed to the Google Groups "Quicklisp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quicklisp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris

unread,
Oct 18, 2017, 11:46:02 AM10/18/17
to Quicklisp
I played with simple rename/delete calls to ~/foo.txt and then ~/quicklisp/local-projects/system-index.txt

All worked, so I tried (quicklisp-client::make-system-index "~/quicklisp/local-projects/") and that worked.

So I quit SBCL and tried, and now SBCL starts OK. So something changed during the experiments but I have no idea.

If the problem returns, I'll explore and report if I have any more clues.

Thanks
Reply all
Reply to author
Forward
0 new messages