Attaching my hacks here, so that people can start from here to
work on SBCL on Cygwin.

- Qian

On 3/12/21 12:40 PM, Qian Yun wrote:
After some tweaking in Makefiles, interpsys can be generated.
Sadly, both SBCL/ccl encounters memory exception when
doing ")read boo_db.input" in src/algebra .

- Qian

On 3/12/21 11:20 AM, Qian Yun wrote:
Okay, the secret sauce seems to be "cygpath -m".

Now let's see if we can have a complete FriCAS distribution
of Cygwin/SBCL, or mingw64/SBCL with sman.

- Qian

On 3/11/21 9:29 PM, Qian Yun wrote:


On 3/11/21 9:25 PM, Waldek Hebisch wrote:
On Thu, Mar 11, 2021 at 08:50:29PM +0800, Qian Yun wrote:
I tried ccl and sbcl, they sort of run under Cygwin, but they
have problems on unix style pathnames "/cygdrive/xxx", claiming
the file does not exist.  That makes them unable to compile FriCAS.

"run under Cygwin" is rathr imprecise statement.  Cygwin is
really a library impementing emulation of Posix system calls.
Program linked to Cygin libraries is normal Windows program,
but shows behaviour that is Posix-like due to use of the
library.  Cygwin offers a shell and collection of programs
linked to CYgwnin library.  Together this gives Unix-like
environment on WIndows.  IIUC cygwin shell can start normal
(non linked to Cygwin library) Windows programs, they simply
run under Windows (probably completely) unaware that they
were started from Cygwin program.

Yes, ccl and sbcl are normal win32 applications, they can
run under Cygwin, but don't understand cygwin path.


--
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/00afe2d3-dd26-4172-a92c-6ee5a65ea01c%40gmail.com.
diff --git a/configure b/configure
index 19b1e382..a315deb6 100755
--- a/configure
+++ b/configure
@@ -4071,7 +4071,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lisp implementation" >&5
 $as_echo_n "checking Lisp implementation... " >&6; }
 rm -f config_cl.out
-echo '(load "'"$fricas_top_srcdir"'/config.lisp")' | $fricas_lisp
+echo '(load "'"`cygpath -m "$fricas_top_srcdir"`"'/config.lisp")' | $fricas_lisp
 
 if test x$fricas_lisp_flavor = xunknown ; then
       fricas_lisp_flavor=`sed -n -e 's/fricas_lisp_flavor=//p' config_cl.out`
diff --git a/configure.ac b/configure.ac
index fc49c423..8cc7e9d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,7 +204,7 @@ AC_ARG_WITH([lisp-flavor],
 
 AC_MSG_CHECKING([Lisp implementation])
 rm -f config_cl.out
-echo '(load "'"$fricas_top_srcdir"'/config.lisp")' | $fricas_lisp
+echo '(load "'"`cygpath -m "$fricas_top_srcdir"`"'/config.lisp")' | $fricas_lisp
 
 if test x$fricas_lisp_flavor = xunknown ; then
       fricas_lisp_flavor=`sed -n -e 's/fricas_lisp_flavor=//p' config_cl.out`
diff --git a/src/boot/Makefile.in b/src/boot/Makefile.in
index 3ba273be..90440955 100644
--- a/src/boot/Makefile.in
+++ b/src/boot/Makefile.in
@@ -28,7 +28,7 @@ BOOT_TO_LISP = $(fricas_build_helper) \
 
 MAKE_PROGRAM = $(fricas_build_helper) \
 	       --make_program --debug=$(fricas_debug_compiler) \
-	       --use=$(LISPSYS) --output=$@
+	       --use=$(LISPSYS) --output=`cygpath -m $@`
 
 BOOTSYS_EXE_TARGETS = stage0/bootsys$(EXEEXT) stage1/bootsys$(EXEEXT) \
                       stage2/bootsys$(EXEEXT)
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index d30b6e11..0d57c013 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -131,7 +131,7 @@ makeint.lisp: ../boot/lobj_lst
 	echo '))))' >> makeint.lisp
 	echo '(build-interpsys' \
 	  '(quote ($(patsubst %, "%", ${ALL_OBJS})))' \
-	  '"${FRICAS}")' >> makeint.lisp
+	  '"'`cygpath -m "${FRICAS}"`'")' >> makeint.lisp
 	@ echo '(in-package "BOOT")' >> makeint.lisp
 	echo '#-:ecl(|clearClams|)' >> makeint.lisp
 	@ echo '#+:GCL (setq compiler::*suppress-compiler-notes* t)' >> makeint.lisp
@@ -140,8 +140,8 @@ makeint.lisp: ../boot/lobj_lst
 ${SAVESYS}:
 	echo '(load "makeint.lisp") #-:ecl(BOOT::reclaim)' \
              '#+:ecl(FRICAS-LISP::make-program "$(BASE)$@" nil)' \
-             '#-:ecl(BOOT::spad-save "$(BASE)$@" t)' | \
-           DAASE='$(fricas_src_datadir)' ${BOOTSYS}
+             '#-:ecl(BOOT::spad-save "'`cygpath -m "$(BASE)$@"`'"  t)' | \
+           DAASE=`cygpath -m '$(fricas_src_datadir)'` ${BOOTSYS}
 	ls $@
 	@ echo 6 ${SAVESYS} created
 
@@ -159,7 +159,7 @@ ${FRICASSYS}: ../etc/stamp-databases
 	   '#+:cmu (setq *compile-print* nil)' \
 	   '#+:cmu (declaim (optimize (ext:inhibit-warnings 3)))' \
 	   '#+:ecl(FRICAS-LISP::make-program "$(BASE)$@" nil)' \
-	   '#-:ecl(BOOT::spad-save "$(BASE)$@" t)' \
+	   '#-:ecl(BOOT::spad-save '`cygpath -m "$(BASE)$@"`' t)' \
              | DAASE="$(BASE)$(fricas_targetdir)" ${BOOTSYS}
 	@ echo 6a ${FRICASSYS} created
 
@@ -170,7 +170,7 @@ exposed.lsp: $(fricas_src_algdir)/exposed.lsp
 $(fricas_targetdir)/algebra/exposed.$(FASLEXT) : exposed.lsp
 	@ echo 616 making $@ from exposed.lsp
 	echo '(progn  (compile-file "exposed.lsp" :output-file' \
-	      ' "$(BASE)$(fricas_targetdir)/algebra/exposed.$(FASLEXT)") (${BYE}))' \
+	      '"'`cygpath -m "$(BASE)$(fricas_targetdir)/algebra/exposed.$(FASLEXT)"`'")  (${BYE}))' \
 		| ${LOADSYS}
 
 database.date:
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index 30f61509..a710a16c 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -144,7 +144,7 @@ do_it.sbcl do_it.clisp do_it.openmcl do_it.lispworks: \
             '#+(or :sbcl :openmcl) (load (compile-file "num_gmpx.lisp"))' \
 	    '(load (compile-file "fricas-lisp.lisp"))' \
 	    '(load (compile-file "primitives.lisp"))' \
-            '(in-package "FRICAS-LISP") (save-core "${OUT}/lisp$(EXEEXT)")' \
+            '(in-package "FRICAS-LISP") (save-core "'`cygpath -m "$(fricas_build_bindir)"`'/lisp$(EXEEXT)")' \
          | $(LISP_CMD)
 	 $(STAMP) $@
 

Reply via email to