Skip to content

Commit c02edcb

Browse files
author
Release Manager
committed
Trac #25374: Upgrade cryptominisat to 5.8.0, fix build on Cygwin
This is to upgrade to !CryptoMiniSat 5.8.0, released 2020-07-06. Tarball at: https://github.com/msoos/cryptominisat/archive/refs/tags/5.8.0.tar.gz Release notes for the versions since 5.6.8 (current in Sage): > > == 5.8.0 == > > Massive new release! Many-many improvements: > > - Gauss-Jordan elimination is enabled by default > - Target Phases ("Stable Polarities") are used > - CCAnr SLS solver is enabled and is set to work by default > - Hybrid variable branching heuristics > - Many-many speed improvements > - Better DIMACS parsing to work for other systems > - Made to work with new ApproxMC and !UniGen > > == 5.7.1 == > > - Removing LSIDS, as it was interfering with performance. > > == 5.7.0 == > > - Improved parameters > - Hybrid branching strategies > - and much more Previous upgrade: - #27319: Upgrade to Cryptominisat 5.6.8 -- merged in Sage 8.9.beta2 URL: https://trac.sagemath.org/25374 Reported by: embray Ticket author(s): Erik Bray, Thierry Monteil, François Bissey, Matthias Koeppe Reviewer(s): Travis Scrimshaw, Julian Rüth, Matthias Koeppe
2 parents e22b33a + 69033db commit c02edcb

9 files changed

+92
-10
lines changed
+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tarball=cryptominisat-VERSION.tar.gz
2-
sha1=db418f5ac124e8d4e1f5284f05bccbe5b61afed9
3-
md5=ca1bf853e568c19968daa5464ab86843
4-
cksum=4204324235
2+
sha1=f79dfa1ffc6c9c75b3a33f76d3a89a3df2b3f4c2
3+
md5=05bdde77aa78c983849437e93b39bd6a
4+
cksum=462131608
5+
upstream_url=https://github.com/msoos/cryptominisat/archive/refs/tags/VERSION.tar.gz
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.6.8
1+
5.8.0
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From a01179ffd6b0dd47bfdef2d9350d80b575571f24 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Maciej=20Bar=C4=87?= <[email protected]>
3+
Date: Sun, 3 Apr 2022 20:02:59 +0200
4+
Subject: [PATCH] python/setup.py.in: import sysconfig instead of importing it
5+
from distutils
6+
MIME-Version: 1.0
7+
Content-Type: text/plain; charset=UTF-8
8+
Content-Transfer-Encoding: 8bit
9+
10+
setuptools 61 dropped sysconfig module
11+
12+
Ref: https://github.com/stamparm/pcapy-ng/commit/f6ce5248f78ac0a247d76e48cff152f4e3f26482
13+
Bug: https://bugs.gentoo.org/836684
14+
15+
Signed-off-by: Maciej Barć <[email protected]>
16+
---
17+
python/setup.py.in | 6 +++---
18+
1 file changed, 3 insertions(+), 3 deletions(-)
19+
20+
diff --git a/python/setup.py.in b/python/setup.py.in
21+
index b3ab64af4..293eb1f80 100644
22+
--- a/python/setup.py.in
23+
+++ b/python/setup.py.in
24+
@@ -27,7 +27,7 @@ import sys
25+
import os
26+
import platform
27+
from distutils.core import setup, Extension
28+
-from distutils import sysconfig
29+
+import sysconfig
30+
from distutils.cmd import Command
31+
32+
__PACKAGE_VERSION__ = "0.2.0"
33+
@@ -59,8 +59,8 @@ def _init_posix(init):
34+
Forces g++ instead of gcc on most systems
35+
credits to eric jones ([email protected]) (found at Google Groups)
36+
"""
37+
- def wrapper():
38+
- init()
39+
+ def wrapper(vars):
40+
+ init(vars)
41+
42+
config_vars = sysconfig.get_config_vars() # by reference
43+
if config_vars["MACHDEP"].startswith("sun"):
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
2+
index f549ca7..4a9f0d8 100644
3+
--- a/python/CMakeLists.txt
4+
+++ b/python/CMakeLists.txt
5+
@@ -25,19 +25,6 @@ import sysconfig;
6+
print(sysconfig.get_config_var('CFLAGS'), end = '')"
7+
OUTPUT_VARIABLE PY_C_CONFIG)
8+
9+
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
10+
-from __future__ import print_function;
11+
-import sysconfig;
12+
-print(sysconfig.get_config_var('SHLIBS'), end = '')"
13+
- OUTPUT_VARIABLE PY_LD_CONFIG)
14+
-
15+
-
16+
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "
17+
-from __future__ import print_function;
18+
-import sysconfig;
19+
-print(sysconfig.get_config_var('LINKFORSHARED'), end = '')"
20+
- OUTPUT_VARIABLE PY_LINKFORSHARED_CONFIG)
21+
-
22+
if(DEFINED ENV{PYCRYPTOSAT_INSTALL_PATH})
23+
set(PY_INSTALL_PREFIX "--prefix=$ENV{PYCRYPTOSAT_INSTALL_PATH}")
24+
elseif(DEFINED ENV{VIRTUAL_ENV})
25+
@@ -47,12 +34,8 @@ else()
26+
endif()
27+
28+
string(REPLACE "\n" " " PY_C_CONFIG ${PY_C_CONFIG})
29+
-string(REPLACE "\n" " " PY_LD_CONFIG ${PY_LD_CONFIG})
30+
-string(REPLACE "\n" " " PY_LINKFORSHARED_CONFIG ${PY_LINKFORSHARED_CONFIG})
31+
32+
message(STATUS "Python CFLAGS: '${PY_C_CONFIG}'")
33+
-message(STATUS "Python LDFLAGS: '${PY_LD_CONFIG}'")
34+
-message(STATUS "Python LINKFORSHARED flags: '${PY_LINKFORSHARED_CONFIG}'")
35+
message(STATUS "Python module installation prefix: ${PY_INSTALL_PREFIX}")
36+
37+
set(PY_LD_CONFIG "${PY_LD_CONFIG} ${PY_LINKFORSHARED_CONFIG}")
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cd src
22

3-
sdh_cmake -DUSE_GAUSS='ON' $EXTRA_OPTS
3+
sdh_cmake -DUSE_GAUSS='ON' -DENABLE_PYTHON_INTERFACE=OFF $EXTRA_OPTS
44
sdh_make VERBOSE=ON
55
sdh_make_install VERBOSE=ON

build/pkgs/pycryptosat/package-version.txt

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../cryptominisat/package-version.txt

build/pkgs/pycryptosat/patches

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../cryptominisat/patches

build/pkgs/pycryptosat/spkg-install.in

+2
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ sdh_cmake -DUSE_GAUSS='ON' $EXTRA_OPTS
44

55
cd pycryptosat
66

7+
export CFLAGS="$CFLAGS -std=gnu++11"
8+
79
sdh_pip_install .

src/sage/sat/boolean_polynomials.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ def solve(F, converter=None, solver=None, n=1, target_variables=None, **kwds):
8888
8989
This time we pass a few options through to the converter and the solver::
9090
91-
sage: s = solve_sat(F, s_verbosity=1, c_max_vars_sparse=4, c_cutting_number=8) # optional - pycryptosat
92-
c ...
93-
...
94-
sage: F.subs(s[0]) # optional - pycryptosat
91+
sage: s = solve_sat(F, c_max_vars_sparse=4, c_cutting_number=8) # optional - pycryptosat
92+
sage: F.subs(s[0]) # optional - pycryptosat
9593
Polynomial Sequence with 36 Polynomials in 0 Variables
9694
9795
We construct a very simple system with three solutions and ask for a specific number of solutions::

0 commit comments

Comments
 (0)