Opened 6 years ago

Closed 6 years ago

#20894 closed enhancement (fixed)

Sage package for Perl 5 readline library

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-7.3
Component: packages: experimental Keywords:
Cc: Vincent Delecroix, Volker Braun, Erik Bray, Jeroen Demeyer, Dima Pasechnik, Karl-Dieter Crisman, Travis Scrimshaw Merged in:
Authors: Matthias Koeppe Reviewers: Karl-Dieter Crisman, Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: cfffc5e (Commits, GitHub, GitLab) Commit: cfffc5e577405f996f10471273ee137d8cbd7966
Dependencies: Stopgaps:

Status badges

Change History (32)

comment:1 Changed 6 years ago by Matthias Köppe

Description: modified (diff)

comment:2 Changed 6 years ago by Matthias Köppe

Branch: u/mkoeppe/sage_package_for_perl_5_readline_library

comment:3 Changed 6 years ago by Matthias Köppe

Cc: Volker Braun Erik Bray Jeroen Demeyer Dima Pasechnik added
Commit: ac4779403ecf003fdcd25fd9fcd8ba2b97c04575
Status: newneeds_review

Not sure if this installation should be done using CPAN scripts instead.


New commits:

3c5a4acAdd Sage package for Perl 5 readline library
ac47794Set PERL5LIB environment variable

comment:4 Changed 6 years ago by Karl-Dieter Crisman

Cc: Karl-Dieter Crisman added

comment:5 Changed 6 years ago by Karl-Dieter Crisman

This always was a big part of the struggle for me in getting this to work on Mac. Hopefully it can be portable to pre-10.11 as well but at least if it is working on some OS X it will be a huge improvement - I regularly see papers citing polymake or latte which could be using Sage to interface better with them and other stuff.

comment:6 Changed 6 years ago by Karl-Dieter Crisman

There is a problem in the way we do things now with experimental packages. Here is what I saw:

make[1]: warning: -jN forced in submake: disabling jobserver mode.
sage-logger -p 'sage-spkg  perl_term_readline_gnu-1.34' '/Users/karl.crisman/Downloads/sage/logs/pkgs/perl_term_readline_gnu-1.34.log'
[perl_term_readline_gnu-1.34] Found local metadata for perl_term_readline_gnu-1.34
[perl_term_readline_gnu-1.34] =========================== WARNING ===========================
[perl_term_readline_gnu-1.34] You are about to download and install an experimental package.
[perl_term_readline_gnu-1.34] This probably won't work at all for you! There is no guarantee
[perl_term_readline_gnu-1.34] that it will build correctly, or behave as expected.
[perl_term_readline_gnu-1.34] Use at your own risk!
[perl_term_readline_gnu-1.34] ===============================================================
<hang>

but actually it was waiting for me to answer

[perl_term_readline_gnu-1.34] Are you sure you want to continue [Y/n]? 

which the second time I did. In the old ./sage -i this worked okay, but somehow with the new logging system it sort of failed. Don't know if fixing this belongs on this ticket, though. (Jeroen, I think you've tried out more experimental packages than most - thoughts?)

comment:7 Changed 6 years ago by Karl-Dieter Crisman

But #20892 still does:

[polymake-3.0r1] Thread model: posix
[polymake-3.0r1] gcc version 4.9.3 (GCC) 
[polymake-3.0r1] ****************************************************
[polymake-3.0r1] checking C++ compiler ... ok (g++ is GCC 4.9.3)
[polymake-3.0r1] checking C++ library ... ok (GNU stdlibc++ 20150626, C++ 199711)
[polymake-3.0r1] checking fink installation ... The Fink package system is a mandatory prerequisite to build and use polymake under MacOS.
[polymake-3.0r1] Please refer to http://www.polymake.org/doku.php/mac for details and installation instructions.
[polymake-3.0r1] If you already have Fink installed at a non-standard location, please specify it using option --with-fink
[polymake-3.0r1] Several configurations for MacOS platform found;
[polymake-3.0r1] Please specify the desired one using the option Arch=<NAME>.
[polymake-3.0r1] Makefile:32: *** CONFIGURATION ERROR.  Stop.
[polymake-3.0r1] Several configurations for MacOS platform found;
[polymake-3.0r1] Please specify the desired one using the option Arch=<NAME>.
[polymake-3.0r1] Makefile:32: *** CONFIGURATION ERROR.  Stop.
[polymake-3.0r1] 
[polymake-3.0r1] real	0m1.003s
[polymake-3.0r1] user	0m0.415s
[polymake-3.0r1] sys	0m0.219s
[polymake-3.0r1] ************************************************************************
[polymake-3.0r1] Error installing package polymake-3.0r1
[polymake-3.0r1] ************************************************************************

