[PATCH] fixup build with clisp

4 views
Skip to first unread message

Qian Yun

unread,
Oct 15, 2023, 8:43:22 AM10/15/23
to fricas-devel
In CLISP, "truename" is sensitive to the difference between "dir" and
"dir/".

So we need to "pad-directory-name" first. This already happens in our
codebase.

- Qian

=====

diff --git a/src/interp/util.lisp b/src/interp/util.lisp
index 4a60b338..866daa7d 100644
--- a/src/interp/util.lisp
+++ b/src/interp/util.lisp
@@ -115,7 +115,7 @@ from scratch.
bin-parent-dir))
(error "Environment variable FRICAS is not set!")))
(if (|fricas_probe_file| spadroot)
- (reroot (trim-directory-name (namestring (truename spadroot))))
+ (reroot (trim-directory-name (namestring (truename
(pad-directory-name spadroot)))))
(error "Environment variable FRICAS is not valid!")))

;;; Gnu Common Lisp (GCL) (at least 2.6.[78]) requires some changes

Qian Yun

unread,
Oct 15, 2023, 9:20:38 AM10/15/23
to fricas-devel
More comment: build with clisp is fine, it is "running FRICASsys
directly without setting $FRICAS" not working as expected.

Turns out it needs another fix:

--- a/src/lisp/fricas-lisp.lisp
+++ b/src/lisp/fricas-lisp.lisp
@@ -344,7 +344,7 @@ with this hack and will try to convince the GCL
crowd to fix this.
#+:GCL si::*command-args*
#+:cmu extensions:*command-line-words*
#+:sbcl sb-ext::*posix-argv*
- #+:clisp ext:*args*
+ #+:clisp (coerce (ext:argv) 'list)
#+:openmcl ccl::*COMMAND-LINE-ARGUMENT-LIST*
#+:ecl
(let ((n (SI:ARGC)) (res nil))

"ext:*args*" never works, from "clisp -h":

````
Usage: /usr/lib64/clisp-2.49.92/base/lisp.run [options] [lispfile
[argument ...]]
When 'lispfile' is given, it is loaded and '*ARGS*' is set
to the list of argument strings.
````

So for example, "clisp 1.lisp -v", then "ext:*args*" is set to "(-v)".

- Qian

Waldek Hebisch

unread,
Oct 16, 2023, 7:34:35 AM10/16/23
to fricas...@googlegroups.com
On Sun, Oct 15, 2023 at 09:20:34PM +0800, Qian Yun wrote:
> More comment: build with clisp is fine, it is "running FRICASsys
> directly without setting $FRICAS" not working as expected.

OK, please commit
> --
> 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 fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/64beb9df-aeaf-45ec-97c2-e60c0a479513%40gmail.com.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages