Questions tagged [opam]

OPAM is the standard tool to manage OCaml source packages

OPAM is the standard tool to manage (search, install, remove) OCaml source packages. It is being developed by OCamlPro, with funding by Jane Street and the European Union.

OPAM website is:

http://opam.ocamlpro.com/

The website includes both easy to install binaries for Linux, links to the sources on GitHub and a repository of source packages for many OCaml libraries and applications.

292 questions
6
votes
1 answer

Does Ocaml OPAM detect prior installed Ocaml packages?

I recently installed OPAM as per instructions to give it a try and it looks nice and I'd like to use it. However, it fails to detect previously installed OCAML packages that I installed manually before I choose to give OPAM a try. The first thing…
paul
  • 113
  • 4
6
votes
2 answers

Difference between module and package Ocaml

I'm basically trying to follow this stackoverflow answer located in this post: What is the best module for HttpRequest in OCaml and I'm running in to problems. When I am trying to run a single file with just open Lwt ;; I am getting and error…
Lilluda 5
  • 1,111
  • 3
  • 18
  • 38
6
votes
3 answers

OPAM package not running

I've installed OPAM and run the initialization and updated my .bashrc code too. I then installed the ocamlfind package, which went successfully. But when I try #use "topfind";; I get the following Cannot find file topfind I'm running ocaml 4.00.1…
Jatajuuf
  • 301
  • 3
  • 11
5
votes
0 answers

How to add a library dependency in a dune project that manages the .opam file without an intermediate build error?

dune will generate and update a project's .opam file when you run dune build, letting you just manage the project's dependencies in dune-project. However, this seems to require an awkward step when adding a new dependency. The only sequence of…
Jake
  • 2,852
  • 7
  • 32
  • 39
5
votes
0 answers

requiring "core" in utop gives error: Unix.Unix_error (Unix.ENOENT, "sysconf", "")

When I try to call #require "core" in utop, I get an error: 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,…
illabout
  • 3,517
  • 1
  • 18
  • 39
5
votes
1 answer

OCaml: how to solve findlib warnings of multiple `cmi`s

Now I try to write a compiler using ocamlfind and some packages, especially ppx_sexp_conv with opam. Somehow dependencies of ppx_sexp_conv require compiler-libs so the compilation option -I ~/.opam/VERSION/lib/compiler-libs is added when compiling…
nomaddo
  • 416
  • 3
  • 12
5
votes
1 answer

How to make library installed from OPAM available to OCaml?

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…
Alex
  • 1,184
  • 7
  • 15
5
votes
1 answer

ocaml command line cannot not find "topfind"

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…
prosseek
  • 182,215
  • 215
  • 566
  • 871
4
votes
2 answers

opam init fails on docker

I'm trying to install a simple linux environment with opam on docker: $ type .\Dockerfile_Opam.txt FROM ubuntu:22.04 RUN \ apt-get update -y && \ apt-get install opam -y && \ opam init Equivalent commands work fine on…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
4
votes
1 answer

How to change Coq Version in Proof General?

I have some code that only compiles coq code in Coq 8.09.0 . The version that I normally use is the most up-to-date version now which is Coq 8.11.0. I was able to create a new environment using opam switch and installed Coq 8.09.0 there. I…
Notemaster
  • 465
  • 1
  • 3
  • 15
4
votes
1 answer

unbound module in OCaml / dune build

I trying out OCaml for the first time and trying to build a couple files together. When I run: dune build bin/main.exe I am getting: ocamlc bin/.main.eobjs/main.{cmi,cmo,cmt} (exit 2) (cd _build/default && /usr/bin/ocamlc.opt -w…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
4
votes
2 answers

opam install error "no solution found"

I came across a bug when installing certain packages using opam. > opam install foo Sorry, no solution found: there seems to be a problem with your request. No solution found, exiting
L. Soret
  • 169
  • 10
4
votes
1 answer

how to install coq - possible opam issue

I've tried to install coq using the instructions at https://coq.inria.fr/opam/www/using.html (modified as I've been told to update version number) Here is what happens: jeremy@cecs-042179:/mnt/local/coq$ export OPAMROOT=~/opam-coq.8.6 # insta…
4
votes
1 answer

Using coqide, the command `Require Import BigN` worked using coq 8.6 but not in coq 8.7

I used OPAM to install bignum $ opam upgrade bignum Already up-to-date. With coq 8.6 the code Require Import BigN. imported the library but with coq 8.7 I get an error. So I isolate this line of code in a file bignum_problem.v. Then running coqc…
Barry Jay
  • 73
  • 4
4
votes
1 answer

In OCaml, two third party libraries expose same module name. Failure to link

My project is using ctypes library and markup library. When compile, it gives following complain: Error: Files /Users/Young/.opam/4.02.1/lib/markup/markup.cmxa and /Users/Young/.opam/4.02.1/lib/ctypes/ctypes.cmxa both define a module…
Oliver Young
  • 578
  • 1
  • 4
  • 12
1
2
3
19 20