I see you have some special instructions at comment:17:ticket:20892 so I'll try that.

Last edited 6 years ago by Karl-Dieter Crisman (previous) (diff)

comment:8 Changed 6 years ago by Karl-Dieter Crisman

Apparently this is working well enough that I'd say one could give it positive review (modulo comment:6, if relevant). But I would like to hear from Linuces. I have to admit I was never successful in getting this to work on my older Mac but apparently the Perl part actually does here!

Last edited 6 years ago by Karl-Dieter Crisman (previous) (diff)

comment:9 in reply to:  6 Changed 6 years ago by Matthias Köppe

Replying to kcrisman:

There is a problem in the way we do things now with experimental packages. Here is what I saw:

<hang>

but actually it was waiting for me to answer

[perl_term_readline_gnu-1.34] Are you sure you want to continue [Y/n]? 

which the second time I did.

This is bug #20884.

comment:10 Changed 6 years ago by Matthias Köppe

Authors: Matthias Koeppe

comment:11 Changed 6 years ago by Karl-Dieter Crisman

Reviewers: Karl-Dieter Crisman

Okay, then I think all we need for positive review is someone to test this doesn't break anything. (E.g. on Linux or Cygwin...) Very nice!

comment:12 Changed 6 years ago by Thierry Monteil

The ARCHFLAGS='-arch x86_64' looks weird. How does it behaves on other architectures ?

comment:13 Changed 6 years ago by git

Commit: ac4779403ecf003fdcd25fd9fcd8ba2b97c04575cfffc5e577405f996f10471273ee137d8cbd7966

Branch pushed to git repo; I updated commit sha1. New commits:

4088becMerge tag '7.3.beta6' into t/20894/sage_package_for_perl_5_readline_library
cfffc5eConditionalize ARCHFLAGS based on uname

comment:14 in reply to:  12 ; Changed 6 years ago by Matthias Köppe

Replying to tmonteil:

The ARCHFLAGS='-arch x86_64' looks weird. How does it behaves on other architectures ?

I now do this only on Mac OS X and use uname.

It needs testing ("review") to know whether this ticket works on other architectures. I don't have access to other architectures at the moment.

comment:15 in reply to:  14 Changed 6 years ago by Thierry Monteil

Replying to mkoeppe:

Replying to tmonteil:

The ARCHFLAGS='-arch x86_64' looks weird. How does it behaves on other architectures ?

I now do this only on Mac OS X and use uname.

Looks indeed better like this. I will test on i686 soon (i am currently doing some computations there, perhaps for 3-4 more days).

It needs testing ("review") to know whether this ticket works on other architectures. I don't have access to other architectures at the moment.

comment:16 Changed 6 years ago by Matthias Köppe

Cc: Travis Scrimshaw added

comment:17 Changed 6 years ago by Matthias Köppe

Reviewers: Karl-Dieter CrismanKarl-Dieter Crisman + needs more reviewers
Summary: Sage package for Perl 5 readline librarySage package for Perl 5 readline library -- needs test on Linux platforms

comment:18 Changed 6 years ago by Dima Pasechnik

I will do testing on i686

comment:19 Changed 6 years ago by Dima Pasechnik

the upstream tarball is not wgetttable - I get "scheme missing"... While this does not prevent testing, release manager won't be amused.

comment:20 Changed 6 years ago by Dima Pasechnik

On x86_64 this installs well, but polymake installation fails:

...
[polymake-3.0r1] checking mpfr installation ... ok
[polymake-3.0r1] checking shared perl library ... Can't locate ExtUtils/Embed.pm in @INC (you may need to install the ExtUtils::Embed module) (@INC contains: /home/scratch/dimpase/sage/sage/local/lib/perl5/x86_64-linux-thread-multi /home/scratch/dimpase/sage/sage/local/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
[polymake-3.0r1] BEGIN failed--compilation aborted.
[polymake-3.0r1] Can't locate ExtUtils/Embed.pm in @INC (you may need to install the ExtUtils::Embed module) (@INC contains: /home/scratch/dimpase/sage/sage/local/lib/perl5/x86_64-linux-thread-multi /home/scratch/dimpase/sage/sage/local/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
[polymake-3.0r1] BEGIN failed--compilation aborted.
[polymake-3.0r1] failed
[polymake-3.0r1] 
[polymake-3.0r1] Could not compile a test program for the libperl.so shared library.
[polymake-3.0r1] The build error is as follows:
[polymake-3.0r1] /tmp/polymake_10418_configure.cc:1:20: fatal error: EXTERN.h: No such file or directory
[polymake-3.0r1] compilation terminated.
[polymake-3.0r1] 

comment:21 Changed 6 years ago by Matthias Köppe

Thanks for testing. Could you try to find out which packages on your distribution need to be installed for this to work? We could add this information to the polymake package readme. However, I don't see us including all kinds of Perl prerequisites as Sage packages. I consider libterm-readline-gnu an exception because it's not available on OS X; fink does not have a package for it; we already have libreadline; the CPAN script fails to install it on OS X.

comment:22 Changed 6 years ago by Dima Pasechnik

Do you mean that on Linux you would not need to use this package, and system-wide Perl would do?

comment:23 Changed 6 years ago by Matthias Köppe

I think a system-wide Perl with the necessary modules would do; but given that we unconditionally install readline (it being a standard package) even on Linux (which probably also has readline, though maybe not the header files), perhaps we want to use our readline for Perl as well for consistency.

comment:24 Changed 6 years ago by Dima Pasechnik

I am testing this on Fedora 23, and the missing header EXTERN.h is installed, it is in /usr/lib64/perl5/CORE/. This seems to be quite messy; perl people recommend doing

$ perl -MConfig -e 'print "$Config{archlib}\n"'

to get the path to default perl install. On Ubuntu I get /usr/lib/perl/5.18, on Fedora 23 I get /usr/lib64/perl5. Thus polymake ought to use the output of that perl call to construct a path to EXTERN.h.

comment:25 Changed 6 years ago by Matthias Köppe

This check in Polymake's configure script is in support/configure.pl lines 718- Could you look what's going on and/or report this failure on Fedora 23 in the polymake forum? I think this is not Sage-specific. https://forum.polymake.org/viewforum.php?f=10

comment:26 Changed 6 years ago by Dima Pasechnik

In fact, after $ sudo yum install perl-ExtUtils-Embed (took a while to dig up) polymake is building. I'll report this on polymake forum.

comment:27 Changed 6 years ago by Matthias Köppe

Should this be an experimental or an optional package?

comment:28 Changed 6 years ago by Dima Pasechnik

let's start with experimental. Optional needs approval on sage-devel, as well as passing all its tests... IMHO it and polymake should go in lockstep in this.

comment:29 Changed 6 years ago by Matthias Köppe

OK, then I leave it as experimental.

comment:30 Changed 6 years ago by Matthias Köppe

Reviewers: Karl-Dieter Crisman + needs more reviewersKarl-Dieter Crisman, Dima Pasechnik
Summary: Sage package for Perl 5 readline library -- needs test on Linux platformsSage package for Perl 5 readline library

If I understand the procedure correctly (https://trac.sagemath.org/ticket/20529#comment:15), this ticket might be ready for positive_review as buildbots will do further builds on other platforms.

comment:31 Changed 6 years ago by Dima Pasechnik

Status: needs_reviewpositive_review

looks good to me

comment:32 Changed 6 years ago by Volker Braun

Branch: u/mkoeppe/sage_package_for_perl_5_readline_librarycfffc5e577405f996f10471273ee137d8cbd7966
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.