Quantcast
Channel: OCaml - Topics tagged dune
Browsing latest articles
Browse All 516 View Live

Image may be NSFW.
Clik here to view.

[ANN] Dune dev meeting

Hi We are organizing a new public Dune dev meeting on Wednesday, July, 24th at 10am CET. It will be one hour long. Whether you are a maintainer, a regular contributor, a new joiner or just curious,...

View Article


Image may be NSFW.
Clik here to view.

[ANN] Dune Developer Preview Updates

Hi folks! Just wanted to share some of the work the Dune has been up to lately re: the Developer Preview we announced here – we’ll be using this thread to share more updates as things go. As always,...

View Article


"dunelongcmd" Linking Error on Windows using ocamlopt

Hello everyone, Because Opam now supports Windows I have experimented with moving my Ocaml-Workspaces from WSL into Windows proper. This was successful and on my laptop there was a noticeable...

View Article

Is there an easy way to tell opam or dune that a library dependency is...

Hello, I am thinking about opam packages which rely on some system-wide installation of a dependency. E.g. nlopt-ocaml relies on nlopt being installed in the right place. Is there a way to support...

View Article

Is opam using the dune cache when building packages?

I can’t seem to figure this out. I have enabled the dune cache in ~/.cache/dune. This directory grows in size when I do dune build, so it seems to be working. However, if I nuke the cache and install...

View Article


Image may be NSFW.
Clik here to view.

[ANN] Dune 3.17

The Dune team is happy to announce the release of Dune 3.17.0! Among the list of changes, this minor release enables the Dune cache by default for known-safe operations, adds out-of-the-box support...

View Article

Image may be NSFW.
Clik here to view.

Preprocess causes "Multiple rules generated for...

Hi everyone, when I write two executable stanza in dune file for “hello world” program, dune build is ok. This error occures when preprocess are added to both exectables below. Any ideas how to let...

View Article

Foreign_archives in dune really seem to want a dll

I’m trying to include my self-built library (let’s call it libx.a), but when I include it in a “foreign_archives” stanza (foreign_archives ../my-library/x), dune really wants a dynamic library...

View Article


Image may be NSFW.
Clik here to view.

Hi, I wrote 2 blog posts about cram tests and It’s a good idea to share them together. Cram tests: a hidden gem of dune I’m a strong advocate of unit tests, I can confidently say that it has saved me...

View Article


Dune, emacs compilation error, and setting the directory in actions

Hello, TL/DR: compiling a file using an action in dune seem to run directly in the directory where the dependency lives, breaking error reporting in emacs. When compiling an OCaml file for a project,...

View Article

Enabling and disabling preprocessors with dune

Is it possible to enable and disable preprocessors with dune actions, profiles, or dune-workspace? My use case is that I would like to use a preprocessor when I compile with dune build...

View Article

[Real world Ocaml] How do I import core_unix time?

So, I’ve been following Real World OCaml, the 2nd edition and I hit a block I’m afraid I cannot overcome with google, documentation or AI help. The code in question: open Core let () =...

View Article

Incr_dom installing dependencies?

Hey all, I’m currently a sophomore in college and am completely new to OCaml trying to run the helloworld example with incr_dom from here. I’m currently in the helloworld working directory, am running...

View Article


Linking problem in compiling my binding of Allegro 5

Hello. I am working on a binding of Allegro 5, a C library similar to SDL, aimed at video games. It compiles well with my default switch which uses OCaml 5.2, but I can’t have it to compile with OCaml...

View Article

Invalid cross-device link when using Eio.Path.load

I am getting the following error when using Eio.Path.load: Fatal error: exception Eio.Io Fs Permission_denied Unix_error (Invalid cross-device link, "openat2", ""), examining...

View Article


Installing dune in opam Debian docker container on arm host for platform amd64

On an apple silicon macos, given the following repro.dockerfile: FROM ocaml/opam:debian-ocaml-5.1 ENV DEBIAN_FRONTEND=noninteractive RUN opam install dune.3.16.0 -y running docker build -f...

View Article

Does dune support user-defined variables?

Like makefile, we can define custom variables. But I didn’t find out how to do so in dune file. Does anyone know whether dune support this? 3 posts - 3 participants Read full topic

View Article


How to generate different code based on an environmental variable at build time

I would like to read a OCaml variable, based on an environmental variable that was passed at build time. Currently I am doing the following: env_gen.ml let () = let env = Sys.getenv_opt "MY_ENV" |>...

View Article

Dune build compilation error

dune build File "bin/dune", line 3, characters 7-11: 3 | (name main) ^^^^ /bin/bash: C:UserschukwAppDataLocalTempbuild_a3f8e9_dunelongcmdebe3b0: No such file or directory ** Fatal error: Error during...

View Article

Dunolint status update

To my fellow OCaml & Dune users, A while ago, I mentioned that I was using an internal tool to help me maintain the dune files of my monorepo. This tool wasn’t really designed to be shared from...

View Article

Dune Compilation Error on Setting Up postgresql

I am facing an error message trying to use postgres, caqti on my project, but i am getting this error message, when i try, dune build. dune build File "bin/dune", line 3, characters 7-11: 3 | (name...

View Article


Jane Street Base changes the semantics of String.concat on my MacOS system

Hello, I am trying to learn OCaml and I have installed the binary OCaml-5.3.0 distribution on my MacOS where “uname -a” gives Darwin Kernel Version 20.6.0: Thu Sep 29 20:15:11 PDT 2022;...

View Article


Help wanted: make ppx_expect bazel-friendly

I just discovered that ppx_expect expects that source files are located in the directory from which the test runner was launched. That is never the case under Bazel. I can’t think of a workaround; I...

View Article

Installing shell completion file in an opam package

I’ve been working on a simple library to automatically generate shell completion files from spec for the Arg module. I’ve been having trouble figuring out how to properly install these completions...

View Article

Newbie dune question

I’m trying to learn dune, and am finding that there’s a lot to learn. Can someone explain to me, or point me to the relevant dune docs, why it works this way: Here’s what I have done: Created a new...

View Article


Using dune with git submodules

I have two dune projects and I would like one to include the other as a git submodule. Thus, both projects have their own dune-project file, and (after updating the submodule) one project will be a...

View Article

Flexdll error on dune 3.8

Hello all, I am trying to upgrade dune to 3.8.0, but I keep getting a flexlink/flexdll error. [ERROR] The compilation of ocaml-variants.5.2.1+options failed at "./configure...

View Article

Error: The module Linol.Log is an alias for module Linol__Log, which is missing

Hello, I’m trying to create a language server using GitHub - c-cube/linol: Wrapper around the OCaml `lsp` library to make it easier to write LSP servers My dune-project: (lang dune 3.17) (name...

View Article

Error compiling base

Hello OCaml community, I try to setup ocaml on my Mac Book air M1 2020 macos Version 15.4 opam init -y eval $(opam env) opam install ocaml-lsp-server odoc ocamlformat utop The installation of the...

View Article



First dune build with ocaml-protoc fails; builds 2+ succeed

I’m using ocaml-protoc, and set up a dune rule that works fine, except it reliably fails the first clean build (subsequent builds are OK). Error is Could not find the .cmi file for interface...

View Article
Browsing latest articles
Browse All 516 View Live