Hello,

Thinking about that, and since the TMP or TEMP environment variables
in Linux contrary to Windows don't exist by default apparently, what
about creating the temporary files in src/input like some other
temporary files. And for information the mostlyclean-local target in
Makefile.in is

mostlyclean-local:
    -rm -f *.output
    -rm -rf *.NRLIB
    -rm -rf $(OUT)
    -rm -f redo.input
    -rm -f sieve.asy sieve.lsp simple.asy simple.lsp
    -rm -f *.fn *.data *.lib *.$(LISPOBJEXT)

I just checked with just Git cloned FriCAS on MSYS2/MINGW64, all
files.input checks pass without the use of '/tmp/'.

Greg

Le dim. 8 déc. 2024 à 15:16, Grégory Vanuxem <[email protected]> a écrit :
>
> Quick note: writable?("tt") from above returns true so the code is
> correct from what I see (the code takes into account the working
> directory).
>
> Le dim. 8 déc. 2024 à 15:11, Grégory Vanuxem <[email protected]> a écrit :
> >
> > Looking more carefully it seems this is caused by SBCL on Windows
> > which uses a mixed Windows/Linux path scheme:
> >
> > (1) -> )lisp (truename "tt")
> >
> > Value = #P"C:/msys64/home/gregv/build/tt"
> >
> > Above it is just after a ')sys touch tt' in the build directory.
> > Checking more deeper in cfuns-c.c, writeablep:
> > In this piece of code:
> >     code = stat(path, &buf);
> >     if (code == -1) {
> >         /** The file does not exist, so check to see
> >                  if the directory is writable                  *****/
> >         if (make_path_from_file(newpath, path) == -1 ||
> >             stat(newpath, &buf) == -1) {
> >             return (-1);
> >         }
> >     }
> >
> > the path-s can't indeed be stat-ed, the two returned values are -1. On
> > my Windows 11 I haven't a C:\Tmp directory by default, see the
> > attached file to see the errors returned (particularly the second
> > 'open'):
> >
> > So just /tmp is not accessible by default on Windows 11 with SBCL even
> > if I start FriCAS from MSYS2 (linux paths).
> >
> > Le dim. 8 déc. 2024 à 14:04, Waldek Hebisch <[email protected]> a écrit :
> > >
> > > On Sun, Dec 08, 2024 at 12:46:53PM +0100, Grégory Vanuxem wrote:
> > > > Hello Waldek,
> > > >
> > > > That compiles fine on WSL Linux and  MSYS2/Windows x86_64 but
> > > > files.input does not pass checks on Windows because writeable? returns
> > > > false even if I can 'touch' (and write in) a file in /tmp/.
> > >
> > > There are two 'open'-s for writing in 'files.input'.  Do both fail?
> > > Or maybe only one?
> > >
> > > --
> > >                               Waldek Hebisch
> > >
> > > --
> > > 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 visit 
> > > https://groups.google.com/d/msgid/fricas-devel/Z1WZUUgmuasz-VYQ%40fricas.org.

-- 
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 visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2daCZt-jmajq3SSU_U%3DPLZjimS3j%2BhTPATUJBKVOez__XA%40mail.gmail.com.

Reply via email to