Questions tagged [ocaml-dune]

Use for questions relating to dune, previously jbuilder, a build system for [ocaml] and [reason]

Dune is a build system for and .

Resources

96 questions
0
votes
1 answer

Why is there this dune build error? 'cannot find -lz'

I am trying to build a project with this dune file: src/lib/precomputed_values/gen_values/dune: (executable (name gen_values) (flags -w -32) (libraries ;; opam libraries stdio async_kernel compiler-libs core_kernel ppxlib …
0
votes
1 answer

OUnit2 Unbound Module

I am writing my first Ocaml+OUnit2+Dune project. but in my unit test when I say open Mymaps it says "Unbound module Mymaps" The structure of my project is as follows mymaps | |-> lib |-> dune |-> mymaps.mli |-> mymaps.ml …
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373
0
votes
1 answer

Dune not able to compile my first project

I followed the following steps to create my project Create the project using the following dune command dune init proj --kind=lib mymaps Then added 2 files under the "lib" directory mymaps.mli type ('k, 'v) t val empty : ('k, 'v) t val insert :…
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373
0
votes
1 answer

Building "hello world" with ocaml dune

Following the tutorial at https://dune.readthedocs.io/en/stable/quick-start.html, I created a file hello_world.ml containing print_endline "Hello, world!" and a file dune containing (executable (name hello_world)) and then typed dune build…
user0
  • 185
  • 11
0
votes
0 answers

Freezing dependencies

What are the available solutions/practice to reduce the moving pieces and select some precise set of dependencies which were vetted somehow (nix style hash, freeze file, switch signature, etc..) ? Context : I checked out Base, and dune build it. I…
nicolas
  • 9,549
  • 3
  • 39
  • 83
0
votes
1 answer

Installing OCaml bindings for LLVM

I built LLVM13 rc4 with OCaml bindings. After running ninja install, I see the bindings is now installed in $HOME/.opam/4.12.0/lib/ocaml. However, I run dune build and it looks like the system does not realize the bindings is installed. How do I add…
hackinghorn
  • 133
  • 6
0
votes
1 answer

Graphics Installation in Opam

I am trying to install graphics using opam install graphics, but I get the following error message: $ opam install graphics The following actions will be performed: ∗ install graphics 5.1.1 ↻ recompile ocamlfind 1.9.1 [uses graphics] …
travisz
  • 69
  • 1
  • 6
0
votes
1 answer

Why is dune using ocamlc when I asked to use ocamlopt?

$ dune build ./src/main.exe --profile=release ocamlc src/.main.eobjs/byte/ast.{cmi,cmo,cmt} (exit 2) (cd _build/default && /usr/bin/ocamlc.opt -w -40 -O3 -g -bin-annot -I src/.main.eobjs/byte -I /home/jackprograms/.opam/default/lib/cairo2 -I…
Jack Murrow
  • 396
  • 3
  • 11
0
votes
1 answer

Dune behaviour regarding .cma files

I am experiencing some issues when trying to create a .cma file (library) with the dune utility. I have the following project tree: . ├── _build │   ├── default │   │   ├── dune │   │   └── lib │   │   ├── a.a │   │   ├── a.cma │   │   …
Loutr_
  • 3
  • 3
0
votes
2 answers

Lack of information when OCaml crashes

I am new to OCaml which I installed via opam. My compiler is dune. Each time I build my project and run it, it crashes but I get no information from where it crashes in the code. A friend of mine who is doing the same thing get information about the…
0
votes
1 answer

use ocamlformat with cppo and dune

to make our code work with multiple ocamlgraph versions, we are using this snippet in one of our files #if OCAMLGRAPH_VERSION >= (2,0,0) let module Dom = Dominator.Make_graph(struct include G let empty () = create () let add_edge…
josch
  • 6,716
  • 3
  • 41
  • 49
0
votes
1 answer

No implementations provided for the following modules (Mtime_clock, Mtime)

In my project, I'm using OCanren package which I installed as described here: https://github.com/JetBrains-Research/OCanren#Installation. I have a file test.ml where I use OCanren: open OCanren let _ = inj And a dune file in the same…
oquechy
  • 51
  • 4
0
votes
1 answer

What is the proper setup to build the lablgtk hello world using dune?

Can someone here help me with my OCaml project setup? I want to create a build environment using dune, since I am working on a gui application I want to build the lablgtk example from here : GTK Hello World! I am able to build it using the…
ptrck
  • 79
  • 2
  • 8
0
votes
1 answer

Opam could install latest package and told 'Already up-to-date'?

I wanna use opam to install dune package whose version is 1.11.0 or higher. But it told me Already up-to-date while dune is still 1.2.1. pasting my operations: $ opam update =-=- Updating package repositories…
pwxcoo
  • 2,903
  • 2
  • 15
  • 21
0
votes
1 answer

Is it possible to create solib in OCaml

I want to implement shared library for Linux/FreeBSD in OCaml and I need it to have C interface. This way I will be able to implement bindings for various languages. I have several concerns: OCaml is garbage-collected and I'm afraid that objects…
user10359393