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
1
vote
1 answer

Add a module by makefile or manually

I have a big project built with traditional makefile. I would like to add a mechanism of error handling like this project to my project. In the sample project, a module UnitActionsParser is generated by the following rules of dune: ;; The following…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
1 answer

Include mly files nested in subdirectories when compiling with dune

Say I have the following directory: . ├── dune-project ├── myproj.opam └── src ├── dune ├── module1.ml ├── parser1 │   └── file1.ml └── parser2 └── file2.ml Since I want everything to be in the same library, I have the…
Lhooq
  • 4,281
  • 1
  • 18
  • 37
1
vote
1 answer

What's the purpose of a package.opam file in dune?

The Dune documentation writes: A typical dune project will have a dune-project and one or more .opam file at the root as well as dune files wherever interesting things are: libraries, executables, tests, documents to install, etc… What's the…
AndW
  • 726
  • 6
  • 31
1
vote
2 answers

Using dune + qtest in a multi-file project

Let me begin by saying that I'm a complete beginner in OCaml, so if I seem to have made some weird choices, I'm most likely not aware of them being a choice. I am trying to get unit testing working in my project. After some searching I settled on…
Maya
  • 1,490
  • 12
  • 24
1
vote
1 answer

Ocaml utop does not (but does) recognise Big_int

I have some code that uses the module Big_int, like in: open Big_int;; Big_int.gcd_big_int 5 6;; However, when I compile this with utop dune utop --release (I use release to avoid some warnings), then I get this error: Error: Required module…
Theo Deep
  • 666
  • 4
  • 15
1
vote
1 answer

Copying a newly builded file as a Dune's stanza

I have written a library in OCaml with all of its sources located in lib folder. I also prepared "facade" executables in bin folder. Now I would like to prepare some examples how to use the above mentioned executables. To do this I need to either…
zajer
  • 649
  • 6
  • 17
1
vote
1 answer

Alternative dependencies error when switch from dune 1.1 to dune 2.0

I switched my dune project version from (lang dune 1.1) to (lang dune 2.0) which produced an error for the handling of alternate dependencies. I had the foolowing in my dune file which worked with dune 1.1: (select vpl_domain.ml from (vpl ->…
ghilesZ
  • 1,502
  • 1
  • 18
  • 30
1
vote
1 answer

LLVM package: No implementation provided for the following modules: Llvm_analysis

When trying to use the Llvm_analysis module in the Llvm package, I get the error message: File "_none_", line 1: Error: No implementations provided for the following modules: Llvm_analysis referenced from…
Tim Eichholz
  • 119
  • 1
  • 7
1
vote
1 answer

OCaml: How to build mirage-tcpip using dune?

I'm trying to build the examples at https://github.com/mirage/mirage-tcpip in the folder "examples". First I did opam install . in the root directory to install all dependencies. Then I did dune build and it build everything in _build, lots of .a,…
PPP
  • 1,279
  • 1
  • 28
  • 71
1
vote
1 answer

ctypes is hidden (unsatisfied 'exist_if') error when using dune on wsl

I am using wsl ubuntu on my windows 10 machine and am trying to build an ocaml project(https://github.com/adamrk/llvm-ocaml-tutorial) using dune. Unfortunately, i am getting this error: # dune build bin/kaleidoscope.exe File…
Devon Rutledge
  • 143
  • 1
  • 11
1
vote
1 answer

Ocaml / ReasonML - Missing libraries in built executable

I have an ReasonML project that is using dune build to build an executable. The executable runs on the development machine (where the code is built) without any problems. However, if I copy this exe to my other laptop (Another mac with the same OSX…
tomraithel
  • 958
  • 2
  • 13
  • 22
1
vote
0 answers

Running utop with dune conflict: extlib and base64

I have a project which uses extlib and base64. dune is used in the build process. The build works fine, but when I try to run dune utop, I get the following message: [@ js2sil]$ dune utop File…
avery_laird
  • 146
  • 9
1
vote
1 answer

Dune version not supported

I am trying to install google-drive-ocamlfuse from source, but the prereuiqisites got me a little confused. I am experiencing this error: [bf@localhost google-drive-ocamlfuse]$ dune build @install File…
Bart Friederichs
  • 33,050
  • 15
  • 95
  • 195
1
vote
1 answer

How do I use 'dune utop --watch'?

I would like dune utop or another OCaml top-level to pick up changes I do to my code while it is running. It seems as if dune utop --watch was designed to do that. Is that true? How do I make use of it? In my experiments dune utop --watch ignored…
1
vote
0 answers

How do I have dune execute a shell command as a dependency to a library

I have a library that has some C stubs which needs to be linked against some other C code that I need to compile directly with gcc. I'm trying to do it like this, but the rule that calls gcc doesn't seem to be executing: (rule (targets…
bobpoekert
  • 934
  • 1
  • 11
  • 26