Skip to content
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

Sage package for Perl 5 readline library #20894

Closed
mkoeppe opened this issue Jun 27, 2016 · 34 comments
Closed

Sage package for Perl 5 readline library #20894

mkoeppe opened this issue Jun 27, 2016 · 34 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 27, 2016

This is a prerequisite for building Polymake (#20892) on Mac OS X.

http://search.cpan.org/~hayashi/Term-ReadLine-Gnu-1.34/

http://search.cpan.org/CPAN/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-1.34.tar.gz

CC: @videlec @vbraun @embray @jdemeyer @dimpase @kcrisman @tscrim

Component: packages: experimental

Author: Matthias Koeppe

Branch/Commit: cfffc5e

Reviewer: Karl-Dieter Crisman, Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/20894

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 27, 2016

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 27, 2016

comment:3

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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 27, 2016

Commit: ac47794

@kcrisman
Copy link
Member

comment:5

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.

@kcrisman
Copy link
Member

comment:6

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?)

@kcrisman
Copy link
Member

comment:7

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 #20892 comment:17 so I'll try that.

@kcrisman
Copy link
Member

comment:8

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!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 28, 2016

comment:9

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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 28, 2016

Author: Matthias Koeppe

@kcrisman
Copy link
Member

comment:11

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!

@kcrisman
Copy link
Member

Reviewer: Karl-Dieter Crisman

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Jun 30, 2016

comment:12

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2016

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2016

Changed commit from ac47794 to cfffc5e

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 1, 2016

comment:14

Replying to @sagetrac-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.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Jul 1, 2016

comment:15

Replying to @mkoeppe:

Replying to @sagetrac-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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman + needs more reviewers

@mkoeppe mkoeppe changed the title Sage package for Perl 5 readline library Sage package for Perl 5 readline library -- needs test on Linux platforms Jul 7, 2016
@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:18

I will do testing on i686

@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:19

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

@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:20

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] 

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

comment:21

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.

@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:22

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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

comment:23

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.

@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:24

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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

comment:25

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

@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:26

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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

comment:27

Should this be an experimental or an optional package?

@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:28

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.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

comment:29

OK, then I leave it as experimental.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

comment:30

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

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 7, 2016

Changed reviewer from Karl-Dieter Crisman + needs more reviewers to Karl-Dieter Crisman, Dima Pasechnik

@mkoeppe mkoeppe changed the title Sage package for Perl 5 readline library -- needs test on Linux platforms Sage package for Perl 5 readline library Jul 7, 2016
@dimpase
Copy link
Member

dimpase commented Jul 7, 2016

comment:31

looks good to me

@vbraun
Copy link
Member

vbraun commented Jul 9, 2016

Changed branch from u/mkoeppe/sage_package_for_perl_5_readline_library to cfffc5e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants