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
ECL spkg : dirty workarounds? #14636
Comments
Replying to @SnarkBoojum:
I don't see any patch doing this, please clarify... |
Replying to @SnarkBoojum:
Which library does read start-up files? ;-) |
comment:3
@jdemeyer: disable_sigchdl_handler.patch is what you're looking for. @nexttime: good catch! I had the impression that maxima was used as a library within ecl, but that ecl was used through its commandline. But indeed now that you ask, I see there is also a direct use of ecl-as-a-library. What saves the day though is that sage's ecl.pyx calls cl_boot itself, and hence it should be possible to modify the setting before that call. I should be able to do something about it. |
comment:4
(1) unicode: I suppose there are no fundamental obstacles for that. However, you'll have to essentially rewrite the ecllib wrapper. With Py3 this might become worthwhile, since that has unicode strings internally anyway (although undoubtedly stored with an encoding different from ecl's). Also, our main use, Maxima, is solidly pre-unicode, so I don't think there will be any benefits for us and probably extra problems from Maxima possibly getting unexpected data. (2) signals: ECL has very complex and ingenious infrastructure to deal with signals, and it expects to handle signals itself (which is a bit odd for a library). With threads enabled there will be a separate thread for asynchronous signals, and Boehm repurposes some exotic signals to sync threads on GC events. We cannot afford to submit to ECL's way of handling signals, so we do some pretty horrible stuff with signals when starting ECL anyway (and every time we call into ECL for longer times!) Disabling SIGCHLD is probably the least of your worries. Also, I don't think ECL does anything with SIGCHLD events anyway (other than possibly installing its own handler to provide a hook for ecl programs and which by default ignores the signal) |
This comment has been minimized.
This comment has been minimized.
comment:5
Replying to @SnarkBoojum:
Sorry, I was looking at an older version of the ECL spkg (this patch is a very recent addition). |
comment:6
@nbruin(1) where is the ticket about the python3 transition? As far as I know, a few sagenb deps (notably twisted and flask if I remember well) and some of sage's standard packages (for example pil) are a concern in that matter, but I can't find the relevant ticket. @nbruin(2) I'll manage to deal with it : there's just an option to set in sage/libs/ |
comment:7
I just found that sage/libs/ecl.pxd has a copy of ecl's src/h/external.h's ecl_option enum... lacking the ECL_OPT_TRAP_SIGCHLD item! That means all subsequent items in the list are off-by-one... how is that code even supposed to run correctly!? |
comment:8
Replying to @SnarkBoojum:
I assume that's an "extern" definition. It just gets translated literally into the C-source which then uses the values that It may well be that particular member wasn't in ecl when the wrapper was written. Add it if you need it. |
comment:9
Replying to @SnarkBoojum:
I don't think there is a ticket yet, because it's obvious it's not going to happen anytime soon. |
comment:10
Replying to @jdemeyer:
A ticket isn't just about something which will happen just now ; it's a central place where ideas get gathered about an issue. In this case, a ticket listing what is holding back sage for the switch to python3 would probably be worthy. |
comment:11
Replying to @SnarkBoojum:
Ah, indeed! You should just add that in
before the boot call. Looked like Volker went for the quick-and-dirty solution there on #14055. Note that even with that option, ECL still does install a SIGCHLD handler. However, we're not putting that back when we call ECL. Does SIGCHLD also need special treatment in |
comment:12
Replying to @nbruin:
Preferably, we don't have any Maybe it can be made to work with |
comment:13
Replying to @jdemeyer:
I wondered about that. It's not clear to me why in our situation it even makes a difference what we do to The Sage |
Attachment: ecl-12.12.1.p4.spkg.gz ECL spkg without the SIGCHLD patch to upstream |
Patch programmatically disabling SIGCHLD in sagelib's ECL code |
This comment has been minimized.
This comment has been minimized.
comment:14
Attachment: trac_14636_sigchld.patch.gz |
Work Issues: doctest |
comment:15
Please add the following doctest (
|
comment:16
There is another complication with the test: the doctesting framework itself messes with |
comment:17
Unicode: See #12985. When I implemented Given that all of calculus is designed to work with |
comment:65
No failing doctest ; now src/ is generated by a patched spkg-src. |
comment:66
It's still ok with 5.12.beta4. |
This comment has been minimized.
This comment has been minimized.
comment:67
Replying to @SnarkBoojum:
Again, that's only a claim. A doctest can prove you are right. |
comment:68
Replying to @jdemeyer:
OOOHHH!!!! You want me to ADD a doctest! I'm not sure it makes much sense to follow a line "a=0" by a doctest "a==0", but if you want I'll add one. |
Work Issues: add doctest |
comment:69
I see that trac_14636_2.patch is the same (up to a slight edit in the commit) than the patch in #12985 so incorporating this ticket would make it a duplicate. |
comment:70
In the spirit of having one ticket per issue I've broken off the part about using and doctesting |
Changed author from Julien Puydt to Volker Braun |
comment:71
Duplicate of #12985, so close one of them. This one. |
comment:72
Replying to @SnarkBoojum:
I've just pushed the build formula used on sage-on-gentoo into a branch associated with ticket:16178. |
comment:73
Replying to @jpflori:
With [ticket:16178 the new maxima build system] included in sage 6.2, do you want to aim for an ECL update for 6.3? |
Reviewer: Volker Braun, Peter Bruin |
Changed author from Volker Braun to none |
My debian/sage experiments have uncovered that sage's ecl package was compiled with a few tweaks:
(1) it is compiled with unicode disabled ; this is to avoid errors, like those which can be read about in this gentoo report. But that doesn't look like a real solution!
(2) SIGCHLD is disabled by directly patching the sources (
patches/disable_sigchdl_handler.patch
)(3) threading is disabled ; I'll open another ticket for that, so let's that aside for now (and for this ticket)
To fix this ticket:
(1) use this ecl spkg (spkg diff) ;
(2) apply attachment: trac_14636_1.patch and attachment: trac_14636_2.patch to sagelib (in that order).
This fix is against sage 5.12.beta4.
CC: @jpflori
Component: packages: standard
Work Issues: add doctest
Reviewer: Volker Braun, Peter Bruin
Issue created by migration from https://trac.sagemath.org/ticket/14636
The text was updated successfully, but these errors were encountered: