New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GAP does not start if the path to the GAP workspace file contains more than 82 characters #9938
Comments
This comment has been minimized.
This comment has been minimized.
Attachment: trac9938.2.patch.gz |
Attachment: trac9938.patch.gz apply only this patch! |
Attachment: trac9938-review-sl.patch.gz Applies over the precedent patch |
comment:5
I was able to reproduce the problem on my osx 10.5 running sage-4.5.3. The patch fixes the problem. All tests pass on sage/interfaces/gap.py. Documentation builds fine. I added a review patch that simply puts back the constant I am giving a positive review to Franco's patch. I let him change the status of this ticket to positive review if he agrees with my small fix. I did not manage to apply a patch on the sage install of LaCIM laboratory by ssh. Maybe Jérôme could test the patch on Monday. |
Author: Franco Saliola |
Reviewer: Sébastien Labbé |
comment:6
I'm okay with your changes, Sébastien. Apply patches in this order: |
comment:7
Last Monday, I tested the patch on one of the computer in the lab and I can confirm the patches solve the problem. Great! |
Merged: sage-4.6.alpha2 |
comment:8
Thanks for fixing this! I encountered just this problem about two days ago when doctesting with a long |
As pointed out in
this thread, on some machines one there is a problem starting GAP from within Sage:
The problem is in Sage's attempt to rebuild the GAP workspace. It turns out that Sage calls GAP's
SaveWorkspace
command incorrectly in a particular case.To explain the problem, first recall the process used by the GAP interface to evaluate a line of GAP code, say
LineOfGapCode
. It begins by checking the lengthLineOfGapCode
(as a string). If this length is greater than 100 (a pre-defined cut-off value), then a file is created containing:This file is read into GAP using the expect interface and the output is parsed and returned to Sage. (There is no problem if the length is less than 100, because the interface does not use a file.)
Let's apply this to the case where we need to rebuild a workspace. The workspace is just a file contained in a user's .sage directory. If the number of characters in the path to the workspace is greater than the cut-off, then Sage tries to execute the following command:
This is not permitted by GAP, as explained in the GAP Reference Manual:
So to fix this, we need to force the interface not to use a file to execute the
SaveWorkspace
command.(This problem has plagued all the computers in our computer lab for months since a user's home directory is located on a network drive with a long name.)
This is reproducible:
Boom!
CC: @seblabbe @sagetrac-mrobado
Component: interfaces
Keywords: gap
Author: Franco Saliola
Reviewer: Sébastien Labbé
Merged: sage-4.6.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/9938
The text was updated successfully, but these errors were encountered: