Michael Tautschnig
unread,Aug 26, 2010, 3:40:47 AM8/26/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MiniSat
Hi all,
As maintainer of the Debian package I noticed build failures on some
architectures running a Linux kernel - the necessary patch is attached
as
debian.patch.
Furthermore, MiniSat 2.2.0 fails to link on OS X as memUsedPeak is not
defined
(not even the stub used for other systems). Hence the proposed patch
osx.patch.
Hope this helps,
Michael
PS.: Inlining the patches as otherwise the message doesn't seem to
make it to the
list.
================== <osx.patch>
==============================================
--- a/minisat-2.2.0/utils/System.cc
+++ b/minisat-2.2.0/utils/System.cc
@@ -88,6 +88,7 @@ double Minisat::memUsed(void) {
malloc_statistics_t t;
malloc_zone_statistics(NULL, &t);
return (double)t.max_size_in_use / (1024*1024); }
+double Minisat::memUsedPeak(void) { return memUsed(); }
#else
double Minisat::memUsed() {
================== </osx.patch>
=============================================
================== <debian.patch>
==============================================
--- minisat2-2.2.0.orig/simp/Main.cc
+++ minisat2-2.2.0/simp/Main.cc
@@ -74,7 +74,7 @@ int main(int argc, char** argv)
setUsageHelp("USAGE: %s [options] <input-file> <result-output-
file>\n\n where input may be either in plain or gzipped DIMACS.\n");
// printf("This is MiniSat 2.0 beta\n");
-#if defined(__linux__)
+#if defined(__linux__) && defined(_FPU_EXTENDED) &&
defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
fpu_control_t oldcw, newcw;
_FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) |
_FPU_DOUBLE; _FPU_SETCW(newcw);
printf("WARNING: for repeatability, setting FPU to use double
precision\n");
--- minisat2-2.2.0.orig/core/Main.cc
+++ minisat2-2.2.0/core/Main.cc
@@ -74,7 +74,7 @@ int main(int argc, char** argv)
setUsageHelp("USAGE: %s [options] <input-file> <result-output-
file>\n\n where input may be either in plain or gzipped DIMACS.\n");
// printf("This is MiniSat 2.0 beta\n");
-#if defined(__linux__)
+#if defined(__linux__) && defined(_FPU_EXTENDED) &&
defined(_FPU_DOUBLE) && defined(_FPU_GETCW)
fpu_control_t oldcw, newcw;
_FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) |
_FPU_DOUBLE; _FPU_SETCW(newcw);
printf("WARNING: for repeatability, setting FPU to use double
precision\n");
--- minisat2-2.2.0.orig/utils/System.cc
+++ minisat2-2.2.0/utils/System.cc
@@ -72,7 +72,7 @@ double Minisat::memUsedPeak() {
double peak = memReadPeak() / 1024;
return peak == 0 ? memUsed() : peak; }
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__gnu_hurd__)
double Minisat::memUsed(void) {
struct rusage ru;
================== </debian.patch>
=============================================