opam

Ocaml and Opam: unbound module Core

蓝咒 提交于 2019-12-18 10:15:27
问题 I'm trying to get an ocaml environment set up, and I've followed the instructions from appendix A of the Real World Ocaml beta. I set up opam, and installed a version of ocaml with the command $ opam switch 4.01.0dev+trunk which passed fine. I then did an $ eval `opam config env` to pull in the changes. I'm running the correct top level, as $ which ocaml outputs /home/bryan/.opam/4.01.0dev+trunk/bin/ocaml I installed the Core package from Jane street, with the command $ opam install core Both

OCaml: Unbound module Core with ~/.ocamlinit setup

拟墨画扇 提交于 2019-12-12 01:55:15
问题 I have installed a few packages using opam, such as Core and Batteries. The ocamlinit file is as follows: (* Added by OPAM. *) #use "topfind" #thread #camlp4o #require "core.top" #require "core.syntax" #require "batteries" let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> () ;; When I run this with utop I can see the modules for Batteries but I cannot see any of the modules for Core. When I try to do open Core or open Core.Std I get an unbound module

ocaml command line cannot not find “topfind”

穿精又带淫゛_ 提交于 2019-12-10 14:22:18
问题 I have top-level installed, and have $OCAML_TOPLEVEL_PATH setup. export OCAML_TOPLEVEL_PATH=/Users/smcho/.opam/system/lib/toplevel I checked that the directory exists, and has one file topfind . This is my ~/.ocamlinit file content. #use "topfind" #camlp4o #thread #require "core.top" #require "core.syntax" The issue is that I have the error message saying it can't find topfind. > ocaml OCaml version 4.02.1 Cannot find file topfind. Unknown directive `camlp4o'. # With "ustop", I have no error

Basic Oasis or Opam file for a simple OCaml project

一笑奈何 提交于 2019-12-10 13:08:46
问题 I am a new OCaml user. I have asked a question to learn how to set up a basic OCaml project, but I still have issues. Jump to the end for a TL;DR For instance, I am trying to learn Irmin. On the home page of Irmin I see I have to do opam install irmin git cohttp Doing so, I end up with Irmin version 0.8.3. Unfortunately, I cannot follow their examples, because apparently Irmin is at version 0.9.4, and it looks like the API has changed. So, I would like to start a clean project having as

How to make library installed from OPAM available to OCaml?

与世无争的帅哥 提交于 2019-12-10 09:39:12
问题 I followed this tutorial on OCaml FFI and installed Ctypes through OPAM: opam install ctypes However, OCaml does not find the module: open Ctypes (* ... *) I receive the error: Unbound module Ctypes It looks like I need to let OCaml know where my Ctypes installation is? Do I need to update some path variable to let OCaml look for my libraries installed through OPAM? This is Ubuntu 15.04, OCaml 4.01.0, OPAM 1.2.0. 回答1: Installing something on your system doesn't make it automatically visible

Using Opam to manage project dependencies

左心房为你撑大大i 提交于 2019-12-09 04:20:19
问题 I am a complete newbie to OCaml. Other languages I have used (for instance Scala, Clojure, Javascript on Node.js) have package managers that allow one to start a project as a clean slate that has a declared set of dependencies of known versions. I am trying to do something of the sort with Opam. Ideally, I would like to have a file that lists dependencies (and possibly OCaml version) so that a collaborator can start a project with git clone myproject <magic opam command> ocamlbuild and have a

not able to install anything using opam

孤人 提交于 2019-12-08 13:07:38
I installed opam with homebrew on Mac OS X 10.10. But I can't install anything using opam. This is an example error output that get when I try to install ocamlfind: # opam-version 1.2.0 # os darwin # command ./configure -bindir /Users/roger/.opam/system/bin -sitelib /Users/roger/.opam/system/lib -mandir /Users/roger/.opam/system/man -config /Users/roger/.opam/system/lib/findlib.conf -no-topfind # path /Users/roger/.opam/system/build/ocamlfind.1.5.5 # compiler system (4.02.1) # exit-code 1 # env-file /Users/roger/.opam/system/build/ocamlfind.1.5.5/ocamlfind-91360-c61e7b.env # stdout-file /Users

not able to install anything using opam

时光怂恿深爱的人放手 提交于 2019-12-08 03:54:47
问题 I installed opam with homebrew on Mac OS X 10.10. But I can't install anything using opam. This is an example error output that get when I try to install ocamlfind: # opam-version 1.2.0 # os darwin # command ./configure -bindir /Users/roger/.opam/system/bin -sitelib /Users/roger/.opam/system/lib -mandir /Users/roger/.opam/system/man -config /Users/roger/.opam/system/lib/findlib.conf -no-topfind # path /Users/roger/.opam/system/build/ocamlfind.1.5.5 # compiler system (4.02.1) # exit-code 1 #

camlzip: “This package relies on external (system) dependencies that may be missing.”

久未见 提交于 2019-12-08 02:01:58
问题 I'm trying to install camlzip (an OCaml package housed in opam), but when I run opam install camlzip I get this: The following actions will be performed: ∗ install camlzip 1.05 =-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [camlzip] Archive in cache =-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [ERROR] The compilation of camlzip failed at "make all". Processing 1/1: [camlzip: ocamlfind remove] #=== ERROR while installing

opam upgrade wants to downgrade a bunch of packages

試著忘記壹切 提交于 2019-12-07 16:40:49
问题 I just tried an 'opam upgrade' and got (the final summary): 1 to install | 59 to reinstall | 3 to upgrade | 34 to downgrade | 0 to remove Do you want to continue ? [Y/n] Downgrading 34 packages makes me nervous. Why would it want to do this? Some examples of packages it wanted to downgrade: downgrade llvm.3.2 to 3.1 downgrade ocamlfind.1.4.0 to 1.3.3 [required by bitstring, camltc, ezjsonm, fat-filesystem, google-drive-ocamlfuse, merlin, mirage-block-xen, mirage-console-xen, mirari, utop]