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
Update FriCAS to 1.2.7 (current) #21209
Comments
This comment has been minimized.
This comment has been minimized.
comment:4
I am currently rebuilding sage-develop... Do I understand correctly that I should rename |
comment:5
Replying to @mantepse:
Would make sense. Not sure if we can/should strip (=repackage) the tarball anyway; the description at least sounds as if there were things included we don't need for Sage / to ship. But it isn't huge either. If you do, you could create an |
comment:6
More precisely, |
comment:7
Replying to @nexttime:
As far as I know: no, the things included in the "full" tarball are precisely those needed. Unfortunately, build with ecl fails for the same reason as reported. |
comment:8
From Dima via sage-devel: ECL does not use uffi: prefix any more, it's ffi: instead, according to their docs. Currently running the build, takes a while... |
comment:9
Dima said the following works: diff -Naur fricas-1.2.7.orig/src/lisp/fricas-lisp.lisp fricas-1.2.7/src/lisp/fricas-lisp.lisp
--- fricas-1.2.7.orig/src/lisp/fricas-lisp.lisp 2015-09-25 02:06:15.000000000 +0200
+++ fricas-1.2.7/src/lisp/fricas-lisp.lisp 2016-08-11 21:57:25.840863287 +0200
@@ -556,10 +556,10 @@
(dolist (el strs)
(setf wrapper `(FFI:WITH-CSTRING ,el ,wrapper)))
(setf wrapper `(defun ,name ,largs ,wrapper))
- `(progn (uffi:def-function (,c-name ,sym)
+ `(progn (ffi:def-function (,c-name ,sym)
,fargs :returning ,l-ret)
,wrapper))
- `(uffi:def-function (,c-name ,name)
+ `(ffi:def-function (,c-name ,name)
,fargs :returning ,l-ret)))))
(defmacro fricas-foreign-call (name c-name return-type &rest arguments)
@@ -788,14 +788,14 @@
#+:ecl
(progn
-(uffi:def-function ("sock_get_string_buf" sock_get_string_buf_wrapper)
+(ffi:def-function ("sock_get_string_buf" sock_get_string_buf_wrapper)
((purpose :int) (buf (:array :unsigned-char 10000)) (len :int))
:returning :void)
(defun |sockGetStringFrom| (purpose)
- (uffi:with-foreign-object (buf '(:array :unsigned-char 10000))
+ (ffi:with-foreign-object (buf '(:array :unsigned-char 10000))
(sock_get_string_buf_wrapper purpose buf 10000)
- (uffi:convert-from-foreign-string buf)))
+ (ffi:convert-from-foreign-string buf)))
)
@@ -825,7 +825,7 @@
(LISP::defentry |makedir| (LISP::string) (LISP::int "makedir")))
#+:ecl
-(uffi:def-function ("directoryp" raw_file_kind)
+(ffi:def-function ("directoryp" raw_file_kind)
((arg :cstring))
:returning :int)
#+:ecl
@@ -834,7 +834,7 @@
(raw_file_kind cname)))
#+:ecl
-(uffi:def-function ("makedir" raw_makedir)
+(ffi:def-function ("makedir" raw_makedir)
((arg :cstring))
:returning :int)
( |
This comment has been minimized.
This comment has been minimized.
comment:11
I can confirm this, the build just finished. I am now looking for tests. |
Upstream: Not yet reported upstream; Will do shortly. |
Commit: |
Branch: u/dimpase/fricas127 |
New commits:
|
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. Developers acknowledge bug. |
comment:13
Here is a discussion on FriCAS list. |
Author: Dima Pasechnik |
comment:14
As far as I can see fix is CL-y, because it is fixing precisely the ecl-dependend functions... I am still looking into the tests, but I suppose fixing them belongs to a different ticket. Can I give this positive review? (It works on my computer...) |
comment:15
I'd also add Is there a test suite? Does |
comment:16
P.S.: I'd also say fixing (now?) broken doctests belongs to updating the package. |
comment:17
Replying to @nexttime:
Needless to say, all the 44 tests from |
comment:18
Replying to @dimpase:
There are more elsewhere. (I assume you did specify |
comment:19
There is one trivial fix in Can anybody tell me where the method
? |
comment:20
Just found out, it's provided by FriCAS. But it's use is very likely abuse. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:46
Replying to @dimpase:
Well, unfortunately due to popular demand this product is currently out of stock. |
Changed branch from u/dimpase/fricas127 to |
comment:48
Looks like I'm having more than a dozen |
Changed commit from |
comment:50
Replying to @mantepse:
Just with the old interface, hence I reported it here. (There were 27 orphans from perhaps testing So when reviewing #21231, one should look whether there's still a problem. |
comment:51
Replying to @nexttime:
Could you provide a testcase, or some instructions how to see the orphans? That would make things much easier for me - because I have no idea how to do this... |
comment:52
To see if there are orphans on Linux, look at the output of
I see a couple of these just after one run of
|
comment:53
Replying to @mantepse:
Ah, sorry, forgot to answer. You can also use e.g. (And |
comment:54
Note that you should look a while after you've left Sage, as normally the Sage Cleaner should kill them (but that only works if the interfaces are properly written / their PIDs properly recorded). |
comment:55
Thank you. Indeed, there is a bug. However, I don't know yet how to fix it, I thought that |
comment:56
Replying to @mantepse:
I think the problem is that more child processes of FriCAS are launched than
which is as it should be, as Here is how it goes: I start Sage and execute
of which the 1st one corresponds to PID reported by If I issue
Probably, the information on these extra processes' PIDs has to be registered somewhere for |
comment:57
Are you sure that Simply killing a few processes is error prone, I'd say. |
comment:58
Do you know how FriCAS launches these (sub?)processes? |
comment:59
The purpose of the Sage Cleaner is not to shut down pexpect interfaces, that is supposed to be done by Sage when exiting. The Sage Cleaner is just there to afterwards (after a while) kill spawned processes if something went wrong. And he doesn't know child processes spawned by these foreign ones, they have to belong to the same process group to make killing them work. |
comment:60
Replying to @dimpase:
I cannot see this in the code. However, I do see it when tracing. Possibly a newline is missing?
No. |
comment:61
Replying to @nexttime:
OK, what happens is more subtle: if IMHO this means that |
comment:62
I just noticed that
It shouldn't. If I use |
comment:63
Replying to @mantepse:
well, IMHO if Here your command has no effect:
Please check that you don't see the same picture with your new interface. |
comment:64
On my computer,
|
comment:65
Replying to @mantepse:
no, what you see is that fricas is running, with pid 10923, and that |
comment:66
Dima, I don't understand your reasoning. I would think that the first line below quits the fricas process on my machine, as the output of the second line shows.
The third line is in accordance with the doc of
So, in my opinion a possible fix is to append a No idea though why fricas needs it, and, for example, gap, doesn't. |
comment:67
Sorry, indeed, I didn't quite parse what you wrote. Anyhow, as soon as your new interface is ready, I'd be glad to have a look at it. Are there any git-related issues you need to fix? |
comment:68
Replying to @dimpase:
Thank you!
Indeed - I made a mess with the commits and found no time to correct them. It would be of great help if you could, for example, create a "clean" branch from my branch, deleting all the commits which obviously don't belong (I made a list at the ticket). I think the only work that remains to be done there is to add that "\r" to the quitstring, add a test to the If the following an acceptable test for
|
comment:69
Replying to @mantepse:
Unfortunately no. Neither Rather orthogonal to that, you must not use |
comment:70
Jeroen just suggested on sage-devel to make the Python package You could look into that for retrieving process information in a portable way. |
comment:71
I just managed to install
This remaining job is killed when exiting sage. However:
So it's better, but not perfect. Is it good enough? |
subject says it all, see http://fricas.sourceforge.net/
The current version in Sage, 1.2.4, does no longer build with our version of ECL. But 1.2.7 still has the same problem, so needs to get patched for it, replacing
uffi:
byffi:
insrc/lisp/fricas-lisp.lisp
.Upstream source tarball:
https://sourceforge.net/projects/fricas/files/fricas/1.2.7/fricas-1.2.7-full.tar.bz2
(with ads, but automatic download after a few seconds)
Upstream: Fixed upstream, in a later stable release.
CC: @dkrenn @mantepse @hemmecke
Component: packages: experimental
Keywords: uffi ECL
Author: Dima Pasechnik
Branch:
6d91694
Reviewer: Martin Rubey, Leif Leonhardy
Issue created by migration from https://trac.sagemath.org/ticket/21209
The text was updated successfully, but these errors were encountered: