When I try to call #require "core" in utop , I get an error message:
utop # #require "core";; Exception: Unix.Unix_error (Unix.ENOENT, "sysconf", ""). Raised by primitive operation at unknown location Called from file "toplevel/topdirs.ml", line 144, characters 10-51
I have a .ocamlinit file that looks like this in my current directory:
(* Added by OPAM. *) let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> () ;; #use "topfind";; #thread;; #camlp4o;;
What could be causing this error? Seems to be a bug from Findlib?
I tried to erase the ~/.opam , restart opam init , opam switch set 4.05.0 and reinstall core and utop , but this error persists. Is it possible that I also need to reinstall opam myself? I am currently using the binary version of opam-1.2.2.
I am running Arch Linux, and I believe that this error occurred after updating all the packages on my system, but I'm not sure.
I can still use jbuilder to build executables, but when they run executables they fail with a similar error:
$ _build/install/default/bin/my_executable Uncaught exception: (Unix.Unix_error "Illegal seek" sysconf "") Raised by primitive operation at unknown location
I am sure that this is not an exception thrown by my code, but similar to an error occurring in utop .
I have a jbuild file that looks like this:
(jbuild_version 1) (executable ((name main) (libraries (my_library)))) (install ((section bin) (files ((main.exe as my_executable)))))
edit: I tried to use different versions of opam and the compiler, including the system compiler (which is also version 4.05.0). Nothing is working. Each combination produces the same errors as above.