Skip to content

Instantly share code, notes, and snippets.

@maelvls
Created March 15, 2015 13:26
Show Gist options
  • Save maelvls/97bb79a15d3eb5587379 to your computer and use it in GitHub Desktop.
Save maelvls/97bb79a15d3eb5587379 to your computer and use it in GitHub Desktop.
How I installed win32-ocaml with x8on mac os 10.9

I installed the i686-w64-mingw32 and x86_64-w64-mingw32 versions of gcc. This was the hardest thing to do because of many errors. I used this script: https://gist.github.com/Drakulix/9881160

Then, I did opam install win32-ocaml. It was returning the famous clang: error: unknown argument: '-fno-defer-pop' error. I saw that the log.out showed that the -cc gcc -m32 option was used. So I chose to select another gcc (gcc-4.9 that I had previously installed) to avoid the clang issue.

So I went into ~/.opam/4.01.0+clang-fix/build/win32-ocaml.4.01.0 and I fixed the ./configure call:

./configure -prefix /Users/maelv/.opam/4.01.0+clang-fix/i686-w64-mingw32 -bindir /Users/maelv/.opam/4.01.0+clang-fix/i686-w64-mingw32/bin         -mandir /Users/maelv/.opam/4.01.0+clang-fix/build/win32-ocaml.4.01.0/no-man -cc "gcc-4.9 -m32" -as "gcc -m32" -aspp "gcc-4.9 -m32 -c" -no-pthread -no-camlp4

And make and that's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment