Troubles communicating with Sage 7.4

97 views
Skip to first unread message

Andrey Novoseltsev

unread,
Oct 21, 2016, 11:01:06 PM10/21/16
to sage-devel
Hello,

I need help figuring out what's going on when I am preparing Sage for SageMathCell.

When the script is at
https://github.com/sagemath/sagecell/blob/master/contrib/vm/container_manager.py#L445
trying to pipe some commands into a freshly compiled Sage it crashes. The crash report is attached and the problem seems to be with a wrong or absent terminal (given that it is done by a script in screen).

After the build there is "Sage starts OK" message and if I try to connect via interactive terminal and execute commands by hand everything is fine. Exactly the same setup was also going without crashes for 7.3, so it is some recent change/upgrade.

Thank you!
Andrey
Sage_crash_report.txt

Volker Braun

unread,
Oct 22, 2016, 3:49:57 PM10/22/16
to sage-devel

Andrey Novoseltsev

unread,
Oct 23, 2016, 1:52:20 AM10/23/16
to sage-devel
On Saturday, 22 October 2016 13:49:57 UTC-6, Volker Braun wrote:

Thanks a lot Volker!

That fixed the crash, but I have further problems (now with 7.5beta0 + #21743), sending new line during installation of an experimental package (cryptominisat) is ignored here:
https://github.com/sagemath/sagecell/blob/master/contrib/vm/container_manager.py#L461
The terminal got stuck on the [Y/n] question and then continued when I pressed Enter myself. Any clue or solution for this one?

Matthias Koeppe

unread,
Oct 23, 2016, 3:18:58 AM10/23/16
to sage-devel


On Saturday, October 22, 2016 at 10:52:20 PM UTC-7, Andrey Novoseltsev wrote:
 I have further problems (now with 7.5beta0 + #21743), sending new line during installation of an experimental package (cryptominisat) is ignored here:
https://github.com/sagemath/sagecell/blob/master/contrib/vm/container_manager.py#L461
The terminal got stuck on the [Y/n] question and then continued when I pressed Enter myself. Any clue or solution for this one?

Andrey Novoseltsev

unread,
Oct 23, 2016, 4:23:10 PM10/23/16
to sage-devel

That's a stale ticket that would allow one to turn of the prompt, but the real problem is "communicating with Sage"  - I am trying to provide an answer to the question by sending a newline through the pipe, but it is ignored.

Andrey Novoseltsev

unread,
Oct 23, 2016, 7:18:39 PM10/23/16
to sage-devel
Yet another possibly related problem: when installing qhull from a script it errors out with
...
cd lib && ln -f -s libqhull_r.so.7.2.0 libqhull_r.so


===================================================
== If user_eg fails to link on MinGW or Cygwin, use
==   "make SO=dll" and copy lib/libqhull_r.dll to bin/
== Otherwise if user_eg fails to link, switch to -lqhullstatic_r
===================================================

gcc -o bin/user_eg src/user_eg/user_eg_r.o -O3 -ansi -Isrc -fpic -Wall -Wcast-qual -Wextra -Wwrite-strings -Wshadow  -Llib -lqhull_r -lm
bin/qconvex
QH6075 qhull input error: short input file.  Did not find dimension and number of points

While executing:  | qconvex
Options selected for Qhull 2015.2 2016/01/18:
  run-id 1314731036
Makefile:323: recipe for target 'qconvex-prompt' failed
make[2]: *** [qconvex-prompt] Error 1
make[2]: Leaving directory '/home/sc_serv/sage/local/var/tmp/sage/build/qhull-2015-src-7.2.0/src'
Error building qhull
...

If I try to install qhull after that in an interactive terminal everything is OK. The line "While executing:  | qconvex" suggests that perhaps there are again issues with pipes.

Andrey Novoseltsev

unread,
Oct 24, 2016, 12:14:07 AM10/24/16
to sage-devel
On Sunday, 23 October 2016 14:23:10 UTC-6, Andrey Novoseltsev wrote:
That's a stale ticket that would allow one to turn of the prompt, but the real problem is "communicating with Sage"  - I am trying to provide an answer to the question by sending a newline through the pipe, but it is ignored.

Apparently this is due to
...
read -p "Are you sure you want to continue [Y/n]? " answer < /dev/tty > /dev/tty 2>&1
...
In my humble but strong opinion command line applications should respect standard redirection/pipes...

Matthias Koeppe

unread,
Oct 24, 2016, 1:05:11 AM10/24/16
to sage-devel
Ticket #21082 - Prompting about experimental packages: `sage -i -y` is now ready for review. 
Reply all
Reply to author
Forward
0 new messages