Starting FriCAS directly with FRICASsys on Windows

15 views
Skip to first unread message

Grégory Vanuxem

unread,
May 12, 2024, 11:00:49 AM5/12/24
to fricas...@googlegroups.com
Hello,

Some work has been done to start FriCAS without setting the FRICAS
environment variable. I created a Windows installer without a .bat
file to start FRICASsys but when executing directly FRICASsys, it
still complains about this environment variable:

debugger invoked on a SIMPLE-TYPE-ERROR in thread
#<THREAD tid=2536 "main thread" RUNNING {1000FF0003}>:
|Environment variable FRICAS is not set!| does not designate a
condition class.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit from the current thread.

(SB-KERNEL:ALLOCATE-CONDITION |Environment variable FRICAS is not set!|)
0] ba

Backtrace for: #<SB-THREAD:THREAD tid=2536 "main thread" RUNNING {1000FF0003}>
0: (SB-KERNEL:ALLOCATE-CONDITION |Environment variable FRICAS is not set!|)
1: (MAKE-CONDITION |Environment variable FRICAS is not set!|)
2: (MAKE-CONDITION |Environment variable FRICAS is not set!|) [more]
3: (SB-KERNEL:COERCE-TO-CONDITION |Environment variable FRICAS is not
set!| SIMPLE-ERROR ERROR) [more]
4: (ERROR |Environment variable FRICAS is not set!|)
5: (|initroot|)
6: (|fricas_init|)
7: (|fricas_restart|)
8: ((LAMBDA NIL :IN FRICAS-LISP::SAVE-CORE-RESTART))
9: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
10: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
11: (SB-IMPL::%START-LISP)
12: ("foreign function: #x1400447C5")
13: ("foreign function: #x140009C00")

0]


I can upload the installer for Windows somewhere if necessary.

On Windows, via advanced system parameters, this variable can be set
and FriCAS be used directly after a click on the FriCAS start menu
entry.

- Greg

Waldek Hebisch

unread,
May 12, 2024, 12:07:01 PM5/12/24
to fricas...@googlegroups.com
Well, one trouble is another typo, in the call to ERROR:

diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index a75cfa87..a23da990 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -104,7 +104,7 @@ initroot() ==
'"/../")
if fricas_probe_file(STRCONC(bin_parent_dir, '"algebra/interp.daase"))
then spadroot := bin_parent_dir
- else ERROR("Environment variable FRICAS is not set!")
+ else ERROR('"Environment variable FRICAS is not set!")
spadroot := fricas_probe_file(spadroot)
if spadroot then
reroot(trim_directory_name(NAMESTRING(spadroot)))

But fixing this will just make nicer error message, but will not
correct main trouble. I suggest modyfying 'initroot' to print
what 'getCLArgs()' gives, value of bin_parent_dir. And check if
'STRCONC(bin_parent_dir, '"algebra/interp.daase")' points to
'interp.daase'.

FYI, I checked that code works on Linux. Code in 'initroot'
make the following assumptions:
1) FRICASsys lives in a subdirectory parallel to 'algebra'
subdirectory
2) 'first(getCLArgs())' gives path to FRICASsys bianary
3) slashes and '..' work as expected in Windows paths

Apparanetly some of those assumptions are not satisfied in
your case.

--
Waldek Hebisch

Grégory Vanuxem

unread,
May 12, 2024, 6:43:46 PM5/12/24
to fricas...@googlegroups.com
My script was wrong here. FRICASsys was copied/renamed the root
install directory.

I modified this rule and all is right now, thanks.

- Greg
Reply all
Reply to author
Forward
0 new messages