You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/gerd/biz/figly/protoquery/wasicaml/bin/ocamlfind ocamlmklib
ocamlfind: Package `threads' not found
This is due to a bug in findlib: frontend.ml, line 923, change this to:
let type_of_threads =
try package_property [] "threads" "type_of_threads"
with No_such_package _ -> "ignore"
wasicaml doesn't support Unix.spawn, but you can use Sys.command. Alternate run_command implementation:
let run_command ?filter verbose cmd args =
let printable_cmd =
cmd ^ " " ^ String.concat " " (List.map escape_if_needed args) in
( match verbose with
| Normal ->
()
| Verbose ->
print_endline ("+ " ^ printable_cmd);
if filter <> None then
print_string
(" (output of this command is filtered by ocamlfind)\n")
| Only_show ->
print_endline printable_cmd
);
flush stdout;
if verbose <> Only_show then (
let temp_file_opt =
match filter with
| None -> None
| Some _ ->
Some(Filename.temp_file "ocamlfind" ".out") in
let cmd1 =
match temp_file_opt with
| None -> cmd
| Some f -> cmd ^ " > " ^ Filename.quote f in
let code =
Sys.command cmd1 in
if code <> 0 then (
if verbose = Verbose then
print_string (cmd ^ " returned with exit code " ^ string_of_int code ^ "\n");
exit code
);
( match filter, temp_file_opt with
| Some filter_fun, Some temp_file ->
let ch = open_in temp_file in
( try
while true do
let line = input_line ch in
match filter_fun line with
None -> () (* Suppress line *)
| Some line' -> print_endline line'
done;
assert false
with
End_of_file ->
close_in ch;
flush stdout
)
| _ -> ()
)
)
;;
The text was updated successfully, but these errors were encountered:
three problems:
This is due to a bug in findlib: frontend.ml, line 923, change this to:
Unix.spawn
, but you can useSys.command
. Alternaterun_command
implementation:The text was updated successfully, but these errors were encountered: