Skip to content
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

fix compiler flags for mingw64 #18

Merged
merged 2 commits into from
Apr 4, 2016
Merged

fix compiler flags for mingw64 #18

merged 2 commits into from
Apr 4, 2016

Conversation

kkirstein
Copy link

mingw64 does not support nanosleep(), so we have to take Sleep() from the win-api (include windows.h via -DWIN32).
Currently the dependencies conf-blas & conf-lapack don't build on my cygwin/mingw64 box, but a fix should be easy...
I did not include setup.ml, configure, etc. in this PR, as on windows oasis setup introduces some backslashes in pathnames, which most probably breaks building on Linux.

@mmottl mmottl merged commit b9f9f9a into mmottl:master Apr 4, 2016
@mmottl
Copy link
Owner

mmottl commented Apr 4, 2016

Thanks for the patch! Just let me know if you have suggestions on how to fix conf-blas/lapack for your platform.

@kkirstein
Copy link
Author

Regarding conf-blas, I am still fighting with opam: I have added a shell script to determine the correct compiler (see here), like it has been done for conf-gmp, but opam does not copy files/test-win.sh to the build directory, I have put it in the same folder as opam, which seems not to be the 'idiomatic' way to to do it. So far, I could not find any hints at the opam documentation, whether files/test-win.sh needs to be registered anywhere...

@mmottl
Copy link
Owner

mmottl commented Apr 5, 2016

I'm not sure exactly either how it is supposed to work, but I have found an example in bsdowl. It contains:

remove: [
  ["sh" "%{build}%/opam/files/remove.sh" prefix]
]

Something like this might be worth trying.

@kkirstein
Copy link
Author

Thanks for the hint, conf-blas & conf-lapack are now "building" successfully on my Windows machine. I am not sure where to send the PR: My repo is cloned from fdopen/opam-repository-mingw, but the original upstream is ocaml/opam-repository ...
BTW, I tried lacaml 8.1.0, but I still have to update setup.ml by calling oasis setup locally. Do you usually commit setup.ml after changing _oasis (if I commit my version of setup.ml the Linux build is probably broken due to Windows filepath backslashes)?

@mmottl
Copy link
Owner

mmottl commented Apr 6, 2016

@kkirstein Not sure, but it's probably easiest to just clone the ocaml/opam-repository, merge your old clone with the new clone and then submit a pull request.

Yes, I always run oasis setup, otherwise the version file would not be created correctly. I don't have problems on either Linux or Mac OS X. I wonder what exactly would make setup.ml behave incorrectly on your platform. I wouldn't want to force Oasis as a Lacaml dependency. In fact, I can't even use the "normal" Oasis output right now due to a problem with the generated myocamlbuild.ml file.

@kkirstein
Copy link
Author

@mmottl It looks like your last commit (d2202f3) contains the correct C-compiler flags for cygwin/mingw64 in setup.ml, so it should work for 8.1.1 (no urgent to release that, as I have a working installation now).
Thanks for your support!

@mmottl
Copy link
Owner

mmottl commented Apr 7, 2016

Oh, I see, I thought you had already tried the very latest release. 8.1.1 addressed your particular problem. Glad to know it works on your platform now. It's already released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants