#2690 load(descriptive) does not work (defsystem home directory problem)

None
closed
nobody
5
2016-07-26
2014-02-23
No

When using maxima 5.31.2 on windows in the maxima.bat shell, it is not possible to load the descriptive package. (as a side remark in wxMaxima it does work).

The following is an dump of the shell output:

Maxima 5.31.2 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load(descriptive)$

loadfile: failed to load D:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.li
sp
-- an error. To debug this try: debugmode(true);
(%i2)

Discussion

  • Robert Dodier

    Robert Dodier - 2014-03-05

    Can you try this?

    (%i1) :lisp (load "D:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.lisp")
    

    I expect it to fail, but it will give a more detailed error message, which you can add to the bug report.

     
  • Halldor Janetzko

    (%i1) :lisp (load "D:/Maxima-5.31.2/share/maxima/5.31.2/share/draw/draw.lisp")

    Maxima encountered a Lisp error:

    Error in OR [or a callee]: Can't expand pathname ~/lisp/systems/draw.system

    Automatically continuing.
    To enable the Lisp debugger set debugger-hook to nil.
    (%i1)

     
  • Robert Dodier

    Robert Dodier - 2014-03-08
    • assigned_to: Mario Rodriguez Riotorto
     
  • Robert Dodier

    Robert Dodier - 2014-03-08

    OK, thanks for the additional information. The immediate problem is that the tilde "~" means the home directory in Unix-like systems (Linux etc) but it is not recognized in Windows. I am not sure how the tilde got into the path for draw.system. I looked at the code in share/draw and the tilde doesn't seem to be introduced there.

    Can you enter

    (%i1) :lisp sys:*load-pathname*
    

    in a Maxima session and report the value?

    Do you have a maxima-init.lisp, and if so, is sys:*load-pathname* assigned a value there?

     
  • Halldor Janetzko

    I have an maxima-init.lisp (in directory D:\Maxima-5.31.2\share\maxima\5.31.2\share) but it is empty. The following out is the result of your command:

    Maxima 5.31.2 http://maxima.sourceforge.net
    using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
    Distributed under the GNU Public License. See the file COPYING.
    Dedicated to the memory of William Schelter.
    The function bug_report() provides bug reporting information.
    (%i1) :lisp sys:load-pathname

    NIL

     
  • Robert Dodier

    Robert Dodier - 2014-03-13

    On looking at this again, I believe the problem with the tilde is due to defsystem (similar to "make", a system to manage program dependencies). I believe the tilde is introduced by the function HOME-SUBDIRECTORY in defsystem.lisp. It appears that the tilde is returned only if the Lisp function USER-HOMEDIR-PATHNAME returns NIL.

    Can you test the following in a Maxima session?

    (%i1) :lisp (user-homedir-pathname)
    

    and also

    (%i1) :lisp (namestring (user-homedir-pathname))
    
     
  • Halldor Janetzko

    Maxima 5.31.2 http://maxima.sourceforge.net
    using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
    Distributed under the GNU Public License. See the file COPYING.
    Dedicated to the memory of William Schelter.
    The function bug_report() provides bug reporting information.
    (%i1) :lisp (user-homedir-pathname)

    p~/

    (%i1) :lisp (namestring (user-homedir-pathname))

    ~/

     
  • Robert Dodier

    Robert Dodier - 2014-03-14

    I wouldn't expect a Windows program to use tilde to mean the home directory. Are you working with a Unix-like environment such as Cygwin? If so, try to execute Maxima in an ordinary Windows command prompt (not bash). If not, well, we will have to think of something else.

     
  • Halldor Janetzko

    I am using the maxima.bat file in the bin directory (attached to this post). I already performed a diff of this bat file from a previous installation (5.28.0-2) with the latest and found no major differences besides the version number. The batch files are automatically executed in the cmd.exe (the default windows command line). There is no unix-like stuff installed on the machine. Furthermore, this error is reproducable on both win7 and 8.1. Interestingly, the xmaxima and wxmaxima do not suffer from this bug. They must execute maxima in a different way and use a different configuration. Is there a place where such configuration files are? I could diff these files with the previous version.

     
    • Robert Dodier

      Robert Dodier - 2016-07-25

      Sorry for my late reply. Halidor, if you are still tracking this issue, can you please execute maxima.bat and enter at the input prompt: :lisp (si::getenv "HOME")

      It appears that for GCL, USER-HOMEDIR-PATHNAME simply punts to SI::GETENV.

      If SI:GETENV returns something containing a tilde (e.g. #p"~/"), can you please look in your Maxima installation and see if there is a gcl.exe program somewhere in there. If so, can you please execute gcl.exe and enter: (si::getenv "HOME") and let us know what's the output.

      Gunter, if you can try these operations also, that would be very helpful. I don't have a Windows system so I can't try it myself.

       
      • Andrej Vodopivec

        wxMaxima on Windows sets the HOME environment variable, this probably explains the difference in the behaviour between wxMaxima and maxima from cmd prompt.

         
  • Gunter Königsmann

    wxMaxima just runs ..\bin\maxima.bat. It also executes wxMathml.lisp - but wxMathml.lisp doesn't change any of the paths maxima is using...

    ...perhaps the solution therefore lies in executing maxima from a different directory. But I have no idea what might cause this...

    Kind regards,

    Gunter.
    
     
  • Robert Dodier

    Robert Dodier - 2016-07-25
    • labels: --> windows, defsystem, gcl, getenv
    • summary: load(descriptive) does not work --> load(descriptive) does not work (defsystem home directory problem)
    • assigned_to: Mario Rodriguez Riotorto --> nobody
     
  • Robert Dodier

    Robert Dodier - 2016-07-25

    Updated description, and removed assignment to package author -- this appears to be a general problem, not specific to the draw package.

     
  • Halldor Janetzko

    I didn't follow up on this either. Obviously, the bug has been fixed in the meantime as I tried to reproduce the behavior with the latest maxima version. Thanks for your time.

     
  • Gunter Königsmann

    After Andrej's answer I assume the last part we didn't document here about the original problem was that the %USERPROFILE% environment variable somehow wasn't set correctly... ...so the problem is solved - we have found what caused it and have documented all the pieces so if it recours google might help finding the solution now => I think it is time to close the ticket.

     
  • Gunter Königsmann

    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks