Opened 15 months ago
Closed 7 months ago
#31527 closed enhancement (fixed)
spkg-configure.m4 for polymake
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.5 |
Component: | build: configure | Keywords: | |
Cc: | vdelecroix, jipilab, gh-kliem, paffenholz@…, arojas, dimpase, mjo | Merged in: | |
Authors: | Matthias Koeppe | Reviewers: | Antonio Rojas, Dima Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | 03f17c9 (Commits, GitHub, GitLab) | Commit: | 03f17c9f764eeebb1e1cdaa2004f8ce7fac9022e |
Dependencies: | #32605 | Stopgaps: |
Description (last modified by )
Polymake is available on a number of systems (https://repology.org/project/polymake/versions) and also on Homebrew via a custom tap: https://polymake.org/doku.php/download/start#binary_releases
We add system package info and spkg-configure.m4
Fixing broken distribution packages is beyond the scope of the ticket.
Change History (117)
comment:1 Changed 15 months ago by
- Branch set to u/mkoeppe/spkg_configure_m4_for_polymake
comment:2 Changed 15 months ago by
- Commit set to 2bbee93956bd6e0f530fecc40cd5a00c2e279c4e
- Dependencies set to #31335
comment:3 follow-ups: ↓ 9 ↓ 18 Changed 15 months ago by
With polymake from Andreas's tap, need to do export PERL5LIB="/usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5/darwin-thread-multi-2level:/usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5"
(this is done in the polymake
script but we use the callable library through jupymake)
comment:4 Changed 15 months ago by
- Commit changed from 2bbee93956bd6e0f530fecc40cd5a00c2e279c4e to cd792c5f3ba4cfafca937334a55a553754f42666
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
00b3109 | build/pkgs/sagelib/spkg-install: Set SETUPTOOLS_USE_DISTUTILS=local
|
fd23c0d | build/pkgs/setuptools/patches: Add distutils patch from https://github.com/fxcoudert/cpython/commit/6511bf56.patch
|
3601c51 | Adapt the patch to apply to the vendored distutils
|
9ad84cc | Merge branch 't/31344/homebrew__docbuild_crashes__libtcl_atforkprepare' into t/31335/homebrew__unused_packages__singular__pari_______in__usr_local_leak_into_sagelib_build
|
ae4ea55 | Merge branch 't/31344/homebrew__docbuild_crashes__libtcl_atforkprepare' into t/31335/homebrew__unused_packages__singular__pari_______in__usr_local_leak_into_sagelib_build
|
add7db4 | Merge tag '9.3.beta7' into t/31335/homebrew__unused_packages__singular__pari_______in__usr_local_leak_into_sagelib_build
|
4e777e7 | Merge tag '9.3.beta8' into t/31335/homebrew__unused_packages__singular__pari_______in__usr_local_leak_into_sagelib_build
|
e03c5ac | build/bin/sage-build-env: Set SETUPTOOLS_USE_DISTUTILS here, not in build/pkgs/sagelib/spkg-install
|
f125453 | Merge #31335
|
cd792c5 | build/pkgs/polymake/distros: Add more
|
comment:5 Changed 15 months ago by
- Cc vdelecroix jipilab gh-kliem added
comment:6 Changed 15 months ago by
- Dependencies changed from #31335 to #31335, #31482
comment:7 Changed 15 months ago by
- Commit changed from cd792c5f3ba4cfafca937334a55a553754f42666 to 4fef65aab6c0e30f40545c8c53b72b20af871cd9
comment:8 Changed 15 months ago by
- Commit changed from 4fef65aab6c0e30f40545c8c53b72b20af871cd9 to 35558b3e4c228794c59e8b6e868079dfd8cc5778
Branch pushed to git repo; I updated commit sha1. New commits:
35558b3 | build/pkgs/polymake/spkg-install.in: Only pass --with-lrs if it is installed
|
comment:9 in reply to: ↑ 3 Changed 14 months ago by
- Cc paffenholz@… added
Replying to mkoeppe:
With polymake from Andreas's tap, need to do
export PERL5LIB="/usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5/darwin-thread-multi-2level:/usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5"
(this is done in thepolymake
script but we use the callable library through jupymake)
Setting this globally unfortunately breaks autotools (aclocal
) from homebrew:
Usage: DynaLoader::dl_find_symbol(libhandle, symbolname) at /usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5/darwin-thread-multi-2level/XSLoader.pm line 89. Compilation failed in require at /usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5/File/Path.pm line 6. BEGIN failed--compilation aborted at /usr/local/Cellar/polymake/4.3_1/libexec/perl5/lib/perl5/File/Path.pm line 6. Compilation failed in require at /usr/local/bin/aclocal line 33. BEGIN failed--compilation aborted at /usr/local/bin/aclocal line 33.
Too bad that polymake-config
does not advertise the necessary Perl library path...
comment:10 Changed 14 months ago by
- Commit changed from 35558b3e4c228794c59e8b6e868079dfd8cc5778 to 93fcbd6fee3bfb9b502e8042bdf4e0fade1b8538
Branch pushed to git repo; I updated commit sha1. New commits:
93fcbd6 | build/pkgs/polymake/distros/debian.txt: Add libpolymake-dev
|
comment:11 Changed 14 months ago by
- Dependencies #31335, #31482 deleted
comment:12 Changed 14 months ago by
- Milestone changed from sage-9.3 to sage-9.4
Moving this ticket to 9.4, as it seems unlikely that it will be merged in 9.3, which is in the release candidate stage
comment:13 Changed 14 months ago by
Saving the continuation:
JuPyMake/JuPyMake?.cpp at master · sebasguts/JuPyMake https://github.com/sebasguts/JuPyMake/blob/master/JuPyMake.cpp
jupyter-polymake/kernel.py at master · polymake/jupyter-polymake https://github.com/polymake/jupyter-polymake/blob/master/jupyter_kernel_polymake/kernel.py
jupyter-kernel-polymake · PyPI https://pypi.org/project/jupyter-kernel-polymake/
Failed to install on OSX Mojave Mac::SystemDirectory? is not installed. · Issue #39 · sqitchers/homebrew-sqitch https://github.com/sqitchers/homebrew-sqitch/issues/39
tokuhirom/plenv: Perl binary manager https://github.com/tokuhirom/plenv
polymake Downloads [polymake wiki] https://polymake.org/doku.php/download/start
comment:14 Changed 14 months ago by
Perlbrew https://perlbrew.pl/
gugod/App-perlbrew: Manage perl installations in your $HOME https://github.com/gugod/App-perlbrew
App::perlbrew - Manage perl installations in your $HOME - metacpan.org https://metacpan.org/pod/App::perlbrew
polymake Downloads [polymake wiki] https://polymake.org/doku.php/download/start#binary_releases
perl:mongodb package versions - Repology https://repology.org/project/perl:mongodb/versions
comment:15 Changed 13 months ago by
- Commit changed from 93fcbd6fee3bfb9b502e8042bdf4e0fade1b8538 to 9ad9e2f8d94cd03e7ccea2474213b2f9b7213421
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
b211f2a | .homebrew-build-env: Use /usr/local/opt/polymake if it exists
|
27b4992 | build/pkgs/polymake/spkg-configure.m4: New
|
d30256b | build/pkgs/polymake/spkg-configure.m4: If system polymake is in use, do not require Perl packages
|
6860f90 | build/pkgs/polymake/distros: Add more
|
f4eb33b | build/pkgs/polymake/dependencies: Make lrslib only an optional dependency
|
d93788a | build/pkgs/polymake/spkg-install.in: Only pass --with-lrs if it is installed
|
9ad9e2f | build/pkgs/polymake/distros/debian.txt: Add libpolymake-dev
|
comment:16 Changed 10 months ago by
- Milestone changed from sage-9.4 to sage-9.5
comment:17 Changed 8 months ago by
- Dependencies set to #32605
comment:18 in reply to: ↑ 3 Changed 8 months ago by
Replying to mkoeppe:
With polymake from Andreas's tap, need to do
export PERL5LIB="[...]"
(this is done in thepolymake
script but we use the callable library through jupymake)
Fixed in latest version of the homebrew formula according to https://github.com/polymake/polybundle/issues/19#issuecomment-938612849
comment:19 Changed 8 months ago by
- Commit changed from 9ad9e2f8d94cd03e7ccea2474213b2f9b7213421 to 1832397e7b28b5dd1876e76483dcdcf491efe24a
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
2576f86 | build/make/Makefile.in: If a script package has no spkg-install, run "sage -info" and exit with error
|
feb8de7 | build/pkgs/: Remove spkg-install scripts for dummy script packages
|
8f782c0 | .github/workflows/tox-{optional,experimental}.yml: Do not try to test dummy script packages
|
4b292be | build/pkgs/perl_mongodb/spkg-install: Remove
|
a7b6352 | build/bin/sage-spkg-info: Fix display of system packages
|
e65b309 | bootstrap: Do not provide ./configure --enable-SPKG options for dummy optional packages
|
b485d46 | m4/sage_spkg_collect.m4: Do not advertise dummy optional packages as installable
|
8c8e1c4 | Merge #31163
|
015b899 | build/bin/sage-print-system-package-command: Handle cpan
|
1832397 | Merge #32605
|
comment:20 Changed 8 months ago by
- Dependencies changed from #32605 to #32605, #30887
comment:21 Changed 8 months ago by
- Commit changed from 1832397e7b28b5dd1876e76483dcdcf491efe24a to 83a98bec74e09f0965341feb65c12f2bc74304f1
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
ea548d7 | sage.features.four_ti_2: New, use it in sage.interfaces.four_ti_2, sage.sandpiles
|
f826ded | build/pkgs/4ti2/spkg-configure.m4: Check for executable's with prefix 4ti2_ too
|
56016ce | use AC_LINK_IFELSE instead of obsolete AC_TRY_LINK
|
2b45b77 | sage.feature.join_feature: New, factored out from LatteFeature; use it to implement FourTi2Feature
|
5c23cc9 | DocTestReporter: Fix 'sage -t --optional=all'
|
1b8634d | sage.doctest.external: Add 4ti2
|
d9d4f99 | Merge tag '9.4.beta6' into t/30887/public/30887
|
646e182 | src/sage/features/four_ti_2.py: Move import of SAGE_ENV inside the __init__ method, to remove confusion of sage.misc.dev_tools
|
b090dc0 | Merge #30887
|
83a98be | src/sage/features/polymake.py: New
|
comment:22 Changed 8 months ago by
- Dependencies changed from #32605, #30887 to #32605, #30887, #32547
comment:23 Changed 8 months ago by
- Commit changed from 83a98bec74e09f0965341feb65c12f2bc74304f1 to d2cbfe7e0f79782c4ebb51a2daf9a0b3a97cb2af
comment:24 Changed 8 months ago by
- Status changed from new to needs_review
comment:25 Changed 8 months ago by
Tested successfully on homebrew
comment:26 Changed 8 months ago by
- Cc arojas added
comment:27 Changed 8 months ago by
Testing with tox -e docker-ubuntu-groovy-maximal
, where configure
accepts system polymake 4.1-4build1, gives many doctest failures of the form:
File "/sage/local/lib/python3.8/site-packages/sage/interfaces/polymake.py", line 2598, in _start InitializePolymake() # Can only be called once JuPyMake.PolymakeError: polymake::Main - /usr/lib/polymake/shared is not a symlink
Indeed:
ls -l /usr/lib/polymake/ total 12 -rw-r--r-- 1 root root 2024 Aug 17 2020 config.ninja drwxr-xr-x 2 root root 4096 Oct 8 21:18 lib drwxr-xr-x 3 root root 4096 Oct 8 21:18 perlx
comment:28 Changed 8 months ago by
- Status changed from needs_review to needs_work
... so clearly we need to extend spkg-configure.m4
to test that libpolymake has not been debianized to death
comment:29 Changed 8 months ago by
- Commit changed from d2cbfe7e0f79782c4ebb51a2daf9a0b3a97cb2af to c6b5f8cf5cabe3beb7da6edab5d2faf95425c6a0
comment:30 Changed 8 months ago by
Now correctly rejects polymake on this system (tox -e docker-ubuntu-groovy-maximal -- config.status
)
comment:31 Changed 8 months ago by
Same on ubuntu-impish-maximal
(with system polymake 4.3)
comment:32 Changed 8 months ago by
On fedora-34-maximal
:
configure:34443: checking whether libpolymake works configure:34479: g++ -o conftest -I/usr/include/polymake/external -I/usr/include/arb -I/usr/include/eigen3 -I/usr/include/gfanlib -I/usr/include/nauty -I/usr/include -I/usr/include -DPOLYMAKE_VERSION=404 -fPIC -pipe -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-unused-local-typedefs -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT -O2 -DPOLYMAKE_DEBUG=0 -Dlinux -I/usr/include -lpolymake -Wl,-z,relro -Wl,--as-needed -lnormaliz -ldl -fuse-ld=gold -fopenmp -L/usr/lib64 -Wl,-E conftest.cpp -lmpfi -lmpc -lm4rie -llrcalc -lnauty -lhomfly -liml -lgiac -lecm -lpari -lcurl -lcliquer -lcddgmp -lbz2 -lflint -lmpfr -lglpk -lgmp -lm -lntl -lLfunction >&5 cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security] cc1plus: some warnings being treated as errors
comment:33 Changed 8 months ago by
Same on fedora-35-maximal
So system polymake is rejected. This is correct because building jupymake would fail with the same error.
comment:34 Changed 8 months ago by
- Commit changed from c6b5f8cf5cabe3beb7da6edab5d2faf95425c6a0 to d9fc03e7c039d697247220fd527ec7d2bbf8f588
Branch pushed to git repo; I updated commit sha1. New commits:
d9fc03e | build/pkgs/perl_cpan_polymake_prereq/distros/fedora.txt: perl-TermReadKey, not perl-Term-ReadKey
|
comment:35 Changed 8 months ago by
- Commit changed from d9fc03e7c039d697247220fd527ec7d2bbf8f588 to 777d1b8d20aa23c69faa7f7da7cb31c7c8078aa1
Branch pushed to git repo; I updated commit sha1. New commits:
777d1b8 | build/pkgs/polymake/distros/nix.txt: New
|
comment:36 Changed 8 months ago by
- Status changed from needs_work to needs_review
comment:37 Changed 8 months ago by
- Cc dimpase mjo added
comment:38 Changed 8 months ago by
needs a rebase
comment:39 Changed 8 months ago by
- Commit changed from 777d1b8d20aa23c69faa7f7da7cb31c7c8078aa1 to edce768c1fbe256b13cab1d0161cefb3d3a076fb
Branch pushed to git repo; I updated commit sha1. New commits:
edce768 | Merge tag '9.5.beta3' into t/31527/spkg_configure_m4_for_polymake
|
comment:40 Changed 8 months ago by
- Dependencies changed from #32605, #30887, #32547 to #32605
comment:41 follow-up: ↓ 65 Changed 8 months ago by
gentoo's polymake is too old atm, it's 3.0_p2 there (and broken).
comment:42 Changed 8 months ago by
- Commit changed from edce768c1fbe256b13cab1d0161cefb3d3a076fb to 717f98bdb79b5a00820673e94e3096df66c12dab
Branch pushed to git repo; I updated commit sha1. New commits:
717f98b | build/pkgs/polymake/distros/gentoo.txt: Remove
|
comment:43 Changed 7 months ago by
Let's get this in please
comment:44 follow-up: ↓ 46 Changed 7 months ago by
- Status changed from needs_review to needs_work
fails to recognize polymake on Fedora 34 with polymake package installed, due to
-Werror=format-security
in g++
call from ./configure
.
configure:36908: checking for polymake-config >= 3.5 configure:36984: result: /usr/bin/polymake-config configure:36989: checking whether libpolymake works configure:37025: g++ -o conftest -I/usr/include/polymake/external -I/usr/include/arb -I/usr/include/eigen3 -I/usr/include/gfanlib -I/usr/include/nauty -I/usr/include -I/usr/include -DPOLYMAKE_VERSION=404 -fPIC -pipe -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-unused-local-typedefs -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT -O2 -DPOLYMAKE_DEBUG=0 -Dlinux -I/usr/include -lpolymake -Wl,-z,relro -Wl,--as-needed -lnormaliz -ldl -fuse-ld=gold -fopenmp -L/usr/lib64 -Wl,-E conftest.cpp -lmpfi -lmpc -lm4rie -llrcalc -lnauty -lhomfly -liml -lgiac -lecm -lpari -lcurl -lcliquer -lcddgmp -lbz2 -lflint -lmpfr -lglpk -lgmp -lm -lntl -lLfunction >&5 cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security] cc1plus: some warnings being treated as errors
And Werror
gets there from polymake-config --cflags
call.
$ polymake-config --cflags -DPOLYMAKE_VERSION=404 -fPIC -pipe -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-unused-local-typedefs -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT -O2 -DPOLYMAKE_DEBUG=0
comment:45 Changed 7 months ago by
If I clean up CPPFLAGS as follows
-
build/pkgs/polymake/spkg-configure.m4
a b SAGE_SPKG_CONFIGURE([polymake], [ 20 20 saved_LDFLAGS="$LDFLAGS" 21 21 CXX="$($ac_cv_path_POLYMAKE_CONFIG --cc)" 22 22 CPPFLAGS="$($ac_cv_path_POLYMAKE_CONFIG --includes) $($ac_cv_path_POLYMAKE_CONFIG --cflags) $CPPFLAGS" 23 CPPFLAGS=${CPPFLAGS//\-Werror=format\-security/} 23 24 LDFLAGS="-lpolymake $($ac_cv_path_POLYMAKE_CONFIG --ldflags) $LDFLAGS" 24 25 AC_RUN_IFELSE([AC_LANG_PROGRAM([[ 25 26 #include <polymake/Main.h>
then I still get
configure:36989: checking whether libpolymake works configure:37026: g++ -o conftest -I/usr/include/polymake/external -I/usr/include/arb -I/usr/include/eigen3 -I/usr/include/gfanlib -I/usr/include/nauty -I/usr/include -I/usr/include -DPOLYMAKE_VERSION=404 -fPIC -pipe -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-unused-local-typedefs -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function -Wno-stringop-overflow -Wno-array-bounds -Wno-maybe-uninitialized -Wno-free-nonheap-object -DPOLYMAKE_WITH_FLINT -O2 -DPOLYMAKE_DEBUG=0 -Dlinux -I/usr/include -lpolymake -Wl,-z,relro -Wl,--as-needed -lnormaliz -ldl -fuse-ld=gold -fopenmp -L/usr/lib64 -Wl,-E conftest.cpp -lmpfi -lmpc -lm4rie -llrcalc -lnauty -lhomfly -liml -lgiac -lecm -lpari -lcurl -lcliquer -lcddgmp -lbz2 -lflint -lmpfr -lglpk -lgmp -lm -lntl -lLfunction >&5 configure:37026: $? = 0 configure:37026: ./conftest Can't locate Polymake/Main.pm in @INC (you may need to install the Polymake::Main module) (@INC contains: /share/polymake/perllib /lib64/polymake/perlx/5.32.1/x86_64-linux-thread-multi /lib64/polymake/perlx/5.32.1 /lib64/polymake/perlx /users/dimpase/perl5/lib/perl5/x86_64-linux-thread-multi /users/dimpase/perl5/lib/perl5 /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /builddir/build/BUILD/polymake-4.4/lib/callable/src/perl/Main.cc line 146. BEGIN failed--compilation aborted at /builddir/build/BUILD/polymake-4.4/lib/callable/src/perl/Main.cc line 146. terminate called after throwing an instance of 'std::runtime_error' what(): could not initialize the perl interpreter ./configure: line 3495: 1808668 Aborted (core dumped) ./conftest$ac_exeext configure:37026: $? = 134 configure: program exited with status 134
comment:46 in reply to: ↑ 44 Changed 7 months ago by
Replying to dimpase:
fails to recognize polymake on Fedora 34 with polymake package installed, due to
-Werror=format-security
ing++
call from./configure
.
Yes, see comment:33.
comment:47 Changed 7 months ago by
- Status changed from needs_work to needs_review
comment:48 Changed 7 months ago by
- Description modified (diff)
comment:49 Changed 7 months ago by
- Component changed from packages: optional to build: configure
comment:50 follow-up: ↓ 54 Changed 7 months ago by
Is there any Linux distro with working for the purposes of this ticket Polymake package?
comment:51 Changed 7 months ago by
I don't remember if I tested with arch
, opensuse
, or nix
.
comment:52 Changed 7 months ago by
- Reviewers set to Antonio Rojas
- Status changed from needs_review to positive_review
Works fine on Arch. Picks up system polymake, Jupymake spkg installs correctly and all tests pass in interfaces.polymake
comment:53 Changed 7 months ago by
Thanks!
comment:54 in reply to: ↑ 50 Changed 7 months ago by
Replying to dimpase:
Is there any Linux distro with working for the purposes of this ticket Polymake package?
Gentoo with https://github.com/gentoo/gentoo/pull/17925
sage -t --long --random-seed=0 src/sage/interfaces/polymake.py [54 tests, 0.63 s] ---------------------------------------------------------------------- All tests passed! ---------------------------------------------------------------------- Total time for all tests: 0.7 seconds cpu time: 0.1 seconds cumulative wall time: 0.6 seconds Traceback (most recent call last): File "/usr/lib/python-exec/python3.10/sage-runtests", line 159, in <module> exit_code_pytest = pytest.main(pytest_options + args) TypeError: can only concatenate list (not "Namespace") to list
comment:55 Changed 7 months ago by
Excellent!
comment:56 Changed 7 months ago by
The present branch appears to need polymake
explictly listed in the list --optional=
, if it's not installed. On arch I have:
$ ./sage -tp src/sage/geometry/polyhedron/backend_polymake.py Running doctests with ID 2021-10-22-08-52-35-89300609. Git branch: wip Using --optional=arch,argcomplete,build,dochtml,jupymake,pip,sage,sage.rings.real_double,sage_spkg Doctesting 1 file using 4 threads. sage -t --warn-long 105.2 --random-seed=111795974516996210666725135263478181348 src/sage/geometry/polyhedron/backend_polymake.py [9 tests, 0.52 s] ---------------------------------------------------------------------- All tests passed! ---------------------------------------------------------------------- Total time for all tests: 0.6 seconds cpu time: 0.5 seconds cumulative wall time: 0.5 seconds Pytest is not installed, skip checking tests that rely on it.
but
$ ./sage -tp --optional=arch,argcomplete,build,dochtml,pip,sage,sage.rings.real_double,sage_spkg,polymake src/sage/geometry/polyhedron/backend_polymake.py Running doctests with ID 2021-10-22-08-52-45-3599c25d. Git branch: wip Using --optional=arch,argcomplete,build,dochtml,pip,polymake,sage,sage.rings.real_double,sage_spkg Doctesting 1 file using 4 threads. sage -t --warn-long 105.2 --random-seed=65107005796673777637867553513561507930 src/sage/geometry/polyhedron/backend_polymake.py ********************************************************************** File "src/sage/geometry/polyhedron/backend_polymake.py", line 665, in sage.geometry.polyhedron.backend_polymake.Polyhedron_polymake.__setstate__ Failed example: print("Possible output"); P = polytopes.dodecahedron(backend='polymake') # optional - polymake Exception raised: Traceback (most recent call last): File "/home/dima/sagetrac-mirror/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/interfaces/interface.py", line 732, in __init__ self._name = parent._create(value, name=name) File "/home/dima/sagetrac-mirror/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/interfaces/polymake.py", line 549, in _create self.set(name, value) File "/home/dima/sagetrac-mirror/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/interfaces/polymake.py", line 638, in set self.eval(cmd) File "/home/dima/sagetrac-mirror/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/interfaces/polymake.py", line 2712, in eval raise PolymakeError(error) sage.interfaces.polymake.PolymakeError: C++/perl Interface module compilation failed; most likely due to a type mismatch. Set the variable $Polymake::User::Verbose::cpp to a positive value and repeat for more details. During handling of the above exception, another exception occurred: ... TypeError: C++/perl Interface module compilation failed; most likely due to a type mismatch. Set the variable $Polymake::User::Verbose::cpp to a positive value and repeat for more details. ********************************************************************** 1 item had failures: 1 of 21 in sage.geometry.polyhedron.backend_polymake.Polyhedron_polymake.__setstate__ [106 tests, 1 failure, 13.32 s] ---------------------------------------------------------------------- sage -t --warn-long 105.2 --random-seed=65107005796673777637867553513561507930 src/sage/geometry/polyhedron/backend_polymake.py # 1 doctest failed
there is a similar test failure in src/sage/geometry/polyhedron/base.py
comment:57 follow-ups: ↓ 59 ↓ 63 Changed 7 months ago by
- Status changed from positive_review to needs_work
We see that tests mentioned in comment:54 were not complete, as polymake
was not in --optional=
- if it were, we'd see many more tests (this is on Arch, again):
$ ./sage -tp --optional=arch,argcomplete,build,dochtml,pip,sage,sage.rings.real_double,sage_spkg,polymake src/sage/interfaces/polymake.py Running doctests with ID 2021-10-22-08-58-24-8cc8a0d8. Git branch: wip Using --optional=arch,argcomplete,build,dochtml,pip,polymake,sage,sage.rings.real_double,sage_spkg Doctesting 1 file using 4 threads. sage -t --warn-long 105.2 --random-seed=106731483408083137921384584724619392983 src/sage/interfaces/polymake.py [253 tests, 5.28 s] ---------------------------------------------------------------------- All tests passed!
comment:58 follow-ups: ↓ 60 ↓ 61 Changed 7 months ago by
jupymake
should be in build/pkgs/polymake/dependencies
, as polymake
tests fail if it's not installed.
As well, spkg-configure.m4
perhaps needs to at least print a warning if system's polymake it selected, or, better, use some (missing?) mechanism to trigger installation of jupymake
in this case.
comment:59 in reply to: ↑ 57 Changed 7 months ago by
Replying to dimpase:
we'd see many more tests (this is on Arch, again):
[253 tests, 5.28 s]
yes, with that long --optional=
I see all 253 tests passed too (on Gentoo)
comment:60 in reply to: ↑ 58 Changed 7 months ago by
Replying to dimpase:
jupymake
should be inbuild/pkgs/polymake/dependencies
, aspolymake
tests fail if it's not installed.
No, this makes no sense. jupymake
depends (at compile time) on polymake
.
comment:61 in reply to: ↑ 58 ; follow-up: ↓ 64 Changed 7 months ago by
Replying to dimpase:
use some (missing?) mechanism to trigger installation of
jupymake
in this case.
This is a valid wishlist item.
comment:62 Changed 7 months ago by
then tag jupymake-dependent tests as such.
comment:63 in reply to: ↑ 57 Changed 7 months ago by
The failure in comment:56,
TypeError: C++/perl Interface module compilation failed; most likely due to a type mismatch. Set the variable $Polymake::User::Verbose::cpp to a positive value and repeat for more details.
has got nothing to do with jupymake vs. the polymake pexpect interface.
Looks to me like a packaging bug in arch.
comment:64 in reply to: ↑ 61 ; follow-up: ↓ 67 Changed 7 months ago by
comment:65 in reply to: ↑ 41 ; follow-up: ↓ 72 Changed 7 months ago by
Replying to dimpase:
gentoo's polymake is too old atm, it's 3.0_p2 there (and broken).
I've just updated it to polymake-4.5. Send bug reports if it's still broken.
comment:66 Changed 7 months ago by
- Status changed from needs_work to needs_review
comment:67 in reply to: ↑ 64 Changed 7 months ago by
Replying to mkoeppe:
Replying to mkoeppe:
Replying to dimpase:
use some (missing?) mechanism to trigger installation of
jupymake
in this case.This is a valid wishlist item.
I have opened #32741 for this.
I explained there to how to fix this in this particular case - with jupymake getting spkg-configure.m4
comment:68 Changed 7 months ago by
I hope #32741 is not preventing this ticket to get positive review. I mean all 253 tests passed on several systems.
comment:69 Changed 7 months ago by
well, the reason for not giving it a positive review are doctests failing due to accidentally not having jupymake installed, which is not forced now.
comment:70 Changed 7 months ago by
Dima, comment:63 -- since you tested on arch, could you please investigate the failure mode? These doctests are NOT dependent on jupymake.
comment:71 follow-up: ↓ 73 Changed 7 months ago by
Let's move this forward please
comment:72 in reply to: ↑ 65 ; follow-ups: ↓ 75 ↓ 76 Changed 7 months ago by
Replying to mjo:
Replying to dimpase:
gentoo's polymake is too old atm, it's 3.0_p2 there (and broken).
I've just updated it to polymake-4.5. Send bug reports if it's still broken.
# emerge --ask polymake These are the packages that would be merged, in order: Calculating dependencies - !!! Problem resolving dependencies for sci-mathematics/polymake ... done! !!! The ebuild selected to satisfy "polymake" has unmet requirements. - sci-mathematics/polymake-4.5::gentoo USE="cdd flint normaliz -bliss -libpolymake -lrs -nauty -ppl -singular" The following REQUIRED_USE flag constraints are unsatisfied: exactly-one-of ( bliss nauty )
comment:73 in reply to: ↑ 71 Changed 7 months ago by
Replying to mkoeppe:
Let's move this forward please
sorry, my arch lxc vm is gone (I guess I forgot to make it persistent?). Let me try "native" Gentoo instead.
comment:74 Changed 7 months ago by
Time to work on #29283 (tox.ini: Add test environments using LXC)
comment:75 in reply to: ↑ 72 Changed 7 months ago by
Replying to dimpase:
Replying to mjo:
Replying to dimpase:
gentoo's polymake is too old atm, it's 3.0_p2 there (and broken).
I've just updated it to polymake-4.5. Send bug reports if it's still broken.
USE="cdd flint normaliz libpolymake lrs nauty ppl singular" emerge --ask polymake
doesn't work, there is a problem with lrs
(and Sage installs polymake
with lrs
)
Apparently, it's known to Sage, as spkg-install.in
has a comment:
# Since polymake v3.4, it does not find our lrs installation if we do not provide --with-lrs explicitly.
Once this is fixed in Gentoo (sorry, I don't grok its ebuilds), distros/gentoo.txt
should be provided (with appropriate [..]
options?).
comment:76 in reply to: ↑ 72 ; follow-up: ↓ 77 Changed 7 months ago by
Replying to dimpase:
The following REQUIRED_USE flag constraints are unsatisfied: exactly-one-of ( bliss nauty )
You have to set USE=bliss
or USE=nauty
, but not both, to pick a backend for graph automorphism computations.
comment:77 in reply to: ↑ 76 ; follow-up: ↓ 78 Changed 7 months ago by
Replying to mjo:
Replying to dimpase:
The following REQUIRED_USE flag constraints are unsatisfied: exactly-one-of ( bliss nauty )You have to set
USE=bliss
orUSE=nauty
, but not both, to pick a backend for graph automorphism computations.
sure, but the default USE
flags shouldn't fail! As well, how about lrs
?
comment:78 in reply to: ↑ 77 Changed 7 months ago by
Replying to dimpase:
sure, but the default
USE
flags shouldn't fail! As well, how aboutlrs
?
They don't "fail," portage tells you to pick one because you have to pick one =P
If one is a significantly better choice than the other, we would normally enable that one by default, but I don't know enough about polymake to say that either is better.
What's wrong with lrs?
comment:79 Changed 7 months ago by
USE="cdd flint normaliz libpolymake lrs nauty ppl singular" emerge --ask polymake These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sci-mathematics/polymake-4.5 USE="lrs*" Would you like to merge these packages? [Yes/No] >>> Verifying ebuild manifests >>> Emerging (1 of 1) sci-mathematics/polymake-4.5::gentoo * polymake-4.5-minimal.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking polymake-4.5-minimal.tar.bz2 to /var/tmp/portage/sci-mathematics/polymake-4.5/work >>> Source unpacked in /var/tmp/portage/sci-mathematics/polymake-4.5/work >>> Preparing source in /var/tmp/portage/sci-mathematics/polymake-4.5/work/polymake-4.5 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sci-mathematics/polymake-4.5/work/polymake-4.5 ... checking C++ compiler ... ok (x86_64-pc-linux-gnu-g++ is GCC 8.3.1) checking C++ library ... ok (GNU libstdc++ 20190518, C++ 201402) determining architecture ... ok (x86_64) determining compiler flags ... ok CFLAGS=-march=native -O3 -fomit-frame-pointer -pipe CXXFLAGS=-march=native -O3 -fomit-frame-pointer -pipe -std=c++14 -ftemplate-depth-200 -fno-strict-aliasing -fopenmp -Wshadow -Wlogical-op -Wconversion -Wzero-as-null-pointer-constant -Wno-parentheses -Wno-error=unused-function LDFLAGS=-Wl,-O1 -Wl,--as-needed -fuse-ld=gold -fopenmp checking gmp installation ... ok checking mpfr installation ... ok checking boost installation ... ok checking perl module XML::SAX ... ok checking perl module Term::ReadKey ... ok checking perl module Term::ReadLine ... ok checking perl module JSON ... ok checking shared perl library ... ok Configuring bundled extensions: bundled extension java ... disabled by command-line bundled extension javaview ... disabled by command-line bundled extension scip ... disabled by command-line bundled extension soplex ... disabled by command-line bundled extension bliss ... disabled by command-line bundled extension cdd ... ok (0.94m @ /usr) bundled extension flint ... ok (ok (2.7.1 @ /usr)) bundled extension libnormaliz ... ok (3.8.1 @ /usr) bundled extension lrs ... failed ERROR: The bundled extension lrs was explicitly requested but failed to configure. Please recheck your argument (--with-lrs=/usr) and build/bundled.log . You can also disable it by specifying --without-lrs instead. * ERROR: sci-mathematics/polymake-4.5::gentoo failed (configure phase): * (no error message) * * Call stack: * ebuild.sh, line 127: Called src_configure * environment, line 1598: Called die * The specific snippet of code: * ./configure --prefix="${EPREFIX}/usr" --libdir="${EPREFIX}/usr/$(get_libdir)" --libexecdir="${EPREFIX}/usr/$(get_libdir)/polymake" $(usev !libpolymake "--without-callable") --without-java --without-javaview --without-native --without-scip --without-soplex $(use_with bliss bliss "${EPREFIX}/usr") $(use_with cdd cdd "${EPREFIX}/usr") $(use_with flint flint "${EPREFIX}/usr") $(use_with lrs lrs "${EPREFIX}/usr") $(use_with nauty nauty "${EPREFIX}/usr") $(use_with normaliz libnormaliz "${EPREFIX}/usr") $(use_with ppl ppl "${EPREFIX}/usr") $(use_with singular singular "${EPREFIX}/usr") || die * * If you need support, post the output of `emerge --info '=sci-mathematics/polymake-4.5::gentoo'`, * the complete build log and the output of `emerge -pqv '=sci-mathematics/polymake-4.5::gentoo'`. * The complete build log is located at '/var/tmp/portage/sci-mathematics/polymake-4.5/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/polymake-4.5/temp/environment'. * Working directory: '/var/tmp/portage/sci-mathematics/polymake-4.5/work/polymake-4.5' * S: '/var/tmp/portage/sci-mathematics/polymake-4.5/work/polymake-4.5' >>> Failed to emerge sci-mathematics/polymake-4.5, Log file: >>> '/var/tmp/portage/sci-mathematics/polymake-4.5/temp/build.log' * Messages for package sci-mathematics/polymake-4.5: * ERROR: sci-mathematics/polymake-4.5::gentoo failed (configure phase): * (no error message) * * Call stack: * ebuild.sh, line 127: Called src_configure * environment, line 1598: Called die * The specific snippet of code: * ./configure --prefix="${EPREFIX}/usr" --libdir="${EPREFIX}/usr/$(get_libdir)" --libexecdir="${EPREFIX}/usr/$(get_libdir)/polymake" $(usev !libpolymake "--without-callable") --without-java --without-javaview --without-native --without-scip --without-soplex $(use_with bliss bliss "${EPREFIX}/usr") $(use_with cdd cdd "${EPREFIX}/usr") $(use_with flint flint "${EPREFIX}/usr") $(use_with lrs lrs "${EPREFIX}/usr") $(use_with nauty nauty "${EPREFIX}/usr") $(use_with normaliz libnormaliz "${EPREFIX}/usr") $(use_with ppl ppl "${EPREFIX}/usr") $(use_with singular singular "${EPREFIX}/usr") || die * * If you need support, post the output of `emerge --info '=sci-mathematics/polymake-4.5::gentoo'`, * the complete build log and the output of `emerge -pqv '=sci-mathematics/polymake-4.5::gentoo'`. * The complete build log is located at '/var/tmp/portage/sci-mathematics/polymake-4.5/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/polymake-4.5/temp/environment'. * Working directory: '/var/tmp/portage/sci-mathematics/polymake-4.5/work/polymake-4.5' * S: '/var/tmp/portage/sci-mathematics/polymake-4.5/work/polymake-4.5' hilbert /tmp #
I guess one needs to do what's done in spkg-install
to pass the lrs
prefix more explicitly.
comment:80 follow-up: ↓ 81 Changed 7 months ago by
I guess one needs to do what's done in spkg-install to pass the lrs prefix more explicitly.
You may need to upgrade to lrslib-071b or lrslib-071b-r1. Those versions (I added them to the tree along with polymake-4.5) fix a critical bug in v071. I don't know if v062 works because it doesn't even build anymore. Comically, we can't remove it though because it's "stable" and no one has stabilized v071b on x86 yet.
comment:81 in reply to: ↑ 80 Changed 7 months ago by
Replying to mjo:
I guess one needs to do what's done in spkg-install to pass the lrs prefix more explicitly.
You may need to upgrade to lrslib-071b or lrslib-071b-r1. Those versions (I added them to the tree along with polymake-4.5) fix a critical bug in v071. I don't know if v062 works because it doesn't even build anymore. Comically, we can't remove it though because it's "stable" and no one has stabilized v071b on x86 yet.
This does not take away the problem that polymake's configure fails, I cannot imagine it's due to lrs's version.
comment:82 Changed 7 months ago by
Oops, I take it back - lrslib-071b-r1 allows configure to pass.
I don't know whether Gentoo has such a flexibility in configurations, but ideally it should refuse to even start building with an old lrs version.
comment:83 Changed 7 months ago by
but I still have bad news, in Gentoo case in particular, but also in general. Perl's MongoDB module is at EOL.
# emerge dev-perl/MongoDB Calculating dependencies... done! !!! All ebuilds that could satisfy "dev-perl/MongoDB" have been masked. !!! One of the following masked packages is required to complete your request: - dev-perl/MongoDB-1.8.0::gentoo (masked by: package.mask) /usr/portage/profiles/package.mask: # Sam James <sam@gentoo.org> (2021-10-25) # Fails to build with glibc-2.30(!) and was abandoned upstream # a few years ago. No reverse dependencies in tree. # bug #728556. Removal on 2021-11-25. For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.
https://packages.gentoo.org/packages/dev-perl/MongoDB mentions version 2.2.2, and https://metacpan.org/dist/MongoDB says
Changes for version v2.2.2 - 2020-08-13 !!! END OF LIFE NOTICE !!! As of August 13, 2020, the MongoDB Perl driver has reached end of life and is no longer supported by MongoDB.
comment:84 follow-ups: ↓ 90 ↓ 91 Changed 7 months ago by
Shouldn't perl_cpan_polymake_prereq
(and other deps?) be in SAGE_SPKG_DEPCHECK
for polymake?
comment:85 Changed 7 months ago by
MongoDB cannot deprive this ticket of positive review
comment:86 follow-up: ↓ 93 Changed 7 months ago by
We should check that polymake
is working, not only polymake-config
.
(As some Perl deps might be broken - e.g. I ran into
$ polymake Welcome to polymake version 4.5 Copyright (c) 1997-2021 Ewgenij Gawrilow, Michael Joswig, and the polymake team Technische Universität Berlin, Germany 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. Loading applications now...polymake: ERROR: "/usr/share/polymake/apps/common/perllib/PolyDB.pm", line 23: Can't locate MongoDB.pm in @INC (you may need to install the MongoDB module) (@INC contains: Polymake::Core::Application=ARRAY(0x5589c39eea50) /usr/share/polymake/perllib /usr/lib64/polymake/perlx/5.34.0/x86_64-linux-thread-multi /usr/lib64/polymake/perlx/5.34.0 /usr/lib64/polymake/perlx /etc/perl /usr/local/lib64/perl5/5.34/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.34 /usr/lib64/perl5/vendor_perl/5.34/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.34 /usr/lib64/perl5/5.34/x86_64-linux-thread-multi /usr/lib64/perl5/5.34 /usr/lib64/perl5/5.32 /usr/lib64/perl5/vendor_perl/5.32 /usr/lib64/perl5/vendor_perl/5.30.3 /usr/lib64/perl5/vendor_perl/5.30.0)
comment:87 Changed 7 months ago by
I was able to install the missing perl module on Gentoo by doing as root
# emerge App-cpanminus # cpanm MongoDB
this needs another ticket.
comment:88 Changed 7 months ago by
Please see #32808 for Perl MongoDB package/spkg issues.
comment:89 Changed 7 months ago by
- Status changed from needs_review to needs_work
- Work issues set to clarify Perl deps in spkg-configure.m4 (and elsewhere)
comment:90 in reply to: ↑ 84 Changed 7 months ago by
See also #31830 (perl_cpan_polymake_prereq
: Update install instructions).
comment:91 in reply to: ↑ 84 ; follow-ups: ↓ 94 ↓ 99 Changed 7 months ago by
Replying to dimpase:
Shouldn't
perl_cpan_polymake_prereq
(and other deps?) be inSAGE_SPKG_DEPCHECK
for polymake?
perl_cpan_polymake_prereq
does not make sense in SAGE_SPKG_DEPCHECK
because it is a dummy script package -- we provide no spkg-install for it.
You can add SAGE_SPKG_DEPCHECK
for bliss
, cddlib
, lrslib
, readline
, ppl
, which bring shared libraries.
comment:92 Changed 7 months ago by
- Commit changed from 717f98bdb79b5a00820673e94e3096df66c12dab to 03f17c9f764eeebb1e1cdaa2004f8ce7fac9022e
Branch pushed to git repo; I updated commit sha1. New commits:
03f17c9 | build/pkgs/polymake/spkg-configure.m4: In AC_RUN_IFELSE for libpolymake, use shell_enable, set_application
|
comment:93 in reply to: ↑ 86 ; follow-up: ↓ 98 Changed 7 months ago by
Replying to dimpase:
We should check that
polymake
is working, not onlypolymake-config
. (As some Perl deps might be broken [...])
I have instead added some initialization steps to the existing run test of the polymake library. Please try if it correctly rejects your broken installation
comment:94 in reply to: ↑ 91 Changed 7 months ago by
Replying to mkoeppe:
You can add
SAGE_SPKG_DEPCHECK
forbliss
,cddlib
,lrslib
,readline
,ppl
, which bring shared libraries.
However, this would reject polymake on homebrew, which does not provide all of these libraries. So let's not do this -- unless someone is actually running into shared library conflicts.
comment:95 Changed 7 months ago by
- Status changed from needs_work to needs_review
- Work issues clarify Perl deps in spkg-configure.m4 (and elsewhere) deleted
comment:96 Changed 7 months ago by
- Reviewers changed from Antonio Rojas to Antonio Rojas, Dima Pasechnik
comment:97 Changed 7 months ago by
Testing on arch using EXTRA_CONFIGURE_ARGS="--disable-notebook" tox -e docker-archlinux-latest-maximal
.
There seems to be a packaging bug that breaks polymake when TERM
is set to dumb
(as we do in the (deprecated) polymake pexpect interface):
[root@ab9af06251dd sage]# TERM=dumb polymake Welcome to polymake version 4.5 Copyright (c) 1997-2021 Ewgenij Gawrilow, Michael Joswig, and the polymake team Technische Universität Berlin, Germany 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. Loading applications now...Can't locate object method "new" via package "Term::ReadLine::Gnu" at /usr/share/polymake/perllib/Polymake/Core/Shell.pm line 30.
comment:98 in reply to: ↑ 93 ; follow-up: ↓ 112 Changed 7 months ago by
Replying to mkoeppe:
Replying to dimpase:
We should check that
polymake
is working, not onlypolymake-config
. (As some Perl deps might be broken [...])I have instead added some initialization steps to the existing run test of the polymake library. Please try if it correctly rejects your broken installation
it does, I get the same error as from polymake
in terminal. I get
configure:39826: ./conftest terminate called after throwing an instance of 'pm::perl::exception' what(): "/usr/share/polymake/apps/common/perllib/PolyDB.pm", line 23: Can't locate MongoDB.pm in @INC (you may need to install the MongoDB module) ...
However, I don't get why you need this extra hack, rather than the result of perl_mongodb/spkg-configure.m4
, which could be added into SAGE_SPKG_DEPCHECK
, and which duly reports
perl_mongodb-none: no suitable system package; optional
These perl module packages aren't so dummy after all.
comment:99 in reply to: ↑ 91 Changed 7 months ago by
Replying to mkoeppe:
Replying to dimpase:
Shouldn't
perl_cpan_polymake_prereq
(and other deps?) be inSAGE_SPKG_DEPCHECK
for polymake?
perl_cpan_polymake_prereq
does not make sense inSAGE_SPKG_DEPCHECK
because it is a dummy script package -- we provide no spkg-install for it.
What do you mean it's dummy
- it does the check for the needed modules!
See also comment:98.
comment:100 follow-up: ↓ 102 Changed 7 months ago by
"Dummy" means we have no spkg-install
script; the package only exists for running the spkg-configure.m4
.
comment:101 follow-up: ↓ 104 Changed 7 months ago by
The perl_mongodb
package is not required. Only users who want to use PolyDB need it.
That's why I split it out from perl_cpan_polymake_prereq
in #31840.
comment:102 in reply to: ↑ 100 Changed 7 months ago by
Replying to mkoeppe:
"Dummy" means we have no
spkg-install
script; the package only exists for running thespkg-configure.m4
.
anyhow, these packages do useful tests on suitability of system polymake
, as we have discovered here, why not add them to SAGE_SPKG_DEPCHECK
?
comment:103 follow-up: ↓ 105 Changed 7 months ago by
You are confused about SAGE_SPKG_DEPCHECK
. This macro implements the logic "dependency library B is installed from SPKG ==> must install package A from SPKG too".
comment:104 in reply to: ↑ 101 Changed 7 months ago by
Replying to mkoeppe:
The
perl_mongodb
package is not required. Only users who want to use PolyDB need it. That's why I split it out fromperl_cpan_polymake_prereq
in #31840.
I don't know what PolyDB
is, it seems to be an integral part of polymake now.
(At least on Gentoo there seems to be no option to have polymake not dependent on it)
comment:105 in reply to: ↑ 103 Changed 7 months ago by
Replying to mkoeppe:
You are confused about
SAGE_SPKG_DEPCHECK
. This macro implements the logic "dependency library B is installed from SPKG ==> must install package A from SPKG too".
Note that X->Y <=> ¬Y->¬X (i.e. A from system needs B from system)
comment:106 Changed 7 months ago by
As I said, you are confused.
comment:107 Changed 7 months ago by
No, I wrote the macro SAGE_SPKG_CONFIGURE
, in fact, and it's you who are confused. :-)
If I do
-
build/pkgs/polymake/spkg-configure.m4
a b 1 1 SAGE_SPKG_CONFIGURE([polymake], [ 2 2 dnl Need polymake >= 3.5 for "improve callable library compatibility with threads" 3 3 m4_pushdef([POLYMAKE_VERSION_MIN], [3.5]) 4 SAGE_SPKG_DEPCHECK([perl_mongodb], [ 4 5 AC_CACHE_CHECK([for polymake-config >= ]POLYMAKE_VERSION_MIN, [ac_cv_path_POLYMAKE_CONFIG], [ 5 6 AC_PATH_PROGS_FEATURE_CHECK([POLYMAKE_CONFIG], [polymake-config], [ 6 7 polymake_config_version=$($ac_path_POLYMAKE_CONFIG --version 2>&1) … … SAGE_SPKG_CONFIGURE([polymake], [ 41 42 LDFLAGS="$saved_LDFLAGS" 42 43 AC_LANG_POP([C++]) 43 44 ]) 45 ]) 44 46 m4_popdef([POLYMAKE_VERSION_MIN]) 45 47 ])
then I get
## --------------------------------------------------------- ## ## Checking whether SageMath should install SPKG polymake... ## ## --------------------------------------------------------- ## configure:39701: checking whether any of perl_mongodb is installed as or will be installed as SPKG configure:39706: result: yes; install polymake as well configure:39897: no suitable system package found for SPKG polymake
comment:108 Changed 7 months ago by
Yes, I agree that checking whether any of perl_mongodb is installed as or will be installed as SPKG
message is misleading, but, well...
comment:109 follow-up: ↓ 110 Changed 7 months ago by
But it's late night in Europe, and your change there implements the wrong logic.
comment:110 in reply to: ↑ 109 ; follow-up: ↓ 111 Changed 7 months ago by
Replying to mkoeppe:
But it's late night in Europe, and your change there implements the wrong logic.
it's not yet 1am here, and
it's only wrong if perl_mongodb
is optional for the latest polymake. Note that Gentoo builds polymake just fine, while there is no Perl MongoDB installed (and the result of the build is broken).
comment:111 in reply to: ↑ 110 ; follow-up: ↓ 115 Changed 7 months ago by
perl_mongodb
*is* optional for polymake.
- Whether system
perl_mongodb
is available or not, we can use systempolymake
.
- Even if we add an installation script for
perl_mongodb
, installing it as an SPKG does NOT make it necessary to stop using the system polymake (which is whatSAGE_SPKG_DEPCHECK
implements).
comment:112 in reply to: ↑ 98 Changed 7 months ago by
Replying to dimpase:
Replying to mkoeppe:
Replying to dimpase:
We should check that
polymake
is working, not onlypolymake-config
. (As some Perl deps might be broken [...])I have instead added some initialization steps to the existing run test of the polymake library. Please try if it correctly rejects your broken installation
it does, I get the same error as from
polymake
in terminal.
Good, then spkg-configure.m4
(= the scope of this ticket) does its job correctly.
However, I don't get why you need this extra hack
Not a hack, just a proper runtest for the polymake library.
comment:113 Changed 7 months ago by
I don't know how Loading applications now...
works but I get
Application polytope currently uses following contributed and third-party software packages: 4ti2, bliss, cdd, flint, graphviz, libnormaliz, lrs, permlib, povray, ppl, qhull, singular, sketch, sympol, threejs, tikz, tosimplex For more details: show_credits; polytope >
so I guess I never touch PolyDB.pm somehow (I use dev-perl/MongoDB
for our docker images only)
comment:114 Changed 7 months ago by
I hope this ticket stays not about perl_mongodb
in any way. Somehow it wasn't about perl_mongodb
for Arch Linux users.
comment:115 in reply to: ↑ 111 Changed 7 months ago by
- Status changed from needs_review to positive_review
Replying to mkoeppe:
perl_mongodb
*is* optional for polymake.
- Whether system
perl_mongodb
is available or not, we can use systempolymake
.
except that we can't in some cases, see above.
- Even if we add an installation script for
perl_mongodb
, installing it as an SPKG does NOT make it necessary to stop using the system polymake (which is whatSAGE_SPKG_DEPCHECK
implements).
Hopefully this is not happening on my watch :-)
Anyhow it's good enough now.
comment:116 Changed 7 months ago by
Thanks.
comment:117 Changed 7 months ago by
- Branch changed from u/mkoeppe/spkg_configure_m4_for_polymake to 03f17c9f764eeebb1e1cdaa2004f8ce7fac9022e
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
.homebrew-build-env: Use /usr/local/opt/polymake if it exists
build/pkgs/polymake/spkg-configure.m4: New