Using the native Clozure CL binary
https://github.com/Clozure/ccl/releases/download/v1.12.2/ccl-1.12.2-windowsx86.zip
to build FriCAS in MSYS2/MingW64, there's an error about permission
denied to write fasl in C:/.

That's because "trim-directory-name" called by "get-current-directory"
called by "relative-to-absolute" called by "fricas_compile_file",
it returns NIL, causing "fricas_compile_file" to write output
to "/xxx.fasl" which is C:/.

The reason is that CCL on windows doesn't have feature :win32,
it has :windows instead.

I see no reason to do such feature testing in "trim-directory-name" and
"pad-directory-name".

- Qian

diff --git a/src/lisp/fricas-lisp.lisp b/src/lisp/fricas-lisp.lisp
index 82ea63e2..33a0041e 100644
--- a/src/lisp/fricas-lisp.lisp
+++ b/src/lisp/fricas-lisp.lisp
@@ -740,18 +740,14 @@ with this hack and will try to convince the GCL crowd to fix this.
 )

 (defun trim-directory-name (name)
-    #+(or :unix :win32)
     (if (char= (char name (1- (length name))) #\/)
         (subseq name 0 (1- (length name)))
         name))

 (defun pad-directory-name (name)
-   #+(or :unix :win32)
    (if (char= (char name (1- (length name))) #\/)
        name
        (concatenate 'string name "/"))
-   #-(or :unix :win32)
-       (error "Not Unix and not Windows, what system it is?")
     )

 ;;; Make directory

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/10403ecd-1887-491b-add0-30d33e45709a%40gmail.com.

Reply via email to