-
Notifications
You must be signed in to change notification settings - Fork 19
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
Can't install on OS X with latest release #22
Comments
(For the record, I am not able to reproduce the problem on an old 10.11.x macOS.) |
It look like it is trying to find the program |
@xclerc I'm running on a fully up-to-date mac, FWIW. @rgrinberg, should I just wait for that feature to land, and then try again? |
re2 may need to be adapted. Running in verbose mode and uploading the log here would help. |
(Another data point: unable to reproduce on a 10.13.x macOS, with the latest Xcode 9.{0,2}.x) |
@Chris00 while your explanation is more than plausible, when grepping the |
@xclerc I agree — quickly looking at the sources of jbuilder, this seems to be the only place. However, |
Indeed, and it just adds to my confusion... |
Urk. Infuriating. I did an opam update, and now the problem is gone. So I don't know what happened, but I might as well close this one. |
I have the exact same issue on a fully up-to-date mac, when calling
diff --git a/src/context.ml b/src/context.ml
index bc0383f..6cbf3a8 100644
--- a/src/context.ml
+++ b/src/context.ml
@@ -287,25 +287,26 @@ let create ~(kind : Kind.t) ~path ~base_env ~env_extra ~name ~merlin ~use_findli
else
env,env_extra
in
+ let split_prog s =
+ let len = String.length s in
+ let rec loop i =
+ if i = len then
+ (s, "")
+ else
+ match s.[i] with
+ | ' ' | '\t' ->
+ (String.sub s ~pos:0 ~len:i,
+ String.sub s ~pos:i ~len:(len - i))
+ | _ -> loop (i + 1)
+ in
+ loop 0
+ in
let c_compiler, ocamlc_cflags, ocamlopt_cflags =
match get_opt "c_compiler" with
| Some c_compiler -> (* >= 4.06 *)
+ let c_compiler, _ = split_prog c_compiler in
(c_compiler, get "ocamlc_cflags", get "ocamlopt_cflags")
| None ->
- let split_prog s =
- let len = String.length s in
- let rec loop i =
- if i = len then
- (s, "")
- else
- match s.[i] with
- | ' ' | '\t' ->
- (String.sub s ~pos:0 ~len:i,
- String.sub s ~pos:i ~len:(len - i))
- | _ -> loop (i + 1)
- in
- loop 0
- in
let c_compiler, ocamlc_cflags = split_prog (get "bytecomp_c_compiler") in
let _, ocamlopt_cflags = split_prog (get "native_c_compiler") in
(c_compiler, ocamlc_cflags, ocamlopt_cflags) |
This has reemerged for me now that I'm trying out 4.06 again. Rudi asked me for more debugging information, so here it is:
Given that this is apparently a jbuilder issue, I'll mint one, pointing to this issue. |
See: ocaml/dune#392 |
Same problem, also MacOS. Builds with OCaml 4.05, fails to build with OCaml 4.06. |
should be fixed in jbuilder#master. |
Yes, indeed. Thanks. |
It's not obvious to me what the issue is here, but here's the error I get from opam. Does that mean that it can't find the C compiler? I'm a little confused.
The text was updated successfully, but these errors were encountered: