Are there new prereqs for building on a mac?
I just updated, and I’m getting this error:
checking for __dso_handle… yes
configure: WARNING: --enable-bindings=ocaml specified, but ctypes is not installed
configure: WARNING: --enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run
configure: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.
error: making llvm and clang child exited with value 2
– Ryan Brown
We definitely should not be requiring ocaml
Are you using a configure-based build? If so, can you switch over to using cmake and see if you see that same issue? We pretty much don’t maintain the configure build, and it is getting stripped from llvm and clang in the next version of them after 3.8, so we will not be able to support configure-based builds in the near future.
In the event that you still see it, let us know if you have ocaml or opam somewhere on your system. The warnings do seem to indicate that ocaml was specified for one reason or another? Maybe parts of it were sniffed out when trying to configure the build.
Does xcode use configure? I just push command-B.
It does look like I have ocaml installed on my system, but I’m not sure how it go installed or why xcode is trying to use it.
Okay, this might be the llvm/clang build script that Xcode uses as an llvm/clang build step. That’s going to need to be updated if it is using configure (for the reasons I mentioned above).
So it sounds like some part of llvm or clang may be sniffing and finding some part of ocaml, and deciding it should make some bindings for it. I’ll have a look at the script and see if there’s an obvious way to explicitly deny it (the warning seemed like it had a way to disable that binding, so we might just need to work it in).
Of course, if you are not using ocaml, you might want to consider removing/hiding it if you don’t need it.
Interestingly, I did have ocaml on my home system a while back and didn’t have any trouble building, but I probably had ounit2 as well, and likely wouldn’t have noticed if the Xcode-based build-llvm script ended up doing more work when building the embedded llvm/clang during the Xcode build.
I can probably replicate this pretty easily.
Are the Xcode scripts using the llvm configure build? If so they will need to be changed to the CMake build sooner or later, because the configure build is going away in the near future.
“Okay, this might be the llvm/clang build script that Xcode uses as an llvm/clang build step. That’s going to need to be updated if it is using configure (for the reasons I mentioned above).”
Where do I find the script xcode is using?
I talked to Sean Callanan about this. We think the real fix is probably tracking down why llvm/clang are thinking it is okay to assume we want to use the ocaml bindings without actually saying we want to use them. Anything we do on our end looks like it would be a hack to avoid a broken script.
If you just want to work around this temporarily, you can either install the other ocaml bits (I think the message said it was the unit test framework) or uninstall ocaml.
But to answer your question, Xcode uses this Perl script (ancient):