-
Notifications
You must be signed in to change notification settings - Fork 4
Enable mingw and macos build #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I updated to this version as it fixes the compilation on Mac OS.
Fixes bugs in compilation for non-linux hosts
|
This is very impressive. Thanks for the hard work. I have to test the changes, obviously, but this looks very nice. You must obviously add yourself to the list of maintainers and/or authors ;-) |
a6fbfcf to
ed58b47
Compare
|
Thanks! This is rewarding to have such nice feedback on PRs 😊 By the way, I also propose to add travis (linux, mac) and appveyor (if you wish!). Note: I am still working on some commits (like the |
|
I'll be informed by github notifications ;-) |
933d3c5 to
fe2d068
Compare
…d -lpicosat This commit intends to fix the warning ld: warning: directory not found for option '-L../libs/quantor/' This warning is due to the fact that you must pass -L../libs/quantor/ in CCLib: field so that oasis can pass it to ocamlc and ocamlmklib. The thing is that ocamlmklib actually remembers these options so that the user of the stub library doesn't have to pass the -l and -L flags. There is no (to my knowledge) way to avoid that and give specific CFLAGS for build and for the CFLAGS that ocamlmklib will embed. My workaround: - In oasis, I pass the flag `-L. -lpicosat` - I copy libpicosat.a and libquantor.a to _build to that the -L. will work at build time - Even though -L. is embedded by ocamlmklib into qbf.cma (or wherever this information is stored), the -L. won't trigger a warning.
Note that I had to move the quantor and depqbf tests into two separate folders because of _tags clashes. You can run 'make test' now compiling and running the tests.
Notes: - on mingw, -fPIC is ignored because all objects are created with position independent code. So this does not affect the windows build. - on macos, -fPIC is also ignored because in order to compile a position independent code, the (clang) argument is -fno-common -DPIC. But it seems to be working fine on macos without these flags. I also modified the makefile so that quantor and picosat are not rebuilt on every 'make'.
In _oasis, mkdir -p wasn't working. I just moved it to Makefile
In quantor's ./configure, the printf(".....\n") were printing ^M
characters (yeah, windows native exec is printing CRLF characters).
I just had to remove the ending \n as they were not absolutely needed.
Note: the links will have to be changed when PR is accepted.
|
Excellent! 👍 Now, what do you think about distributing it though opam? I can open a PR on opam-repository if you want (their continuous integration tests may fail on ocaml-qbf, I guess some work will still be required to pass them on all architectures) You can also try to enable travis-ci and appveyor (but this is way less important 😃). |
|
Oh, it's not on opam yet? my bad. Thanks for your work :-) |
|
Feel free to do the opam query (e.g. with opam-publish)! |
|
Ok! Just submitted the PR. I just had to fix the opam's descr before and create the tag 0.2 |
|
Oh! I just noticed that the |
|
You can modify stuff and re-run opam-publish :-) |
|
Done! Now the dev-repo is ok!
Thanks!
|
|
The package Maël |
|
Thanks to you! |

Hello,
I had to hack your excellent project to adapt it for win32+mingw and macos builds. In this PR, I propose
make test(I used oUnit2 to ease the testing)ld: -Lwarningfix the ocamlbuild tags warningsmy fix breaks the build for older versions of ocaml*gccorgcc*. I simply modified to*gcc*so thatx86_64-w64-mingw32-gcc.exeworks.sizeof(long long long) == sizeof(void*)). I also did a related small fix in ./configure (removed all\nfrom printf to avoid windows CRLF problems)Like for the ocaml-minisat project where we discussed about simply naming the opam package
minisat, I also propose to name the opam packageqbf; but I can still go back toocaml-qbf, no problem!I also bumped to version 0.2 (I can discard that; as you wish)