Opened 21 months ago

Closed 7 months ago

Last modified 7 months ago

#24905 closed enhancement (fixed)

Upgrade polymake to version 3.4

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-8.8
Component: packages: optional Keywords: IMA-PolyGeom, thursdaysbdx
Cc: SimonKing, jipilab, vdelecroix, slelievre, gh-sophiasage, paffenholz@…, kastner@… Merged in:
Authors: Matthias Koeppe, Jean-Philippe Labbé, Dima Pasechnik Reviewers: Matthias Koeppe, Jean-Philippe Labbé, Dima Pasechnik
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: public/upgrade_polymake_to_version_3_2r4 (Commits) Commit: 2eda6e11325d5d997f0de64e9d9f7add42fa7adb
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

https://polymake.org/doku.php/download/start#get_latest_stable_release33

To build it for Sage do:

(cd upstream && wget https://polymake.org/lib/exe/fetch.php/download/polymake-3.4-minimal.tar.bz2)

pull this ticket and build sage

make build

Then Read (and follow) the installation instructions regarding Perl prereqs on your platform:

./sage -info polymake

Finally:

./sage -i polymake

Attachments (3)

polymake-3.2r4.log (18.8 KB) - added by selia 8 months ago.
log of a failed compilation.
polymake-3.4.log (6.1 KB) - added by gh-sophiasage 7 months ago.
log of failed compilation. mac os mojave
polymake.log (6.4 KB) - added by gh-LaisRast 7 months ago.
sage -t src/sage/interfaces/polymake.py

Download all attachments as: .zip

Change History (173)

comment:1 Changed 21 months ago by mkoeppe

  • Dependencies set to #24921
  • Description modified (diff)

comment:2 Changed 20 months ago by mkoeppe

  • Branch set to u/mkoeppe/upgrade_polymake_to_version_3_2r2

comment:3 Changed 20 months ago by git

  • Commit set to ca75153778edc640a002a3a0a731c8ca17526cc9

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

ca75153polymake: Add ninja_build as dependency

comment:4 Changed 20 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Status changed from new to needs_review

comment:5 Changed 20 months ago by jdemeyer

  • Status changed from needs_review to needs_work

ninja_build should be an order-only dependency (after the | symbol)

comment:6 Changed 20 months ago by jdemeyer

All other packages have $(MP_LIBRARY) in their dependencies instead of $(INST)/$(SAGE_MP_LIBRARY). I guess this should be changed.

comment:7 follow-up: Changed 20 months ago by jdemeyer

Unfortunately, I cannot test this because perl_term_readline_gnu fails to install:

[perl_term_readline_gnu-1.34] Could not find neither libtermcap.a, libncurses.a, or libcurses.

Indeed, there is no libncurses.a installed (but libncurses.so is).

comment:8 in reply to: ↑ 7 ; follow-up: Changed 20 months ago by mkoeppe

Replying to jdemeyer:

Unfortunately, I cannot test this because perl_term_readline_gnu fails to install:

[perl_term_readline_gnu-1.34] Could not find neither libtermcap.a, libncurses.a, or libcurses.

Indeed, there is no libncurses.a installed (but libncurses.so is).

Could you create a separate ticket for this (and include more log detail)?

comment:9 Changed 20 months ago by git

  • Commit changed from ca75153778edc640a002a3a0a731c8ca17526cc9 to 196eb49ec31e9523f7e2f2c91a8b2b430e58d2e5

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

4fc26ffninja_build: Add python dependency
3d6ae67ninja_build: Make Python an order-only dependency
acc3026Merge remote-tracking branch 'trac/u/mkoeppe/add_optional_package__ninja_build___build_system_for_polymake_' into t/24905/upgrade_polymake_to_version_3_2r2
196eb49polymake dependencies: Use current format for MP_LIBRARY, make ninja_build order-only

comment:10 Changed 20 months ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:11 Changed 20 months ago by mkoeppe

  • Status changed from needs_review to needs_work
  • Work issues set to Failures in test suite

comment:12 Changed 20 months ago by mkoeppe

This upgrade seems to break the whole polymake interface. Next step: Compare what's happening on the wire (pexpect log) between the two polymake versions.

Last edited 20 months ago by mkoeppe (previous) (diff)

comment:13 in reply to: ↑ 8 Changed 20 months ago by mkoeppe

Replying to mkoeppe:

Replying to jdemeyer:

Unfortunately, I cannot test this because perl_term_readline_gnu fails to install:

[perl_term_readline_gnu-1.34] Could not find neither libtermcap.a, libncurses.a, or libcurses.

Indeed, there is no libncurses.a installed (but libncurses.so is).

Could you create a separate ticket for this (and include more log detail)?

We have reproduced this problem on another linux box. Fix is in #25112.

comment:14 Changed 20 months ago by mkoeppe

  • Dependencies changed from #24921 to #24921, #25112

comment:15 Changed 20 months ago by git

  • Commit changed from 196eb49ec31e9523f7e2f2c91a8b2b430e58d2e5 to 0b818c3b6b156230ae5495fb78c4bda83b887ba3

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

3ffafdfUpdate perl_term_readline_gnu to 1.35
672a3a2perl_term_readline_gnu: Find ncurses
0b818c3Merge remote-tracking branch 'trac/u/mkoeppe/perl_term_readline_gnu__upgrade_to_1_35_and_patch_away_ncurses_problem' into t/24905/upgrade_polymake_to_version_3_2r2

comment:16 Changed 20 months ago by mkoeppe

  • Description modified (diff)

comment:17 Changed 20 months ago by mkoeppe

  • Description modified (diff)

comment:18 Changed 20 months ago by mkoeppe

  • Description modified (diff)

comment:19 Changed 20 months ago by mkoeppe

  • Description modified (diff)

comment:20 Changed 20 months ago by jipilab

Compilation fails on Debian stretch. I copy the relevant section of the log file:

[706/940] LD /home/jplabbe/sage/local/var/tmp/sage/build/polymake-3.2r2/src/build/Opt/lib/polytope.so
FAILED: /home/jplabbe/sage/local/var/tmp/sage/build/polymake-3.2r2/src/build/Opt/lib/polytope.so 
g++ -shared -L/usr/local/lib -fstack-protector-strong -Wl,-z,lazy -Wl,--as-needed  -o 
LOOOOOOOOGGGGGGGGGGGGGGGGGGGGG LIST OF .o and .so files 
/home/jplabbe/sage/local/var/tmp/sage/build/polymake-3.2r2/src/build/Opt/staticlib/sympol/libsympol.a  -L/home/jplabbe/sage/local/lib -Wl,-rpath,/home/jplabbe/sage/local/lib -lsoplex -lz -lppl -llrsgmp -lnormaliz -lgmpxx -lcddgmp -L/home/jplabbe/sage/local/lib -Wl,-rpath,/home/jplabbe/sage/local/lib  -fopenmp -lmpfr -lgmp -lpthread  -ldl
/usr/bin/ld: /home/jplabbe/sage/local/lib/libsoplex.a(rational.cpp.o): relocation R_X86_64_TPOFF32 against symbol `_ZN6soplex8Rational10useListMemE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/jplabbe/sage/local/lib/libsoplex.a(spxdefines.cpp.o): relocation R_X86_64_TPOFF32 against symbol `_ZN6soplex5Param9s_epsilonE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

comment:21 Changed 20 months ago by git

  • Commit changed from 0b818c3b6b156230ae5495fb78c4bda83b887ba3 to 24aec38a58374bd38f6fd5ff72cdf63df7e0f162

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

24aec38polymake: disable SoPlex to avoid linking errors

comment:22 follow-up: Changed 20 months ago by jipilab

Now the compilation finishes without errors. Testing with --optional=polymake, I get:

----------------------------------------------------------------------
sage -t backend_polymake.py  # 53 doctests failed
sage -t base.py  # 13 doctests failed
----------------------------------------------------------------------

The first is:

sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], rays=[(1,1)],lines=[], backend='polymake')

for which I get:

Traceback (most recent call last):
...
TypeError: Can't locate File/Slurp.pm in @INC (you may need to install the File::Slurp module) (@INC contains: CODE(0x562008f51e88) /home/jplabbe/sage/local/share/polymake/perllib /home/jplabbe/sage/local/lib/polymake/perlx/5.24.1/x86_64-linux-gnu-thread-multi /home/jplabbe/sage/local/lib/polymake/perlx/5.24.1 /home/jplabbe/sage/local/lib/polymake/perlx /home/jplabbe/sage/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/jplabbe/sage/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base)
BEGIN failed--compilation aborted

Another type of error seems to be that not putting () at the end of a CAPITALIZEDPOLYMAKEMETHOD returns a function and not the result anymore.

comment:23 Changed 20 months ago by mkoeppe

  • Dependencies changed from #24921, #25112 to #24921, #25112, #24152

For the error with Slurp, merge #24152 (needs review) and then re-read the polymake SPKG.txt regarding the Perl libraries that need to be installed.

Last edited 20 months ago by mkoeppe (previous) (diff)

comment:24 in reply to: ↑ 22 ; follow-up: Changed 20 months ago by mkoeppe

Replying to jipilab:

Another type of error seems to be that not putting () at the end of a CAPITALIZEDPOLYMAKEMETHOD returns a function and not the result anymore.

Yes, that's exactly what I meant when I wrote "break[s] the whole polymake interface".

comment:25 in reply to: ↑ 24 Changed 20 months ago by jipilab

Replying to mkoeppe:

Replying to jipilab:

Another type of error seems to be that not putting () at the end of a CAPITALIZEDPOLYMAKEMETHOD returns a function and not the result anymore.

Yes, that's exactly what I meant when I wrote "break[s] the whole polymake interface".

I wanted to emphaSIZE the problem! ;)

comment:26 Changed 20 months ago by jipilab

  • Branch changed from u/mkoeppe/upgrade_polymake_to_version_3_2r2 to public/upgrade_polymake_to_version_3_2r2
  • Commit changed from 24aec38a58374bd38f6fd5ff72cdf63df7e0f162 to 2748391a3d6d13fd2a8399eb5e70c303e960b7a4

Merged the dependency to #24152.


New commits:

a924632polymake SPKG.txt: Mention File::Slurp and CPAN
30ea0b0Merge branch 'u/mkoeppe/bug_when_converting_a_sage_polyhedron_into_polymake_pexpect' of trac.sagemath.org:sage into 24152
2748391Merge branch '24152' into 24905

comment:27 Changed 20 months ago by mkoeppe

  • Keywords IMA-PolyGeom added

comment:28 Changed 15 months ago by mkoeppe

3.2r3 is out

comment:29 Changed 15 months ago by jipilab

Ok, good to know. At the beginning of October, I have a week where I'll try this once more.

Further, I had a comment recently that one might want to add a link to the backend polymake in the documentation page for the interface (because the interface is not the only way to use polymake in sage...).

Last edited 15 months ago by jipilab (previous) (diff)

comment:30 Changed 15 months ago by git

  • Commit changed from 2748391a3d6d13fd2a8399eb5e70c303e960b7a4 to 791f7661e6fa7285aa6e11f4f2ae2e36a80a50bc

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

791f766Merge branch 'develop' into public/upgrade_polymake_to_version_3_2r2

comment:31 Changed 11 months ago by git

  • Commit changed from 791f7661e6fa7285aa6e11f4f2ae2e36a80a50bc to f4dee94eecaad786c8a65e9243487b0d6ffe4eb4

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

3ec32e8Merge branch 'public/upgrade_polymake_to_version_3_2r2' of trac.sagemath.org:sage into new_24905
f4dee94Updated polymake to 3.2r4

comment:32 Changed 11 months ago by jipilab

  • Description modified (diff)
  • Summary changed from Upgrade polymake to version 3.2r2 to Upgrade polymake to version 3.2r4

It seems that the commit 791f766 merged the develop branch into the upgrade polymake branch?

We then get all the diffs from the develop branch on this ticket... I would revert back to a previous commit if no changes were done at the same time as this merge... Let's see how it goes with this update on top of the last beta.

Now version 3.2.r4 is out as well and I updated the description of the ticket.

Polymake days are January 24-26 2019, I will ask them if a stable release is to be expected soon...

comment:33 Changed 11 months ago by jipilab

I accidently erased the patch to compile with gcc7 form a previous ticket... I do not have gcc7 on my computer... But I guess it would be good to check it again anyways on this new release...

comment:34 follow-up: Changed 11 months ago by jipilab

I am looking at the broken polymake interface. I noticed a few things:

  • Quotes do not work the same way as before:
    sage: polymake("'ok'")                              # optional - polymake
    'ok'

So we need to handle this differently when calling member functions.

  • I get a compilation error directly while asking for the Type of a polytope:
polytope > $c = cube(3);
polytope > $t = typeof $c;
polymake:  ERROR: Compilation error

This breaks pretty much everything, as the object is not able to catch its type and get the proper names for functions, and lots of other things...

comment:35 Changed 11 months ago by jipilab

  • Branch changed from public/upgrade_polymake_to_version_3_2r2 to public/upgrade_polymake_to_version_3_2r4
  • Commit changed from f4dee94eecaad786c8a65e9243487b0d6ffe4eb4 to 40c60988f83e2763562395bbe6ec5cd2a9709b25

New commits:

d5b94d6Fixed quotes and wiggled around
b2e133cFixed the typeof
d9af561small fixes
40c6098pep8

comment:36 Changed 11 months ago by jipilab

The previous commits fix the polymake interface, see https://forum.polymake.org/viewtopic.php?f=8&t=1675 for a discussion of the issue.

In short, the command

$t = typeof $c;

Stopped working (as in the tutorials mentionned in the discussion) and we should use:

$t = $c -> type;

This seems to have fixed the problems.

There is still a spurious failing test in the interface which is an appearing blankline. I ignore it for now...

Next, I'll check the polymake backend for polyhedron. There seems to be around 4 failing doctests. That's much better than the 100s... there was.

comment:37 in reply to: ↑ 34 Changed 11 months ago by jipilab

Replying to jipilab:

I am looking at the broken polymake interface. I noticed a few things:

  • Quotes do not work the same way as before:
    sage: polymake("'ok'")                              # optional - polymake
    'ok'

This was simply because of the failing evaluation when setting variables. It seems fine now.

comment:38 follow-up: Changed 11 months ago by jipilab

On the release page of polymake 3.2 https://polymake.org/doku.php/news/release_3_2

one can read under "polytope":

  • zero vectors in input properties throw an exception

This breaks a few of our tests.

comment:39 in reply to: ↑ 38 Changed 11 months ago by jipilab

Replying to jipilab:

On the release page of polymake 3.2 https://polymake.org/doku.php/news/release_3_2

one can read under "polytope":

  • zero vectors in input properties throw an exception

This breaks a few of our tests.

The question is now: how to get the full space as a polyhedron is polymake?

comment:40 Changed 11 months ago by git

  • Commit changed from 40c60988f83e2763562395bbe6ec5cd2a9709b25 to a5bf869d82c6a47ce243d4f205674a4f40c8d5ae

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

a5bf869Fixed backend polymake

comment:41 Changed 11 months ago by jipilab

  • Authors changed from Matthias Koeppe to Matthias Koeppe, Jean-Philippe Labbé
  • Status changed from needs_work to needs_review
  • Work issues Failures in test suite deleted

It seems that the tests now pass.

Ready for review!

comment:42 Changed 11 months ago by slelievre

  • Cc slelievre added
  • Milestone changed from sage-8.2 to sage-8.7

comment:43 Changed 9 months ago by git

  • Commit changed from a5bf869d82c6a47ce243d4f205674a4f40c8d5ae to 7a5de5a2fd2a4a8cdcd864040574f22fd44ae537

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

7a5de5aMerge branch 'public/upgrade_polymake_to_version_3_2r4' of trac.sagemath.org:sage into polymake32r4

comment:44 follow-up: Changed 9 months ago by gh-kliem

I'm getting the following error:

Running doctests with ID 2019-03-11-14-11-33-0ac43552.
Git branch: public/upgrade_polymake_to_version_3_2r4
Using --optional=4ti2,bliss,cmake,dochtml,gmpy2,latte_int,lidia,lrslib,memlimit,mpir,ninja_build,normaliz,polymake,pynormaliz,python2,qhull,sage,topcom
Doctesting 1 file.
sage -t --long --warn-long 41.5 src/sage/interfaces/polymake.py
**********************************************************************
File "src/sage/interfaces/polymake.py", line 1735, in sage.interfaces.polymake.PolymakeElement.get_member_function
Failed example:
    c.get_member_function("foo")()                        # optional - polymake
Expected:
    Traceback (most recent call last):
    ...
    TypeError: Can't locate object method "foo" via package "Polymake::polytope::Polytope__Rational" at input line 1.
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.PolymakeElement.get_member_function[6]>", line 1, in <module>
        c.get_member_function("foo")()                        # optional - polymake
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py", line 2114, in __call__
        return self._obj._check_valid().function_call(self._name, list(args), kwds)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py", line 284, in function_call
        return self(s)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 288, in __call__
        return cls(self, x, name=name)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1442, in __init__
        raise_(TypeError, TypeError(*x.args), sys.exc_info()[2])
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1437, in __init__
        self._name = parent._create(value, name=name)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py", line 628, in _create
        self.set(name, value)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py", line 717, in set
        self.eval(cmd)
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1351, in eval
        for L in code.split('\n') if L != ''])
      File "/srv/public/kliem/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py", line 1068, in _eval_line
        raise PolymakeError(e)
    TypeError: Can't locate object method "foo" via package "Polymake::polytope::Polytope__Rational"

Also, I had to install perl yet with

cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

yet. With polymake 3.1 in sage, there was not need of that.

comment:45 Changed 9 months ago by git

  • Commit changed from 7a5de5a2fd2a4a8cdcd864040574f22fd44ae537 to 7ca4434de75f0594173f8e39cf25574bf049796d

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

7ca4434Fixed a failing doctest

comment:46 in reply to: ↑ 44 ; follow-up: Changed 9 months ago by jipilab

Replying to gh-kliem:

The failing doctest should be fixed now.

Also, I had to install perl yet with

cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

yet. With polymake 3.1 in sage, there was not need of that.

Could you be more specific about this? Could you say in which order you did this and if we have to add this to the installation instruction?

comment:47 in reply to: ↑ 46 ; follow-up: Changed 9 months ago by gh-kliem

I had polymake installed via ./sage -i polymake before. This didn't require any extra installations.

I went through the instructions of this ticket and ignored ./sage -info polymake. This failed. Following the instructions and executing

cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

beforehand worked fine.

To me it looks like ./sage -i polymake worked somehow out of the box before and now it doesn't anymore.

Replying to jipilab:

Replying to gh-kliem:

The failing doctest should be fixed now.

Also, I had to install perl yet with

cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

yet. With polymake 3.1 in sage, there was not need of that.

Could you be more specific about this? Could you say in which order you did this and if we have to add this to the installation instruction?

comment:48 follow-up: Changed 9 months ago by gh-kliem

Btw, also polymake is not auto-detected when running doctests.

So ./sage -t --all --long will not use polymake unless specified.

I don't know, if this is a problem specific to my installation or not.

comment:49 follow-up: Changed 9 months ago by gh-kliem

Almost everything passed now. This is the only thing remaining on my machine:

File "src/sage/interfaces/polymake.py", line 823, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    p.N_LATTICE_POINTS                # optional - polymake
Expected:
    used package latte
      LattE (Lattice point Enumeration) is a computer software dedicated to the
      problems of counting lattice points and integration inside convex polytopes.
      Copyright by Matthias Koeppe, Jesus A. De Loera and others.
      http://www.math.ucdavis.edu/~latte/
    27
Got:
    27

comment:50 in reply to: ↑ 47 ; follow-up: Changed 9 months ago by jipilab

Replying to gh-kliem:

I had polymake installed via ./sage -i polymake before. This didn't require any extra installations.

I went through the instructions of this ticket and ignored ./sage -info polymake. This failed. Following the instructions and executing

cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

beforehand worked fine.

To me it looks like ./sage -i polymake worked somehow out of the box before and now it doesn't anymore.

Have a look at the commit to see what changed. When we update a package, we change the source and the place to download the package. Since the package is not yet on the sage mirror, this is why you download it and put it in the appropriate folder by hand.

After doing so, as long as you are on this branch, installing polymake will install the newest version (the one written with this new ticket). If you go back to a different ticket, you have to (re-)install polymake the usual way. And it should work. But well, polymake installation used to not work before, so there's no discussion to have on this aspect. We should focus on the present installation.

Again, can you state clearly what you did step-by-step and say if each step worked or not. It is difficult to follow from what you write about what worked and what did not work.

comment:51 in reply to: ↑ 48 Changed 9 months ago by jipilab

Replying to gh-kliem:

Btw, also polymake is not auto-detected when running doctests.

So ./sage -t --all --long will not use polymake unless specified.

I don't know, if this is a problem specific to my installation or not.

Polymake is an experimental package, so it is not included in the default testing. Perhaps there is a way to include all experimental package. But this is a recipe for disaster anyway. So just add it by hand each time you test. That's the cheapest solution.

comment:52 in reply to: ↑ 49 ; follow-up: Changed 9 months ago by jipilab

Replying to gh-kliem:

Almost everything passed now. This is the only thing remaining on my machine:

File "src/sage/interfaces/polymake.py", line 823, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    p.N_LATTICE_POINTS                # optional - polymake
Expected:
    used package latte
      LattE (Lattice point Enumeration) is a computer software dedicated to the
      problems of counting lattice points and integration inside convex polytopes.
      Copyright by Matthias Koeppe, Jesus A. De Loera and others.
      http://www.math.ucdavis.edu/~latte/
    27
Got:
    27

Okay, this is annoying, as I do not get this error in my case. It seems that they randomly throw out such transparency statements about libraries it uses. Okay. Thanks for pointing this out.

Last edited 9 months ago by jipilab (previous) (diff)

comment:53 in reply to: ↑ 50 ; follow-up: Changed 9 months ago by gh-kliem

Ok, let's try again.

In my current Sage installation I had polymake 3.1 installed. When installing it, this worked out of the box. So a simply run of ./sage -i polymake and I had polymake 3.3. No prereqs.

When testing this ticket, I checked out this branch and pulled and did everything as instructed, but ignored ./sage -info polymake. This did not work (yes I didn't follow the instructions completely).

When I paid attention to ./sage -info polymake and installed the perl thing, it worked fine.

If somehow possible, it would be nice to have ./sage -i polymake work without any prereqs again. But I have no idea whats going on and whether this depends on my specific computer or not.

I just wanted to point out, that the update to polymake 3.2 has a prequirement that wasn't there before. You are probably aware of this, I just wanted to mention it.

Replying to jipilab:

Replying to gh-kliem:

I had polymake installed via ./sage -i polymake before. This didn't require any extra installations.

I went through the instructions of this ticket and ignored ./sage -info polymake. This failed. Following the instructions and executing

cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

beforehand worked fine.

To me it looks like ./sage -i polymake worked somehow out of the box before and now it doesn't anymore.

Have a look at the commit to see what changed. When we update a package, we change the source and the place to download the package. Since the package is not yet on the sage mirror, this is why you download it and put it in the appropriate folder by hand.

After doing so, as long as you are on this branch, installing polymake will install the newest version (the one written with this new ticket). If you go back to a different ticket, you have to (re-)install polymake the usual way. And it should work. But well, polymake installation used to not work before, so there's no discussion to have on this aspect. We should focus on the present installation.

Again, can you state clearly what you did step-by-step and say if each step worked or not. It is difficult to follow from what you write about what worked and what did not work.

comment:54 Changed 9 months ago by slabbe

On Ubuntu 16.04 with sage 8.7.beta7, after installing the dependencies, the command

sage -t --optional=sage,optional,experimental,external,polymake src/sage/interfaces/polymake.py

gives:

Using --optional=4ti2,bliss,cbc,ccache,cmake,cryptominisat,dot2tex,experimental,external,glucose,latte_int,lidia,lrslib,memlimit,mpir,ninja_build,normaliz,notedown,pandoc_attributes,polymake,pycosat,pynormaliz,python2,qhull,rst2ipynb,sage,topcom
External software to be detected: cplex,ffmpeg,graphviz,gurobi,imagemagick,internet,latex,macaulay2,magma,maple,mathematica,matlab,octave,pandoc,scilab
Doctesting 1 file.
sage -t src/sage/interfaces/polymake.py
    [245 tests, 8.19 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 11.7 seconds
    cpu time: 1.8 seconds
    cumulative wall time: 8.2 seconds
External software detected for doctesting: 

comment:55 in reply to: ↑ 52 ; follow-up: Changed 9 months ago by gh-kliem

Just to mention this.

I am using cofio: https://patchbot.sagemath.org/ticket/?machine=debian&machine=9.6&machine=x86_64&machine=4.9.0-8-amd64&machine=cofio&status=open

Not with the Sage same install, but I don't think it matters.

Replying to jipilab:

Replying to gh-kliem:

Almost everything passed now. This is the only thing remaining on my machine:

File "src/sage/interfaces/polymake.py", line 823, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    p.N_LATTICE_POINTS                # optional - polymake
Expected:
    used package latte
      LattE (Lattice point Enumeration) is a computer software dedicated to the
      problems of counting lattice points and integration inside convex polytopes.
      Copyright by Matthias Koeppe, Jesus A. De Loera and others.
      http://www.math.ucdavis.edu/~latte/
    27
Got:
    27

Okay, this is annoying, as I do not get this error in my case. It seems that they randomly throw out such transparency statements about libraries it uses. Okay. Thanks for pointing this out.

Last edited 9 months ago by gh-kliem (previous) (diff)

comment:56 in reply to: ↑ 53 ; follow-up: Changed 9 months ago by jipilab

Replying to gh-kliem:

Ok, let's try again.

In my current Sage installation I had polymake 3.1 installed. When installing it, this worked out of the box. So a simply run of ./sage -i polymake and I had polymake 3.3. No prereqs.

When testing this ticket, I checked out this branch and pulled and did everything as instructed, but ignored ./sage -info polymake. This did not work (yes I didn't follow the instructions completely).

When I paid attention to ./sage -info polymake and installed the perl thing, it worked fine.

If somehow possible, it would be nice to have ./sage -i polymake work without any prereqs again. But I have no idea whats going on and whether this depends on my specific computer or not.

I just wanted to point out, that the update to polymake 3.2 has a prequirement that wasn't there before. You are probably aware of this, I just wanted to mention it.

Okay, thanks for the clarification. I do not know if there is a way to fix this through the installation of polymake. Since there is no section Debian in the installation instruction coming from sage -info polymake which one did you execute? The ubuntu ones? None?

comment:57 in reply to: ↑ 55 ; follow-up: Changed 9 months ago by jipilab

File "src/sage/interfaces/polymake.py", line 823, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    p.N_LATTICE_POINTS                # optional - polymake
Expected:
    used package latte
      LattE (Lattice point Enumeration) is a computer software dedicated to the
      problems of counting lattice points and integration inside convex polytopes.
      Copyright by Matthias Koeppe, Jesus A. De Loera and others.
      http://www.math.ucdavis.edu/~latte/
    27
Got:
    27

Typing in the terminal I get:

$ sage -experimental
[package]...............................[latest version] ([version])
perl_term_readline_gnu..................1.35 (1.35)
polymake................................3.2r4 (3.2r4)

I do get the verbose out from using polymake3.2r4. And all tests passed on an fresh install on a Ubuntu machine. Could you make sure that you used the latest polymake? Somehow it seems really odd to me and I can't figure out why it does not show the verbose in your case.

comment:58 in reply to: ↑ 56 Changed 9 months ago by gh-kliem

./sage -info polymake

...

A distribution-independent way to install Perl modules (into a user's
home directory) is using CPAN.

 cpan -i XML::Writer XML::LibXML XML::LibXSLT File::Slurp

This did the job. I also did sage -i 4ti2 latte_int topcom qhull then, but this has most likely nothing to do with the issue.

Replying to jipilab:

Replying to gh-kliem:

Ok, let's try again.

In my current Sage installation I had polymake 3.1 installed. When installing it, this worked out of the box. So a simply run of ./sage -i polymake and I had polymake 3.3. No prereqs.

When testing this ticket, I checked out this branch and pulled and did everything as instructed, but ignored ./sage -info polymake. This did not work (yes I didn't follow the instructions completely).

When I paid attention to ./sage -info polymake and installed the perl thing, it worked fine.

If somehow possible, it would be nice to have ./sage -i polymake work without any prereqs again. But I have no idea whats going on and whether this depends on my specific computer or not.

I just wanted to point out, that the update to polymake 3.2 has a prequirement that wasn't there before. You are probably aware of this, I just wanted to mention it.

Okay, thanks for the clarification. I do not know if there is a way to fix this through the installation of polymake. Since there is no section Debian in the installation instruction coming from sage -info polymake which one did you execute? The ubuntu ones? None?

comment:59 in reply to: ↑ 57 Changed 9 months ago by gh-kliem

kliem@cofio:~/localhome/sage$ sage -experimental
[package]...............................[latest version] ([version])

autotools...............................20141105.p0 (not_installed)
cocoalib................................0.99564 (not_installed)
compilerwrapper.........................1.2 (not_installed)
gap3....................................04jul17 (not_installed)
libtheora...............................1.1.1 (not_installed)
lie.....................................2.2.2 (not_installed)
modular_decomposition...................20100607 (not_installed)
perl_term_readline_gnu..................1.35 (1.35)
polymake................................3.2r4 (3.2r4)
qepcad..................................B.1.71 (not_installed)
scipoptsuite............................5.0.1 (not_installed)
surf....................................1.0.6-gcc6 (not_installed)
valgrind................................3.10.0 (not_installed)

Replying to jipilab:

File "src/sage/interfaces/polymake.py", line 823, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    p.N_LATTICE_POINTS                # optional - polymake
Expected:
    used package latte
      LattE (Lattice point Enumeration) is a computer software dedicated to the
      problems of counting lattice points and integration inside convex polytopes.
      Copyright by Matthias Koeppe, Jesus A. De Loera and others.
      http://www.math.ucdavis.edu/~latte/
    27
Got:
    27

Typing in the terminal I get:

$ sage -experimental
[package]...............................[latest version] ([version])
perl_term_readline_gnu..................1.35 (1.35)
polymake................................3.2r4 (3.2r4)

I do get the verbose out from using polymake3.2r4. And all tests passed on an fresh install on a Ubuntu machine. Could you make sure that you used the latest polymake? Somehow it seems really odd to me and I can't figure out why it does not show the verbose in your case.

comment:60 Changed 9 months ago by jipilab

  • Description modified (diff)
  • Summary changed from Upgrade polymake to version 3.2r4 to Upgrade polymake to version 3.3

comment:61 Changed 9 months ago by jipilab

  • Description modified (diff)

comment:62 Changed 9 months ago by git

  • Commit changed from 7ca4434de75f0594173f8e39cf25574bf049796d to 38319e21646ff1debd805d5d81a4bfa0be345014

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

38319e2Update polymake to version 3.3

comment:63 Changed 9 months ago by git

  • Commit changed from 38319e21646ff1debd805d5d81a4bfa0be345014 to 2879106058ba56fb9e3b422d709a377378b1f6d2

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

2879106Added a required package for polymake install

comment:64 Changed 9 months ago by jipilab

Achhhh...

libjson-perl is now a requirement since version 3.3:

https://polymake.org/doku.php/news/release_3_3

I added it to the Ubuntu requirements, I will check how to install this on other platforms...

comment:65 Changed 9 months ago by jipilab

  • Description modified (diff)

comment:66 Changed 9 months ago by git

  • Commit changed from 2879106058ba56fb9e3b422d709a377378b1f6d2 to 6755b5bc7086cd1647caa9767a8ddeefb5808446

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

6755b5bAdded readkey dependency

comment:67 Changed 9 months ago by vklein

  • Keywords thursdaysbdx added

comment:68 Changed 9 months ago by git

  • Commit changed from 6755b5bc7086cd1647caa9767a8ddeefb5808446 to 7ca4434de75f0594173f8e39cf25574bf049796d

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

comment:69 Changed 9 months ago by jipilab

  • Summary changed from Upgrade polymake to version 3.3 to Upgrade polymake to version 3.2r4

It seems that polymake 3.3 does not compile out of the box on my stable Debian distribution...

I feel like version 3.3 should be a separate ticket and have a compiling, and working version of polymake as an experimental package. It is better than having the very latest release which fails to compile. Once this ticket is merged, I might invest time again to figure out what goes wrong in the compilation.

comment:70 Changed 9 months ago by jipilab

@MKoeppe: could you eventually check that the above works on OSX machine?

Best,

comment:71 Changed 9 months ago by jipilab

  • Description modified (diff)

comment:72 Changed 9 months ago by vklein

This ticket with polymake 3.3 (before last push) compile on ubuntu 16.04.

comment:73 Changed 9 months ago by embray

  • Milestone changed from sage-8.7 to sage-8.8

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

comment:74 Changed 8 months ago by gh-sophiasage

  • Cc gh-sophiasage added

comment:75 Changed 8 months ago by git

  • Commit changed from 7ca4434de75f0594173f8e39cf25574bf049796d to b674466d9b27a993724fcf301ad353cf435869f6

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

b674466Merge branch 'public/upgrade_polymake_to_version_3_2r4' of trac.sagemath.org:sage into 24905

Changed 8 months ago by selia

log of a failed compilation.

comment:76 follow-up: Changed 8 months ago by selia

I tried to compile on macOS Mojave and it failed. I attached my log file.

comment:77 in reply to: ↑ 76 ; follow-up: Changed 8 months ago by jipilab

Replying to selia:

I tried to compile on macOS Mojave and it failed. I attached my log file.

The failure was reported on the polymake forum here:

https://forum.polymake.org/viewtopic.php?f=8&t=1702

comment:78 in reply to: ↑ 77 ; follow-up: Changed 8 months ago by slelievre

Replying to jipilab:

Replying to selia:

I tried to compile on macOS Mojave and it failed. I attached my log file.

The failure was reported on the polymake forum here:

https://forum.polymake.org/viewtopic.php?f=8&t=1702

Upstream say this is fixed in Polymake 3.4, released 2019-04-15.

Should we upgrade to Polymake 3.4 instead of 3.2 in this ticket?

comment:79 in reply to: ↑ 78 ; follow-up: Changed 8 months ago by vdelecroix

Replying to slelievre:

Replying to jipilab:

Replying to selia:

I tried to compile on macOS Mojave and it failed. I attached my log file.

The failure was reported on the polymake forum here:

https://forum.polymake.org/viewtopic.php?f=8&t=1702

Upstream say this is fixed in Polymake 3.4, released 2019-04-15.

Should we upgrade to Polymake 3.4 instead of 3.2 in this ticket?

+1. It makes no sense to upgrade to 3.2 before 3.4.

comment:80 in reply to: ↑ 79 Changed 8 months ago by jipilab

Replying to vdelecroix:

Replying to slelievre:

Replying to jipilab:

Replying to selia:

I tried to compile on macOS Mojave and it failed. I attached my log file.

The failure was reported on the polymake forum here:

https://forum.polymake.org/viewtopic.php?f=8&t=1702

Upstream say this is fixed in Polymake 3.4, released 2019-04-15.

Should we upgrade to Polymake 3.4 instead of 3.2 in this ticket?

+1. It makes no sense to upgrade to 3.2 before 3.4.

Agreed. Although the version 3.3 did not compile on debian stretch and this is why I thought that having 3.2rc4 working could have fixed the backend quickly. Since I do not know how long it will take to make the version 3.4 work, I thought it is better to do things one step at a time.

The whole interface was broken and at least now it works on debian and they proposed a fix.

Anyhow, yes, we can just skip to 3.4, let's just hope it is not a quantum leap...

comment:81 Changed 8 months ago by git

  • Commit changed from b674466d9b27a993724fcf301ad353cf435869f6 to 3c968c3b13985ed1a940ed3c3457a534ba8df40f

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

3c968c3Merge tag '8.8.beta3' into t/24905/public/upgrade_polymake_to_version_3_2r4

comment:82 Changed 8 months ago by git

  • Commit changed from 3c968c3b13985ed1a940ed3c3457a534ba8df40f to 4fa202d3a4fa46729696e10fccab676e1017d458

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

4fa202dAdd to macOS install instructions for polymake

comment:83 Changed 8 months ago by git

  • Commit changed from 4fa202d3a4fa46729696e10fccab676e1017d458 to c6f05d8ce24f06d4a97ff4f938e5db1fad7e7472

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

aa058a3Upgrade polymake to 3.4
c6f05d8Update polymake prereq instructions

comment:84 Changed 8 months ago by mkoeppe

  • Dependencies #24921, #25112, #24152 deleted
  • Description modified (diff)
  • Status changed from needs_review to needs_work
  • Summary changed from Upgrade polymake to version 3.2r4 to Upgrade polymake to version 3.4

Upgrading to 3.4 now. Builds OK on Mac OS Mojave (see updated instructions for prerequisites!)

Many test failures from ./sage -t --optional=sage,polymake src/sage/interfaces/polymake.py

comment:85 Changed 8 months ago by git

  • Commit changed from c6f05d8ce24f06d4a97ff4f938e5db1fad7e7472 to 8510124d3559850a6592601828e01a039ff16453

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

7339ef6polymake doc test fixes: list of properties, output
7018013polymake doctest: Mark a doctest random that depends on installed packages
78c10fbPolymake._tab_completion: Fix for new apropos format in Polymake 3.4
1699019Doctest fix for polymake 3.4: false/true instead of 0/1
f595909Doctest fix for polymake 3.4: Use different function from the tropical application
76701f6Doctest fix for polymake 3.4: Differences in available properties
83b51dePolymake 3.4: Fix for typeof small objects
8510124Polymake: Remove copy/paste error handling for code that cannot raise

comment:86 follow-up: Changed 8 months ago by mkoeppe

Works now (on macOS Mojave). Please test on other platforms.

The following gives sporadic errors (can happen during doctest too):

sage: polymake.eval('help "TRIANGULATION";')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-14-18a26ee8f157> in <module>()
----> 1 polymake.eval('help "TRIANGULATION";')

/Users/mkoeppe/s/sage/sage-rebasing/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1349                 elif split_lines:
   1350                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1351                                         for L in code.split('\n') if L != ''])
   1352                 else:
   1353                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/Users/mkoeppe/s/sage/sage-rebasing/local/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed, **kwds)
   1020                         i = pat
   1021                         while i:
-> 1022                             self._expect.send(chr(3))
   1023                             sleep(0.1)
   1024                             i = self._expect.expect(self._prompt, timeout=0.1)

/Users/mkoeppe/s/sage/sage-rebasing/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in send(self, s)
    566 
    567         b = self._encoder.encode(s, final=False)
--> 568         return os.write(self.child_fd, b)
    569 
    570     def sendline(self, s=''):

OSError: [Errno 5] Input/output error

comment:87 Changed 8 months ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:88 in reply to: ↑ 86 Changed 8 months ago by jipilab

Replying to mkoeppe:

Works now (on macOS Mojave). Please test on other platforms.

The following gives sporadic errors (can happen during doctest too):

sage: polymake.eval('help "TRIANGULATION";')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-14-18a26ee8f157> in <module>()
----> 1 polymake.eval('help "TRIANGULATION";')

/Users/mkoeppe/s/sage/sage-rebasing/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1349                 elif split_lines:
   1350                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1351                                         for L in code.split('\n') if L != ''])
   1352                 else:
   1353                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/Users/mkoeppe/s/sage/sage-rebasing/local/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed, **kwds)
   1020                         i = pat
   1021                         while i:
-> 1022                             self._expect.send(chr(3))
   1023                             sleep(0.1)
   1024                             i = self._expect.expect(self._prompt, timeout=0.1)

/Users/mkoeppe/s/sage/sage-rebasing/local/lib/python2.7/site-packages/pexpect/pty_spawn.pyc in send(self, s)
    566 
    567         b = self._encoder.encode(s, final=False)
--> 568         return os.write(self.child_fd, b)
    569 
    570     def sendline(self, s=''):

OSError: [Errno 5] Input/output error

Is there a way to control/predict this kind of behavior? It would be annoying to have such errors in the doctests.

Since it is an experimental package, this could be tolerable, but it would be good to grasp how this occurs...

I will this new branch.

comment:89 Changed 8 months ago by jipilab

Compilation works on debian.

I get the following errors in the interface:

sage -t polymake.py
**********************************************************************
File "polymake.py", line 884, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    c                                 # optional - polymake
Expected:
    cube of dimension 15
Got:
    <repr(<sage.interfaces.polymake.PolymakeElement at 0x7fe892d55cd0>) failed: PolymakeError: Can't locate object method "description" via package "1" (perhaps you forgot to load "1"?)>
**********************************************************************
File "polymake.py", line 886, in sage.interfaces.polymake.Polymake._eval_line
Failed example:
    c.N_VERTICES                      # optional - polymake
Expected:
    32768
Got:
    Member function 'N_VERTICES' of print ref(@SAGE590);
    1 object
**********************************************************************
File "polymake.py", line 1133, in sage.interfaces.polymake.Polymake.application
Failed example:
    q.VERY_AMPLE                  # optional - polymake
Exception raised:
    Traceback (most recent call last):
      File "/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake.application[3]>", line 1, in <module>
        q.VERY_AMPLE                  # optional - polymake
      File "/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py", line 1680, in __getattr__
        raise AttributeError
    AttributeError
**********************************************************************

All tests pass on the backend_polymake.py.

Will investigate.

comment:90 Changed 8 months ago by jipilab

I lauched the test with:

sage -t src/sage/interfaces/polymake.py --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,pynormaliz,python2,sage,topcom,polymake

Here is a longer trace about the last doctest failure:

sage: q = polymake.new_object("Polytope", INEQUALITIES=[[5,-4,0,1],[-3,0,-4,1],[-2,1,0,0],[-4,4,4,-1],[0,0,1,0],[8,0,0,-1],[1,0,-1,0],[3,-1,0,0]])
sage: q.H_VECTOR
1 5 5 1
sage: q.F_VECTOR
8 14 8
sage: q.VERY_AMPLE
/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py:1064: RuntimeWarning: could not compute 'HILBERT_BASIS_GENERATORS' probably because of unsatisfied preconditions:
precondition : POINTED ( HILBERT_BASIS_GENERATORS , N_HILBERT_BASIS : )
  warnings.warn(w, RuntimeWarning)
/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py:1064: RuntimeWarning: rule VERY_AMPLE : GRAPH.ADJACENCY, GRAPH.EDGE_DIRECTIONS, N_VERTICES, VERTICES, FACETS | INEQUALITIES failed: Can't use an undefined value as an ARRAY reference at /home/jplabbe/sage/local/share/polymake/apps/polytope/rules/lattice.rules line 603.
  warnings.warn(w, RuntimeWarning)
/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.py:1064: RuntimeWarning: rule HILBERT_BASIS_GENERATORS , N_HILBERT_BASIS : failed: 
*** Missing external software:
*** To compute Hilbert bases you need to have one of the following:
***    - bundled:libnormaliz enabled (requires boost, rerun configure)
***    - 4ti2 installed and configured (check 'show_unconfigured;')
  warnings.warn(w, RuntimeWarning)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-1f21cb7f3e00> in <module>()
----> 1 q.VERY_AMPLE

/home/jplabbe/sage/local/lib/python2.7/site-packages/sage/interfaces/polymake.pyc in __getattr__(self, attrname)
   1678                     return P('{}->{}'.format(self._name, attrname))
   1679                 except (TypeError, PolymakeError):
-> 1680                     raise AttributeError
   1681             else:
   1682                 return P._function_element_class()(self, '{}->{}'.format(self._name, attrname), memberfunction=True)

AttributeError: 
Last edited 8 months ago by jipilab (previous) (diff)

comment:91 Changed 8 months ago by jipilab

Here's the log of the configuration of polymake:

gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) 
[polymake-3.4] ****************************************************
[polymake-3.4] Package 'polymake' is currently not installed
[polymake-3.4] No legacy uninstaller found for 'polymake'; nothing to do
[polymake-3.4] checking C++ compiler ... ok (g++ -std=gnu++11 is GCC 6.3.0)
[polymake-3.4] checking C++ library ... ok (GNU libstdc++ 20170516, C++ 201402)
[polymake-3.4] determining architecture ... ok (x86_64)
[polymake-3.4] determining compiler flags ... ok
[polymake-3.4]    CFLAGS= -march=native
[polymake-3.4]    CXXFLAGS= -std=c++14 -march=native -ftemplate-depth-200 -fno-strict-aliasing -Wno-parentheses -Wshadow -fopenmp -Wno-error=unused-function -Wno-maybe-uninitialized
[polymake-3.4]    LDFLAGS=-L/home/jplabbe/sage/local/lib -Wl,-rpath,/home/jplabbe/sage/local/lib  -fuse-ld=gold -fopenmp
[polymake-3.4] checking gmp installation ... ok
[polymake-3.4] checking mpfr installation ... ok
[polymake-3.4] checking boost installation ... ok
[polymake-3.4] checking libxml2 installation ... ok
[polymake-3.4] checking perl module XML::Writer ... ok
[polymake-3.4] checking perl module XML::LibXML ... ok
[polymake-3.4] checking perl module XML::LibXSLT ... ok
[polymake-3.4] checking perl module Term::ReadKey ... ok
[polymake-3.4] checking perl module Term::ReadLine ... ok
[polymake-3.4] checking perl module JSON ... ok
[polymake-3.4] checking shared perl library ... ok
[polymake-3.4] 
[polymake-3.4] Configuring bundled extensions:
[polymake-3.4] bundled extension java ... disabled by command-line
[polymake-3.4] bundled extension javaview ... disabled by command-line
[polymake-3.4] bundled extension soplex ... disabled by command-line
[polymake-3.4] bundled extension atint ... ok
[polymake-3.4] bundled extension bliss ... ok
[polymake-3.4] bundled extension cdd ... ok (0.94g @ system)
[polymake-3.4] bundled extension libnormaliz ... failed
[polymake-3.4] bundled extension lrs ... ok (6.2 @ system)
[polymake-3.4] bundled extension nauty ... disabled because of conflict with other extension: bliss
[polymake-3.4] bundled extension ppl ... ok (1.2.0 @ /home/jplabbe/sage/local)
[polymake-3.4] bundled extension scip ... failed
[polymake-3.4] bundled extension singular ... ok (4.1.1 @ system)
[polymake-3.4] bundled extension sympol ... ok (bundled)
[polymake-3.4] * If you want to change the configuration of bundled extensions please see build/bundled.log and try configure --help.

comment:92 Changed 8 months ago by git

  • Commit changed from 8510124d3559850a6592601828e01a039ff16453 to b6eeaa1ef687358f1407bc4aa7fce61dcba95318

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

3c6ae95polymake: Make normaliz a dependency
b6eeaa1polymake: Add a patch to polymake's libnormaliz configure

comment:93 Changed 8 months ago by jipilab

Compiled fine on debian stretch and all relevant tests pass:

$ sage -t /sage/src/sage/interfaces/polymake.py --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,normaliz,pynormaliz,python2,sage,topcom,polymake
Using --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,normaliz,polymake,pynormaliz,python2,sage,topcom
Doctesting 1 file.
sage -t polymake.py
    [245 tests, 14.65 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------

and

$ sage -t sage/src/sage/geometry/polyhedron/*.py --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,normaliz,pynormaliz,python2,sage,topcom,polymake
too few successful tests, not using stored timings
Using --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,normaliz,polymake,pynormaliz,python2,sage,topcom
Doctesting 25 files.
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------

comment:94 Changed 8 months ago by mkoeppe

  • Report Upstream changed from N/A to Reported upstream. No feedback yet.

polymake patch sent upstream.

comment:95 Changed 7 months ago by gh-LaisRast

It compiled on Debian GNU/Linux 9.8 (stretch) x86_64. All relevant tests pass:

$ ./sage -t src/sage/interfaces/polymake.py --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,normaliz,pynormaliz,python2,sage,topcom,polymake
too few successful tests, not using stored timings
Running doctests with ID 2019-04-26-23-04-17-71ea1904.
Git branch: polymake
Using --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,normaliz,polymake,pynormaliz,python2,sage,topcom
Doctesting 1 file.
sage -t src/sage/interfaces/polymake.py
    [245 tests, 6.94 s]
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 11.6 seconds
    cpu time: 1.4 seconds
    cumulative wall time: 6.9 seconds
$ ./sage -t src/sage/geometry/polyhedron/*.py --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,python2,sage,topcom,polymake
too few successful tests, not using stored timings
Running doctests with ID 2019-04-26-23-12-47-322d8126.
Git branch: polymake
Using --optional=bliss,dochtml,gfortran,lrslib,memlimit,mpir,ninja_build,polymake,python2,sage,topcom
Doctesting 25 files.
...
----------------------------------------------------------------------
All tests passed!
----------------------------------------------------------------------
Total time for all tests: 65.0 seconds
    cpu time: 43.6 seconds
    cumulative wall time: 64.1 seconds
Last edited 7 months ago by gh-LaisRast (previous) (diff)

Changed 7 months ago by gh-sophiasage

log of failed compilation. mac os mojave

comment:96 Changed 7 months ago by mkoeppe

See the updated Perl module prerequisites by typing "sage -info polymake".

Changed 7 months ago by gh-LaisRast

sage -t src/sage/interfaces/polymake.py

comment:97 follow-up: Changed 7 months ago by gh-LaisRast

It compiled on Arch Linux x86_64 (5.0.9-arch1-1-ARCH). All relevant tests pass except for three. https://trac.sagemath.org/attachment/ticket/24905/polymake.log

Last edited 7 months ago by gh-LaisRast (previous) (diff)

comment:98 follow-up: Changed 7 months ago by gh-kliem

[polymake-3.4] FAILED: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/bundled/singular/apps/ideal/cpperl/auto-contains_monomial.o                                                                                                    
[polymake-3.4]   g++ -std=gnu++11 -c -o /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/bundled/singular/apps/ideal/cpperl/auto-contains_monomial.o -MMD -MT /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.
4/src/build/Opt/bundled/singular/apps/ideal/cpperl/auto-contains_monomial.o -MF /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/bundled/singular/apps/ideal/cpperl/auto-contains_monomial.o.d -fPIC -pipe -std=c++14 -march=native -ft
emplate-depth-200 -fno-strict-aliasing -Wno-parentheses -Wshadow -fopenmp -Wno-error=unused-function -Wno-maybe-uninitialized  -DPOLYMAKE_DEBUG=0 -DNDEBUG -O3 -DPOLYMAKE_APPNAME=ideal -DPOLYMAKE_BUNDLED_EXT=singular -DSING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -DS
ING_NDEBUG -DOM_NDEBUG -DSING_NDEBUG -DOM_NDEBUG -I/srv/public/kliem/patchbot-sage/sage/local/include -I/srv/public/kliem/patchbot-sage/sage/local/include/singular -I/srv/public/kliem/patchbot-sage/sage/local/include -I/srv/public/kliem/patchbot-sage/sage/local/include/s
ingular -I/srv/public/kliem/patchbot-sage/sage/local/include/ -I/srv/public/kliem/patchbot-sage/sage/local/include -I/srv/public/kliem/patchbot-sage/sage/local/include/ -I/srv/public/kliem/patchbot-sage/sage/local/include -Wno-unused-value -I/srv/public/kliem/patchbot-sa
ge/sage/local/var/tmp/sage/build/polymake-3.4/src/bundled/singular/include/app-wrappers -I/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/bundled/singular/include/apps -I/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake
-3.4/src/include/app-wrappers -I/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/include/apps -I/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/include/external/permlib -I/srv/public/kliem/patchbot-sage/sage/lo
cal/var/tmp/sage/build/polymake-3.4/src/include/external/TOSimplex -I/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/include/core-wrappers -I/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/include/core /srv/pu
blic/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc && : 'COMPILER_USED=6.3.0'
[polymake-3.4] In file included from ../../../../../../../../include/polymake/client.h:25:0,
[polymake-3.4]                  from ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc:6:
[polymake-3.4] ../../../../../../../../include/polymake/perl/calls.h: In constructor 'pm::perl::PropertyValue::PropertyValue(sv*, TOptions ...)':
[polymake-3.4] ../../../../../../../../include/polymake/perl/calls.h:48:7: warning: declaration of 'options' shadows a member of 'pm::perl::PropertyValue' [-Wshadow]
[polymake-3.4]        : Value(sv_arg)
[polymake-3.4]        ^
[polymake-3.4] In file included from ../../../../../../../../include/polymake/client.h:21:0,
[polymake-3.4]                  from ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc:6:
[polymake-3.4] ../../../../../../../../include/polymake/perl/Value.h:633:16: note: shadowed declaration is here
[polymake-3.4]     value_flags options;
[polymake-3.4]                 ^~~~~~~
[polymake-3.4] In file included from ../../../../../../../../include/polymake/next/SparseMatrix.h:24:0,
[polymake-3.4]                  from ../../../../../../../../include/polymake/SparseMatrix.h:20,
[polymake-3.4]                  from ../../../../../../../../include/polymake/PolynomialImpl.h:24,
[polymake-3.4]                  from ../../../../../../../../include/polymake/next/Polynomial.h:21,
[polymake-3.4]                  from ../../../../../../../../include/polymake/Polynomial.h:20,
[polymake-3.4]                  from ../../../../../../../../include/polymake/ideal/next/singularIdeal.h:24,
[polymake-3.4]                  from ../../../../../../../../include/polymake/ideal/singularIdeal.h:20,
[polymake-3.4]                  from ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc:7:
[polymake-3.4] ../../../../../../../../include/polymake/internal/sparse2d.h: In member function 'void pm::sparse2d::sym_permute_entries<Traits>::copy(const typename Traits::ruler*, typename Traits::ruler*, const Perm&, const InvPerm&)':
[polymake-3.4] ../../../../../../../../include/polymake/internal/sparse2d.h:881:4: warning: declaration of 'inv_perm' shadows a member of 'pm::sparse2d::sym_permute_entries<Traits>' [-Wshadow]
[polymake-3.4]     {
[polymake-3.4]     ^
[polymake-3.4] ../../../../../../../../include/polymake/internal/sparse2d.h:906:21: note: shadowed declaration is here
[polymake-3.4]     std::vector<int> inv_perm;
[polymake-3.4]                      ^~~~~~~~
[polymake-3.4] ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc: At global scope:
[polymake-3.4] ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc:10:1: error: 'FunctionCallerStart4perl' does not name a type
[polymake-3.4]  FunctionCallerStart4perl {
[polymake-3.4]  ^~~~~~~~~~~~~~~~~~~~~~~~
[polymake-3.4] ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc:13:20: error: expected constructor, destructor, or type conversion before '(' token
[polymake-3.4]  FunctionCaller4perl(contains_monomial, meth);
[polymake-3.4]                     ^
[polymake-3.4] ../../bundled/singular/apps/ideal/cpperl/generated/auto-contains_monomial.cc:14:30: error: expected constructor, destructor, or type conversion before '(' token
[polymake-3.4]  FunctionTemplateInstance4perl(0, contains_monomial, meth, contains_monomial:M, perl::Returns::normal, 0, (perl::Canned<const SingularIdeal&>));
[polymake-3.4]                               ^
[polymake-3.4] [359/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/lex_min_representative.o
[polymake-3.4] [360/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/orbit_permlib.o
[polymake-3.4] [361/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/permlib_group_tools.o
[polymake-3.4] [362/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/induced_action.o
[polymake-3.4] [363/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/conjugacy_classes.o
[polymake-3.4] [364/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/permlib.o
[polymake-3.4] [365/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/orbit.o
[polymake-3.4] [366/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/sparse_isotypic_components.o
[polymake-3.4] [367/902] COMPILE /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/apps/group/representations.o
[polymake-3.4] ninja: build stopped: subcommand failed.
[polymake-3.4] Makefile:34: recipe for target 'all' failed
[polymake-3.4] make[2]: *** [all] Error 1
[polymake-3.4] make[2]: Leaving directory '/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src'
[polymake-3.4] Error building polymake
[polymake-3.4]
[polymake-3.4] real     7m41.235s
[polymake-3.4] user     57m24.108s
[polymake-3.4] sys      1m28.580s
[polymake-3.4] ************************************************************************
[polymake-3.4] Error installing package polymake-3.4
[polymake-3.4] ************************************************************************
[polymake-3.4] Please email sage-devel (http://groups.google.com/group/sage-devel)
[polymake-3.4] explaining the problem and including the log file
[polymake-3.4]   /srv/public/kliem/patchbot-sage/sage/logs/pkgs/polymake-3.4.log
[polymake-3.4] Describe your computer, operating system, etc.
[polymake-3.4] If you want to try to fix the problem yourself, *don't* just cd to
[polymake-3.4] /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4 and type 'make' or whatever is appropriate.
[polymake-3.4] Instead, the following commands setup all environment variables
[polymake-3.4] correctly and load a subshell for you to debug the error:
[polymake-3.4]   (cd '/srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4' && '/srv/public/kliem/patchbot-sage/sage/sage' --sh)
[polymake-3.4] When you are done debugging, you can type "exit" to leave the subshell.
[polymake-3.4] ************************************************************************
Makefile:2162: recipe for target '/srv/public/kliem/patchbot-sage/sage/local/var/lib/sage/installed/polymake-3.4' failed
make[1]: *** [/srv/public/kliem/patchbot-sage/sage/local/var/lib/sage/installed/polymake-3.4] Error 1
make[1]: Leaving directory '/srv/public/kliem/patchbot-sage/sage/build/make'

real    7m44,443s
user    57m25,204s
sys     1m28,764s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make polymake'):

* package: ecl-16.1.3.p0
  log file: /srv/public/kliem/patchbot-sage/sage/logs/pkgs/ecl-16.1.3.p0.log
  build directory: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/ecl-16.1.3.p0

* package: numpy-1.16.0
  log file: /srv/public/kliem/patchbot-sage/sage/logs/pkgs/numpy-1.16.0.log
  build directory: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/numpy-1.16.0

* package: polymake-3.4
  log file: /srv/public/kliem/patchbot-sage/sage/logs/pkgs/polymake-3.4.log
  build directory: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4

* package: python
  log file: /srv/public/kliem/patchbot-sage/sage/logs/pkgs/python.log
  build directory: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/python

* package: r-3.4.4.p1
  log file: /srv/public/kliem/patchbot-sage/sage/logs/pkgs/r-3.4.4.p1.log
  build directory: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/r-3.4.4.p1

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

Makefile:31: recipe for target 'polymake' failed
make: *** [polymake] Error 1

comment:99 in reply to: ↑ 98 ; follow-up: Changed 7 months ago by mkoeppe

Replying to gh-kliem:

[polymake-3.4] FAILED: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/bundled/singular/apps/ideal/cpperl/auto-contains_monomial.o    

Which compiler is that? Did Sage install its own gcc?

comment:100 in reply to: ↑ 99 ; follow-up: Changed 7 months ago by gh-kliem

I don't know. I suppose its the systems gcc (Debian 6.3.0-18+deb9u1).

(This is the default gcc in the sage subshell as well.)

Now I did ./sage -i gcc and will see if that makes any difference.

It does Replying to mkoeppe:

Replying to gh-kliem:

[polymake-3.4] FAILED: /srv/public/kliem/patchbot-sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/Opt/bundled/singular/apps/ideal/cpperl/auto-contains_monomial.o    

Which compiler is that? Did Sage install its own gcc?

Last edited 7 months ago by gh-kliem (previous) (diff)

comment:101 Changed 7 months ago by git

  • Commit changed from b6eeaa1ef687358f1407bc4aa7fce61dcba95318 to 624ac010b6185ea4bd4da9a2cb4485cef1d58f4f

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

624ac01polymake: Also provide core functions

comment:102 in reply to: ↑ 100 Changed 7 months ago by mkoeppe

Replying to gh-kliem:

I don't know. I suppose its the systems gcc (Debian 6.3.0-18+deb9u1).

(This is the default gcc in the sage subshell as well.)

Now I did ./sage -i gcc and will see if that makes any difference.

It does

It may also be worth checking whether polymake builds OK from its source package with your system's gcc.

comment:103 Changed 7 months ago by mkoeppe

(outside of sage.)

comment:104 Changed 7 months ago by gh-kliem

polymake 3.3 worked fine. I didn't check with polymake 3.4.

comment:105 Changed 7 months ago by gh-kliem

Now my sage is messed up.

Those are some of the error that occure

File "src/sage/groups/generic.py", line 1104, in sage.groups.generic.?
Failed example:                                               
    F=GF(2^1279,'a')
Exception raised:                
    Traceback (most recent call last):
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)       
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)       
      File "<doctest sage.groups.generic.?[14]>", line 1, in <module>
        F=GF(Integer(2)**Integer(1279),'a')
      File "sage/structure/factory.pyx", line 367, in sage.structure.factory.UniqueFactory.__call__ (build/cythonized/sage/structure/factory.c:2059)
        key, kwds = self.create_key_and_extra_args(*args, **kwds)
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/rings/finite_rings/finite_field_constructor.py", line 566, in create_key_and_extra_args
        raise ValueError("the order of a finite field must be a prime power")
    ValueError: the order of a finite field must be a prime power
**********************************************************************
File "src/sage/groups/generic.py", line 1105, in sage.groups.generic.?
Failed example:           
    n=F.cardinality()-1 # Mersenne prime
Exception raised:                                                           
    Traceback (most recent call last):             
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.groups.generic.?[15]>", line 1, in <module>
        n=F.cardinality()-Integer(1) # Mersenne prime
    AttributeError: 'IntegerFactorization' object has no attribute 'cardinality'
**********************************************************************
File "src/sage/groups/generic.py", line 1106, in sage.groups.generic.?
Failed example:
    order_from_multiple(F.random_element(),n,factorization=[(n,1)],operation='*')==n
Exception raised:
    Traceback (most recent call last):
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.groups.generic.?[16]>", line 1, in <module>
        order_from_multiple(F.random_element(),n,factorization=[(n,Integer(1))],operation='*')==n
    AttributeError: 'IntegerFactorization' object has no attribute 'random_element'

It seems that almost nothing works anymore. I have no idea what I can do about it besides deleting everything and reinstalling sage.

Those errors are happening in the develop branch as well.

By the way, nothing works in src/sage/interfaces/polymake.py. This is the start of a very long list.

kliem@zancara:~/localhome/patchbot-sage/sage$  sage -t --long  src/sage/interfaces/polymake.py --optional=bliss,ccache,dochtml,lrslib,memlimit,mpir,ninja_build,normaliz,openssl,pynormaliz,python2,sage,polymake 
too many failed tests, not using stored timings
Running doctests with ID 2019-04-27-22-43-17-aca10dd8.
Git branch: develop
Using --optional=bliss,ccache,dochtml,lrslib,memlimit,mpir,ninja_build,normaliz,openssl,polymake,pynormaliz,python2,sage
Doctesting 1 file.
sage -t --long src/sage/interfaces/polymake.py
**********************************************************************
File "src/sage/interfaces/polymake.py", line 71, in sage.interfaces.polymake.PolymakeError
Failed example:
    polymake.eval('print foo;')    # optional polymake
Expected:
    Traceback (most recent call last):
    ...
    PolymakeError: Unquoted string "foo" may clash with future reserved word...
Got:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/import/sage-7.4/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/import/sage-7.4/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.PolymakeError[0]>", line 1, in <module>
        polymake.eval('print foo;')    # optional polymake
    AttributeError: Polymake instance has no attribute 'eval'
**********************************************************************
File "src/sage/interfaces/polymake.py", line 86, in sage.interfaces.polymake.polymake_console
Failed example:
    from sage.interfaces.polymake import polymake_console
Exception raised:
    Traceback (most recent call last):
      File "/import/sage-7.4/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/import/sage-7.4/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.polymake_console[0]>", line 1, in <module>
        from sage.interfaces.polymake import polymake_console
    ImportError: No module named polymake
**********************************************************************
File "src/sage/interfaces/polymake.py", line 127, in sage.interfaces.polymake.Polymake
Failed example:
    p = polymake.rand_sphere(4, 20, seed=5)       # optional - polymake
Exception raised:
    Traceback (most recent call last):
      File "/import/sage-7.4/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 498, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/import/sage-7.4/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 861, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake[0]>", line 1, in <module>
        p = polymake.rand_sphere(Integer(4), Integer(20), seed=Integer(5))       # optional - polymake
    AttributeError: Polymake instance has no attribute 'rand_sphere'
**********************************************************************

comment:106 Changed 7 months ago by gh-kliem

When I run polymake in the sage subshell I get a compilation error upon running $p = rand_sphere<4,20>;.

comment:107 follow-up: Changed 7 months ago by jipilab

Run a sage distclean and reinstall sage from scratch. Installing polymake also broke my sage somehow a some point. Reinstalling worked for me.

comment:108 in reply to: ↑ 107 Changed 7 months ago by gh-kliem

I already did it. Now openssl isn't working again. It will take a while until I have a working version of sage on this machine again.

Replying to jipilab:

Run a sage distclean and reinstall sage from scratch. Installing polymake also broke my sage somehow a some point. Reinstalling worked for me.

comment:109 in reply to: ↑ 97 Changed 7 months ago by mkoeppe

Replying to gh-LaisRast:

It compiled on Arch Linux x86_64 (5.0.9-arch1-1-ARCH). All relevant tests pass except for three. https://trac.sagemath.org/attachment/ticket/24905/polymake.log

Thanks for checking. In these three doctests it looks like polymake is emitting some extra newlines. This is probably some nondeterministic pty interaction.

comment:110 follow-ups: Changed 7 months ago by mkoeppe

polymake 3.4 on macOS Mojave (built within sage, but also the official DMG from the polymake website) dies if one presses ^C in quick succession during a computation such as the following:

  $p = cube(20);
  $p->VOLUME;

comment:111 in reply to: ↑ 110 Changed 7 months ago by jipilab

Replying to mkoeppe:

polymake 3.4 on macOS Mojave (built within sage, but also the official DMG from the polymake website) dies if one presses ^C in quick succession during a computation such as the following:

  $p = cube(20);
  $p->VOLUME;

Similar on debian using ./sage -polymake.

comment:112 in reply to: ↑ 110 ; follow-up: Changed 7 months ago by mkoeppe

Replying to mkoeppe:

polymake 3.4 on macOS Mojave (built within sage, but also the official DMG from the polymake website) dies if one presses ^C in quick succession during a computation such as the following:

  $p = cube(20);
  $p->VOLUME;

polymake 3.2 (from the official DMG) has the same problem.

comment:113 in reply to: ↑ 112 Changed 7 months ago by mkoeppe

Replying to mkoeppe:

Replying to mkoeppe:

polymake 3.4 on macOS Mojave (built within sage, but also the official DMG from the polymake website) dies if one presses ^C in quick succession during a computation such as the following:

  $p = cube(20);
  $p->VOLUME;

polymake 3.2 (from the official DMG) has the same problem.

Likewise, polymake 3.1

comment:114 follow-up: Changed 7 months ago by gh-kliem

I set up my sage again and everything worked (all tests passed).

After installing polymake (and normaliz pynormaliz 4ti2 latte_int topcom qhull) I am getting the following failure:

kliem@zancara:~/localhome/patchbot-sage/sage$ ./sage -t --long src/sage/rings/integer.pyx --exitfirst
too many failed tests, not using stored timings
Running doctests with ID 2019-04-28-22-27-17-978fe65b.
Git branch: polymake
Using --optional=4ti2,bliss,cmake,dochtml,latte_int,lidia,lrslib,memlimit,ninja_build,normaliz,openssl,pynormaliz,python2,qhull,sage,topcom
Doctesting 1 file.
sage -t --long src/sage/rings/integer.pyx
**********************************************************************
File "src/sage/rings/integer.pyx", line 3009, in sage.rings.integer.Integer.divisors
Failed example:
    for i in range(20):  # long time
        try:
            alarm(RDF.random_element(1e-3, 0.5))
            _ = n.divisors()
            cancel_alarm()  # we never get here
        except AlarmInterrupt:
            pass
Exception raised:
    Traceback (most recent call last):
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/srv/public/kliem/patchbot-sage/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.rings.integer.Integer.divisors[20]>", line 4, in <module>
        _ = n.divisors()
      File "sage/rings/integer.pyx", line 3079, in sage.rings.integer.Integer.divisors (build/cythonized/sage/rings/integer.c:19767)
        ptr = <unsigned long*>check_allocarray(divisor_count, 3 * sizeof(unsigned long))
      File "memory.pxd", line 87, in cysignals.memory.check_allocarray (build/cythonized/sage/rings/integer.c:47077)
    MemoryError: failed to allocate 33554432 * 24 bytes
**********************************************************************
1 item had failures:
   1 of  21 in sage.rings.integer.Integer.divisors
    [1127 tests, 1 failure, 19.40 s]
----------------------------------------------------------------------
sage -t --long src/sage/rings/integer.pyx  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 19.6 seconds
    cpu time: 19.4 seconds
    cumulative wall time: 19.4 seconds

This looks familiar and indeed I have had this issue before:

https://groups.google.com/forum/#!topic/sage-devel/wqnilUCLsT4

The last time I had this issue this also happened in connection with this ticket on a different machine.

There are several more failures in this file, but I believe they are all due to the same issue.

comment:115 in reply to: ↑ 114 ; follow-up: Changed 7 months ago by jipilab

  • Reviewers set to Matthias Koeppe, Jean-Philippe Labbé
  • Status changed from needs_review to positive_review

Replying to gh-kliem:

[snip]

I do not think that this error is related to this ticket as we are not touching the file src/sage/rings/integer.pyx directly, nor does the installation (as far as I can see) is related to this module. This looks like a local error on this machine.

Considering that:

  • This error was not so far reproduced on other machines,
  • that the package is experimental,
  • it compiles on macOS Mojave, debian, and ArchLinux?,

I would set this ticket to positive review. Further issues can be reported here: #22710.

comment:116 in reply to: ↑ 115 Changed 7 months ago by gh-kliem

Replying to jipilab:

Replying to gh-kliem:

[snip]

I do not think that this error is related to this ticket as we are not touching the file src/sage/rings/integer.pyx directly, nor does the installation (as far as I can see) is related to this module. This looks like a local error on this machine.

I have this error occuring on two different machines and it's installation dependent (on one machine it only shows up in one installation). As it hasn't been there in this installation before installing normaliz pynormaliz 4ti2 latte_int topcom qhull polymake, I suppose that one of them for some strange reason causes alarm to not work correctly anymore (this causes the memory overflow as the list of divisors is too long for ./sage -t default).

It is possible that a patchbot cannot have polymake installed. But I'm not certain of this yet.

Considering that:

  • This error was not so far reproduced on other machines,
  • that the package is experimental,
  • it compiles on macOS Mojave, debian, and ArchLinux?,

I would set this ticket to positive review. Further issues can be reported here: #22710.

comment:117 Changed 7 months ago by mkoeppe

I can't seem to reproduce a failure in the tests for src/sage/rings/integer.pyx.

comment:118 Changed 7 months ago by gh-kliem

The failure has nothing to do with this ticket.

I updated my post on sage-devel.

It seems that many patchbots fail that test in the sense that alarm interrupt takes way too long (they all take about a minute for this file and this seems to be the reason why). In my case the machine allocates the list for the divisors already, which exceeds the default allowance for .sage -t.

comment:119 Changed 7 months ago by fbissey

  • Status changed from positive_review to needs_work

These two doctests need to be marked optional

sage -t --long /usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py", line 1097, in sage.interfaces.polymake.Polymake._tab_completion
Failed example:
    'show_credits' in dir(polymake)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake._tab_completion[0]>", line 1, in <module>
        'show_credits' in dir(polymake)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/tab_completion.py", line 52, in __dir__
        return dir(self.__class__) + list(self.__dict__) + tab_fn()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py", line 1107, in _tab_completion
        self._start()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py", line 362, in _start
        Expect._start(self, alt_message=None)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/expect.py", line 523, in _start
        raise RuntimeError("unable to start %s: %s" % (self.name(), msg))
    RuntimeError: unable to start polymake: End Of File (EOF). Exception style platform.
    Polymake finished running /usr/bin/env TERM=dumb polymake
    command: /usr/bin/env
    args: ['/usr/bin/env', 'TERM=dumb', 'polymake']
    buffer (last 100 chars): ''
    before (last 100 chars): '/usr/bin/env: \xe2\x80\x98polymake\xe2\x80\x99: No such file or directory\r\n'
    after: <class 'pexpect.exceptions.EOF'>
    match: None
    match_index: None
    exitstatus: 127
    flag_eof: True
    pid: 26727
    child_fd: 15
    closed: False
    timeout: None
    delimiter: <class 'pexpect.exceptions.EOF'>
    logfile: None
    logfile_read: None
    logfile_send: None
    maxread: 4194304
    ignorecase: False
    searchwindowsize: None
    delaybeforesend: None
    delayafterclose: 0.1
    delayafterterminate: 0.1
    searcher: searcher_re:
        0: re.compile('polytope > ')
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py", line 1102, in sage.interfaces.polymake.Polymake._tab_completion
Failed example:
    'lex_ordered' in dir(polymake)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/lib64/python2.7/site-packages/sage/doctest/forker.py", line 1095, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.polymake.Polymake._tab_completion[1]>", line 1, in <module>
        'lex_ordered' in dir(polymake)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/tab_completion.py", line 52, in __dir__
        return dir(self.__class__) + list(self.__dict__) + tab_fn()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py", line 1107, in _tab_completion
        self._start()
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/polymake.py", line 362, in _start
        Expect._start(self, alt_message=None)
      File "/usr/lib64/python2.7/site-packages/sage/interfaces/expect.py", line 523, in _start
        raise RuntimeError("unable to start %s: %s" % (self.name(), msg))
    RuntimeError: unable to start polymake: End Of File (EOF). Exception style platform.
    Polymake finished running /usr/bin/env TERM=dumb polymake
    command: /usr/bin/env
    args: ['/usr/bin/env', 'TERM=dumb', 'polymake']
    buffer (last 100 chars): ''
    before (last 100 chars): '/usr/bin/env: \xe2\x80\x98polymake\xe2\x80\x99: No such file or directory\r\n'
    after: <class 'pexpect.exceptions.EOF'>
    match: None
    match_index: None
    exitstatus: 127
    flag_eof: True
    pid: 26731
    child_fd: 15
    closed: False
    timeout: None
    delimiter: <class 'pexpect.exceptions.EOF'>
    logfile: None
    logfile_read: None
    logfile_send: None
    maxread: 4194304
    ignorecase: False
    searchwindowsize: None
    delaybeforesend: None
    delayafterclose: 0.1
    delayafterterminate: 0.1
    searcher: searcher_re:
        0: re.compile('polytope > ')
**********************************************************************
1 item had failures:
   2 of   3 in sage.interfaces.polymake.Polymake._tab_completion
    [24 tests, 2 failures, 0.09 s]

comment:120 Changed 7 months ago by git

  • Commit changed from 624ac010b6185ea4bd4da9a2cb4485cef1d58f4f to 666db96aad37cc2b5d3567eec49905a54a5f2f01

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

666db96Added two missing optional tags

comment:121 Changed 7 months ago by jipilab

  • Status changed from needs_work to needs_review

comment:122 Changed 7 months ago by dimpase

please provide a precise link to the tarball. The link in the description leads to source tarball, minimal tarball, etc...

comment:123 Changed 7 months ago by mkoeppe

The wget command line has the URL.

comment:124 Changed 7 months ago by dimpase

I see - but the instructions like this are flaky. By right, one has to get the branch and the tarball first, and only then go about building things. Otherwise chances are that building chokes up on an unavailable tarball.

And you should run make build to get all the deps right (sage -b is really a quick and dirty plug that should go away)

comment:125 follow-up: Changed 7 months ago by dimpase

why does one need libncurses-dev? Sage provides ncurses, and as soon as #27277 is in, it should be able to use system's (n)curses.

comment:126 in reply to: ↑ 125 Changed 7 months ago by mkoeppe

Replying to dimpase:

why does one need libncurses-dev? Sage provides ncurses, and as soon as #27277 is in, it should be able to use system's (n)curses.

This might be copy-paste from polymake install instructions. Certainly the ncurses spkg is pulled in via perl_term_readline_gnu and readline. It would be good to test if the install works without this system package (it should).

comment:127 Changed 7 months ago by mkoeppe

  • Description modified (diff)

comment:128 Changed 7 months ago by dimpase

OK - the previous instruction didn't work if polymake was already installed. (Surely, the fact that it's an experimental package only makes it more complicated).

comment:130 Changed 7 months ago by dimpase

Please apply this

  • src/sage/interfaces/polymake.py

    a b class Polymake(ExtraTabCompletion, Expect): 
    874874        sometimes it hangs, and therefore we remove it from the tests, for now::
    875875
    876876            sage: c = polymake.cube(15)             # optional - polymake
    877             sage: polymake.eval('print {}->F_VECTOR;'.format(c.name()), timeout=1) # optional - polymake # not tested
     877            sage: polymake.eval('print {}->F_VECTOR;'.format(c.name()), timeout=1) # not tested # optional - polymake
    878878            Traceback (most recent call last):
    879879            ...
    880880            RuntimeError: Polymake fails to respond timely

this order indeed suppresses running this line, otherwise it does not work for me.

comment:131 Changed 7 months ago by mkoeppe

Very strange. I don't think the order of these annotations makes a difference

comment:132 Changed 7 months ago by dimpase

The doctesting framework is a pile of .... - so I'm not surprised that on different platforms it behaves differently. E.g. we see doctests passing with --serial options and mysteriously crashing without it.

comment:133 Changed 7 months ago by git

  • Commit changed from 666db96aad37cc2b5d3567eec49905a54a5f2f01 to 4e91dcc26a4c1be6ce6b298b572a9d748933a719

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

4e91dccChange format of a 'not tested' doc test annotation

comment:134 Changed 7 months ago by git

  • Commit changed from 4e91dcc26a4c1be6ce6b298b572a9d748933a719 to a3a8247aa0530c17188e652a3e4a6eb309db050a

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

a3a8247update docs, as discussed on #24905

comment:135 Changed 7 months ago by dimpase

  • Authors changed from Matthias Koeppe, Jean-Philippe Labbé to Matthias Koeppe, Jean-Philippe Labbé, Dima Pasechnik
  • Status changed from needs_review to positive_review

looks good now.

comment:136 Changed 7 months ago by git

  • Commit changed from a3a8247aa0530c17188e652a3e4a6eb309db050a to 56bf67aac222abe08259a3359f15b5597c654a3d
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

575c2e1Add support for unconditional pre- and post-check actions in spkg-configure.m4
46ae057Refactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
a79e020Refactor the mpir/spkg-configure.m4 (and to a lesser extent the one for gmp) to use the new pre and post arguments to SAGE_SPKG_CONFIGURE
d6024f3Trac #27642: Initial attempt at fix: re-run `configure` and `make all-build` after
56bf67aleave GMP's spkg-configure.m4 as it was

comment:137 Changed 7 months ago by dimpase

oops, sorry, I keep pushing into wrong branches these days! Please save your old branch...

comment:138 Changed 7 months ago by dimpase

specifically, Matthias, could you force-push your last https://trac.sagemath.org/ticket/24905#comment:133 ?

comment:139 Changed 7 months ago by dimpase

On https://github.com/sagemath/sagetrac-mirror/tree/public/upgrade_polymake_to_version_3_2r4

we have everything till comment:101 - so I can recreate the thing from history here... <facepalm>

comment:140 Changed 7 months ago by git

  • Commit changed from 56bf67aac222abe08259a3359f15b5597c654a3d to 1fd7112fc8cbfa4d9cb4638047ece3f83bda3806

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

f595909Doctest fix for polymake 3.4: Use different function from the tropical application
76701f6Doctest fix for polymake 3.4: Differences in available properties
83b51dePolymake 3.4: Fix for typeof small objects
8510124Polymake: Remove copy/paste error handling for code that cannot raise
3c6ae95polymake: Make normaliz a dependency
b6eeaa1polymake: Add a patch to polymake's libnormaliz configure
624ac01polymake: Also provide core functions
9440e3dAdded two missing optional tags
5c598b0Change format of a 'not tested' doc test annotation
1fd7112update docs, as discussed on #24905

comment:141 Changed 7 months ago by dimpase

  • Status changed from needs_review to positive_review

OK, this looks like a correctly recovered branch to me.

comment:142 Changed 7 months ago by dimpase

On Debian I also had to install libterm-readkey-perl

comment:143 Changed 7 months ago by git

  • Commit changed from 1fd7112fc8cbfa4d9cb4638047ece3f83bda3806 to 05f3e612e8f32af5d453f2968eaab81fa4427912
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

666db96Added two missing optional tags
4e91dccChange format of a 'not tested' doc test annotation
05f3e61update docs, as discussed on #24905

comment:144 Changed 7 months ago by git

  • Commit changed from 05f3e612e8f32af5d453f2968eaab81fa4427912 to 53c8ee65d8803ffe4762d260bc173ae6763a7203

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

53c8ee6Mention libterm-readkey-perl

comment:145 Changed 7 months ago by mkoeppe

I restored the old branch and cherry-picked your "update docs" commit

comment:146 Changed 7 months ago by mkoeppe

  • Reviewers changed from Matthias Koeppe, Jean-Philippe Labbé to Matthias Koeppe, Jean-Philippe Labbé, Dima Pasechnik

comment:147 Changed 7 months ago by dimpase

could you also mention libterm-readline-gnu-perl as a package to install on Debian/Ubuntu?

Last edited 7 months ago by dimpase (previous) (diff)

comment:148 Changed 7 months ago by mkoeppe

Perhaps it's time to change this package from "experimental" to "optional"?

comment:149 Changed 7 months ago by git

  • Commit changed from 53c8ee65d8803ffe4762d260bc173ae6763a7203 to b613e57983e061c8ed3413b1e6e7877608cc2d41

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

b613e57Mention libterm-readline-gnu-perl

comment:150 Changed 7 months ago by git

  • Commit changed from b613e57983e061c8ed3413b1e6e7877608cc2d41 to b89376a1961208aff924359f4d2b6573c02c2be2

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

e5c3249polymake: Mention MOngoDB for polydb
b89376apolymake: Update info on macOS

comment:151 follow-up: Changed 7 months ago by dimpase

Let's get this done and open another ticket for promotion to optional. IMHO it is not quite ready, e.g. it does not run on all supported platforms. And the installation procedure isn't nice. I don't think we have a optional package where to install it one needs to install many things by hand in an ad hoc way.


New commits:

e5c3249polymake: Mention MOngoDB for polydb
b89376apolymake: Update info on macOS

comment:152 Changed 7 months ago by git

  • Commit changed from b89376a1961208aff924359f4d2b6573c02c2be2 to 0c1b044b7717f8cd3aed07a24e37f8f82246b1f9

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

0c1b044polymake: update MongoDB information for linux distros

comment:153 in reply to: ↑ 151 Changed 7 months ago by mkoeppe

Replying to dimpase:

Let's get this done and open another ticket for promotion to optional. IMHO it is not quite ready, e.g. it does not run on all supported platforms. And the installation procedure isn't nice. I don't think we have a optional package where to install it one needs to install many things by hand in an ad hoc way.

OK, I agree, good point.

comment:154 Changed 7 months ago by mkoeppe

I added one more perl package. Could you check this on Linux? After adding it, the following should work:

polytope > $A = db_query( { "_id"=>"F.4D.0047" }, db=>"LatticePolytopes", collection=>"SmoothReflexive" );
polymake: used package polyDB
   Access to the polymake polytope database.
   (c) 2013-2018 Silke Horn, Andreas Paffenholz
   http://solros.de
   http://www.mathematik.tu-darmstadt.de/~paffenholz


polymake:  ERROR: #
# *** DEPRECATION WARNING ***
# ...

(The deprecation warning is normal.}

comment:155 Changed 7 months ago by dimpase

Building 72 more Perl packages now :-) Why is polymake itself not on CPAN?

comment:156 Changed 7 months ago by dimpase

this is what I got (after installing moar perl and rebuilding polymake)

 $ ./sage --polymake
Welcome to polymake version 3.4
Copyright (c) 1997-2019
Ewgenij Gawrilow, Michael Joswig (TU Berlin)
https://polymake.org

This is free software licensed under GPL; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Press F1 or enter 'help;' for basic instructions.

Application polytope currently uses following contributed and third-party software packages:
SVG, bliss, cdd, graphviz, latte, libnormaliz, lrs, permlib, polyDB, povray, ppl, qhull, singular, sketch, sympol, threejs, tikz, tosimplex
For more details:  show_credits;
polytope > $A = db_query( { "_id"=>"F.4D.0047" }, db=>"LatticePolytopes", collection=>"SmoothReflexive" );
polymake: used package polyDB
   Access to the polymake polytope database.
   (c) 2013-2018 Silke Horn, Andreas Paffenholz
   http://solros.de
   http://www.mathematik.tu-darmstadt.de/~paffenholz


polytope > 

perhaps you could add a meaningful doctest, tagged internet, for this?

comment:157 Changed 7 months ago by mkoeppe

When MongoDB is not available, the function db_query is not even present. Not sure if/why we want to doctest that.

Let's postpone doctesting the db_query function in Sage to #27802, which adds support for the dictionary that appears in the argument list.

comment:158 Changed 7 months ago by dimpase

  • Status changed from needs_review to positive_review

OK then.

comment:159 Changed 7 months ago by dimpase

one last nitpick yum install perl-Term-ReadLine-Gnu should be added to Fedora instructions

comment:160 Changed 7 months ago by mkoeppe

Thank you!

comment:161 Changed 7 months ago by git

  • Commit changed from 0c1b044b7717f8cd3aed07a24e37f8f82246b1f9 to 2eda6e11325d5d997f0de64e9d9f7add42fa7adb
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

2eda6e1polymake: add to fedora instructions

comment:162 Changed 7 months ago by mkoeppe

  • Status changed from needs_review to positive_review

comment:163 follow-up: Changed 7 months ago by dimpase

Fedora's 26 perl is however not good.

[polymake-3.4] FAILED: /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/perlx/5.24.4/x86_64-linux-thread-multi/Customize.cc
[polymake-3.4] /usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap  --output /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/perlx/5.24.4/x86_64-linux-thread-multi/Customize.cc /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/polymake-3.4/src/lib/core/src/perl/Customize.xxs
[polymake-3.4] Can't open perl script "/usr/share/perl5/ExtUtils/xsubpp": No such file or directory

This seems to be a known problem - not sure it's worthwhile to try to fix it though.

And, by the way, on stable Debian I get a problem building with (the standard) gcc 6.3.

comment:164 in reply to: ↑ 163 Changed 7 months ago by mkoeppe

Replying to dimpase:

Fedora's 26 perl is however not good.

[polymake-3.4] FAILED: /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/perlx/5.24.4/x86_64-linux-thread-multi/Customize.cc
[polymake-3.4] /usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/perl5/ExtUtils/typemap  --output /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/polymake-3.4/src/build/perlx/5.24.4/x86_64-linux-thread-multi/Customize.cc /home/scratch2/dimpase/sage/sage/local/var/tmp/sage/build/polymake-3.4/src/lib/core/src/perl/Customize.xxs
[polymake-3.4] Can't open perl script "/usr/share/perl5/ExtUtils/xsubpp": No such file or directory

This seems to be a known problem - not sure it's worthwhile to try to fix it though.

Known to who?

comment:165 Changed 7 months ago by mkoeppe

Follow-up ticket: Fix polymake 3.4 lrslib detection (#27803).

comment:166 Changed 7 months ago by dimpase

It's known to the internet that Fedora/Centos perform a surgery on its Perl installation resulting in breakages like in comment:163 (missing /usr/share/perl5/ExtUtils/xsubpp; of course xsubpp is present, it's only not in this locaton, hardcoded somewhere...)

comment:167 Changed 7 months ago by mkoeppe

  • Cc paffenholz@… added

comment:168 Changed 7 months ago by mkoeppe

  • Cc kastner@… added

comment:169 follow-up: Changed 7 months ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed

Too late, a previous version was released in 8.8.beta5. Move any new code to a separate ticket

Last edited 7 months ago by vbraun (previous) (diff)

comment:170 in reply to: ↑ 169 Changed 7 months ago by mkoeppe

Replying to vbraun:

Too late, a previous version was released in 8.8.beta5. Move any new code to a separate ticket

No problem, the missing commit is on the branch of #27803

Note: See TracTickets for help on using tickets.