Opened 3 years ago

Closed 3 years ago

#20894 closed enhancement (fixed)

Sage package for Perl 5 readline library

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.3
Component: packages: experimental Keywords:
Cc: vdelecroix, vbraun, embray, jdemeyer, dimpase, kcrisman, tscrim Merged in:
Authors: Matthias Koeppe Reviewers: Karl-Dieter Crisman, Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: cfffc5e (Commits) Commit: cfffc5e577405f996f10471273ee137d8cbd7966
Dependencies: Stopgaps:

Change History (32)

comment:1 Changed 3 years ago by mkoeppe

  • Description modified (diff)

comment:2 Changed 3 years ago by mkoeppe

  • Branch set to u/mkoeppe/sage_package_for_perl_5_readline_library

comment:3 Changed 3 years ago by mkoeppe

  • Cc vbraun embray jdemeyer dimpase added
  • Commit set to ac4779403ecf003fdcd25fd9fcd8ba2b97c04575
  • Status changed from new to needs_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 3 years ago by kcrisman

  • Cc kcrisman added

comment:5 Changed 3 years ago by kcrisman

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 follow-up: Changed 3 years ago by kcrisman

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 3 years ago by kcrisman

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 3 years ago by kcrisman (previous) (diff)

comment:8 Changed 3 years ago by kcrisman

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 3 years ago by kcrisman (previous) (diff)

comment:9 in reply to: ↑ 6 Changed 3 years ago by mkoeppe

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 3 years ago by mkoeppe

  • Authors set to Matthias Koeppe

comment:11 Changed 3 years ago by kcrisman

  • Reviewers set to 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 follow-up: Changed 3 years ago by tmonteil

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

comment:13 Changed 3 years ago by git

  • Commit changed from ac4779403ecf003fdcd25fd9fcd8ba2b97c04575 to cfffc5e577405f996f10471273ee137d8cbd7966

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 ; follow-up: Changed 3 years ago by 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.

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 3 years ago by tmonteil

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 3 years ago by mkoeppe

  • Cc tscrim added

comment:17 Changed 3 years ago by mkoeppe

  • Reviewers changed from Karl-Dieter Crisman to Karl-Dieter Crisman + needs more reviewers
  • Summary changed from Sage package for Perl 5 readline library to Sage package for Perl 5 readline library -- needs test on Linux platforms

comment:18 Changed 3 years ago by dimpase

I will do testing on i686

comment:19 Changed 3 years ago by dimpase

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 3 years ago by dimpase

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 3 years ago by mkoeppe

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 3 years ago by dimpase

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

comment:23 Changed 3 years ago by mkoeppe

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 3 years ago by dimpase

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 3 years ago by mkoeppe

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 3 years ago by dimpase

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 3 years ago by mkoeppe

Should this be an experimental or an optional package?

comment:28 Changed 3 years ago by dimpase

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 3 years ago by mkoeppe

OK, then I leave it as experimental.

comment:30 Changed 3 years ago by mkoeppe

  • Reviewers changed from Karl-Dieter Crisman + needs more reviewers to Karl-Dieter Crisman, Dima Pasechnik
  • Summary changed from Sage package for Perl 5 readline library -- needs test on Linux platforms to Sage 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 3 years ago by dimpase

  • Status changed from needs_review to positive_review

looks good to me

comment:32 Changed 3 years ago by vbraun

  • Branch changed from u/mkoeppe/sage_package_for_perl_5_readline_library to cfffc5e577405f996f10471273ee137d8cbd7966
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.