OK, so you are using clisp-20210628 while I am using clisp-20180218.

Looks like this introduced a regression since 20171024:
https://gitlab.com/gnu-clisp/clisp/-/commit/f64ebe7675907b2da58c80960ed7cb9b0ad954d9

namely, if a "/path/to/file" is a file, then
'(truename "/path/to/file/")' returns "/path/to/file/".
(although this "directory" path does not exist.)

In this fricas commit, in function "check_for_ext",
your new code uses "fricas_probe_file" (which uses 'truename')
while old code uses "probe-file", thus your code exposes this
clisp regression.

The clisp regression should be fixed in 20200612:
https://gitlab.com/gnu-clisp/clisp/-/commit/71b0ef597fb6540fe3538a4f337510e9bf09d82a

So I propose the following workaround: test 'fname' before 'dname':

- Qian

diff --git a/src/lisp/fricas-lisp.lisp b/src/lisp/fricas-lisp.lisp
index 1c863854..d86f6970 100644
--- a/src/lisp/fricas-lisp.lisp
+++ b/src/lisp/fricas-lisp.lisp
@@ -789,10 +789,10 @@ with this hack and will try to convince the GCL crowd to fix this.
                      -1))
    #+:clisp (let* ((fname (|trim_directory_name| (namestring filename)))
                    (dname (|pad_directory_name| fname)))
-             (if (ignore-errors (truename dname))
-                 1
-                 (if (ignore-errors (truename fname))
-                     0
+             (if (ignore-errors (truename fname))
+                 0
+                 (if (ignore-errors (truename dname))
+                     1
                      -1)))
    #+:abcl
        (if (ext:file-directory-p filename)
@@ -839,8 +839,8 @@ with this hack and will try to convince the GCL crowd to fix this.
 #+(or :abcl :ecl :lispworks :openmcl :poplog) (probe-file file)
 #+:clisp(let* ((fname (|trim_directory_name| (namestring file)))
                (dname (|pad_directory_name| fname)))
-                 (or (ignore-errors (truename dname))
-                     (ignore-errors (truename fname))))
+                 (or (ignore-errors (truename fname))
+                     (ignore-errors (truename dname))))
          )

 #-:cmu


On 10/16/24 5:34 AM, Waldek Hebisch wrote:
On Tue, Oct 15, 2024 at 01:27:11PM +0800, Qian Yun wrote:
This commit b3949674 (Reimplement database handling in Boot code)
breaks build from source (not release tarball) with CLISP.

    >> System error:

OPEN: No file name given: #P"/tmp/fricas/src/algebra/A1AGG.NRLIB/index.KAF/"

This commit did have some bugs, but they should be fixed in the
trunk.  I tried building current trunk with clisp and it worked
fine.  I used Debian 12 and clisp coming with Debian.


--
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/5d1b558b-743e-4312-bd37-910cd3a46129%40gmail.com.

Reply via email to