sambayless / monosat

MonoSAT - An SMT solver for Monotonic Theories
MIT License
106 stars 29 forks source link

`__local_t` has not been declared #17

Closed seanmcl closed 6 years ago

seanmcl commented 6 years ago

I just tried to compile master, and get the following errors on GCC 4.9

(... compiling Monosat.cpp ...)
In file included from .../gcc-4.9.4/include/c++/4.9.4/ctime:42:0,
                 from ... src/monosat/utils/System.h:50,
                 from ...src/monosat/graph/GraphTheory.h:25,
                 from ...src/monosat/graph/AllPairsDetector.cpp:22:
/usr/include/time.h:226:5: error: ‘__locale_t’ has not been declared
     __locale_t __loc) __THROW;
     ^
sambayless commented 6 years ago

Hmm, that is odd - none of the travis builds are failing. I'm looking into it; but in the mean time, whats the OS or distribution that this is failing on?

sambayless commented 6 years ago

I haven't reproduced this locally yet, but it might be fixable by compiling with -D_GNU_SOURCE (which will enable some GCC extensions, hopefully including whatever is needed to define __locale_t).

Could you try recompiling after running cmake with $cmake -DCMAKE_CXX_FLAGS="-D_GNU_SOURCE" . This should pass the -D_GNU_SOURCE option to GCC, which might resolve the problem.

seanmcl commented 6 years ago

This was an artifact of a broken environment. Sorry for the spam. Thanks for the quick reply Sam!