Closed lamestllama closed 9 years ago
I found out the problem with memUsedPeak() was that somebody had forgotten to implement one small part in system.cc for osx so I have included that now.
Hey! Thanks a ton! Yes, the printf issues I knew about; but I've never tried building on Mac, so I am impressed you got it to work at all.
Did you use the clang makefiles (not mentioned in the readme), or did you modify the GCC ones? On Jul 30, 2015 9:18 PM, "Eric Parsonage" notifications@github.com wrote:
Hi
I built this on OSX Yosemite with clang and got lots of warnings and a couple of small errors.
The warnings where pretty much all printf format errors using %d instead of %ld where a long was used.
The errors where a missing header file and a couple of conditional compilations around memUsedPeak() which doesnt exist on osx so the print stats methods in the solver will print 0 on OSX but work as before elsewhere.
There are now still 7 warnings but I have not yet decided the best way to solve them. They are hidden virtual function warnings.
Regards
Eric
You can view, comment on, or merge this pull request online at:
https://github.com/sambayless/monosat/pull/1 Commit Summary
dynamic library builds on OSX with clang included
included in one file and fixed many warning for incorrect printf formats also put a guard around memUsed function in the solvers print stats method because apple doesnt make such a function available
File Changes
- M api/Monosat.cpp https://github.com/sambayless/monosat/pull/1/files#diff-0 (8)
- M bv/BVTheorySolver.h https://github.com/sambayless/monosat/pull/1/files#diff-1 (32)
- M core/Solver.cc https://github.com/sambayless/monosat/pull/1/files#diff-2 (4)
- M core/Solver.h https://github.com/sambayless/monosat/pull/1/files#diff-3 (19)
- M dgl/alg/LinkCutCost.h https://github.com/sambayless/monosat/pull/1/files#diff-4 (1)
- M fsm/FSMAcceptDetector.h https://github.com/sambayless/monosat/pull/1/files#diff-5 (2)
- M fsm/FSMGeneratesDetector.h https://github.com/sambayless/monosat/pull/1/files#diff-6 (2)
- M fsm/FSMGeneratorAcceptorDetector.cpp https://github.com/sambayless/monosat/pull/1/files#diff-7 (2)
- M fsm/FSMTransducesDetector.h https://github.com/sambayless/monosat/pull/1/files#diff-8 (2)
- M fsm/P0LAcceptDetector.h https://github.com/sambayless/monosat/pull/1/files#diff-9 (2)
- M graph/Detector.h https://github.com/sambayless/monosat/pull/1/files#diff-10 (2)
- M graph/GraphTheory.h https://github.com/sambayless/monosat/pull/1/files#diff-11 (2)
Patch Links:
- https://github.com/sambayless/monosat/pull/1.patch
- https://github.com/sambayless/monosat/pull/1.diff
— Reply to this email directly or view it on GitHub https://github.com/sambayless/monosat/pull/1.
I used both:
The only warnings that the Clang makefiles produce are about a bunch of hidden overloaded virtual functions like 'Monosat::Solver::solve' which are declared with a different number of parameters.
I did not modify the GCC ones but they still build but for every file I get the same three warnings:
clang: warning: argument unused during compilation: '-static-libgcc' clang: warning: argument unused during compilation: '-static-libstdc++' warning: unknown warning option '-Wno-unused-but-set-variable'
and then the same warnings as the Clang files give.
I will probably work out how to fix the code to get rid of the warnings about overloaded hidden functions next.
Hi
I built this on OSX Yosemite with clang and got lots of warnings and a couple of small errors.
The warnings where pretty much all printf format errors using %d instead of %ld where a long was used.
The errors where a missing header file and a couple of conditional compilations around memUsedPeak() which doesnt exist on osx so the print stats methods in the solver will print 0 on OSX but work as before elsewhere.
There are now still 7 warnings but I have not yet decided the best way to solve them. They are hidden virtual function warnings.
Regards
Eric