Open fniksic opened 10 years ago
syntax error
bash$ diff SolverTypes.h
~/Downloads/glucose-3.0/core/SolverTypes.h
58c58
< // friend Lit mkLit(Var var, bool sign = false);
---
> friend Lit mkLit(Var var, bool sign = false);
66c66
< inline Lit mkLit (Var var, bool sign = false) { Lit p; p.x =
var + var + (int)sign; return p; }
---
> inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }
link error Edit the file utils/System.cc to include the stub for memUsedPeak, patched code will look like this:
#elif defined(__APPLE__)
#include
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
I just ran into this same issue. Is there any update on what I should do (just apply zhzdeng's patch?)
The fastest solution is probably to clone one of the forks in which this issue (and a few others) has been fixed. agurfinkel/minisat should work, for example.
This commit off of agurfinkel/minisat resolves OSX linking issues I faced.
https://github.com/MontyThibault/minisat/commit/7184c66f93c742f2377ab1c0ec12dd1ec0f2ed3d
The fastest solution is probably to clone one of the forks in which this issue (and a few others) has been fixed. agurfinkel/minisat should work, for example.
Think that worked for me too. Thanks!
When building minisat on OS X, with clang-503.0.40, the compilation breaks with the following error:
The issue seems to be with the friend declaration of mkLit within the structure Lit, which specifies a default value. According to ISO C++11 standard, such a declaration is illegal:
"If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit.”
An obvious fix is to remove the declaration, as there is no real reason for mkLit to be declared as friend. The default value should instead be specified in the definition of mkLit.