Hi guys, new user here
I have an OCaml project that I’ve been working on for 3 years. It’s using
ocamlbuild at the moment, and I decided to give
dune a whirl over the weekend. But having an issue with the
dune build command, where it seems like it’s not doing anything.
The project is a command-line game, and has a very simple layout. Just three directories:
util is a
(wrapped false) library containing auxiliary modules used by
game contains all the game logic, and is also a library.
game as a command-line application.
tty/main.ml is the entry point.
So, I set up the dune files like this:
dune init lib util util <-- Then added the
(wrapped false) bit manually.
dune init lib game game --libs util
dune init exec main tty --libs util,game
Now, when I run
dune build or
dune build tty, I get nothing. No output, no error.
dune-project file gets created with
(dune lang 1.11) in it.
_build directory gets created with only
log in it. The log has 4 lines:
# dune build # OCAMLPARAM: unset $ /usr/bin/getconf _NPROCESSORS_ONLN > /var/folders/vy/ly11c9b91t32x62x39rrykyc0000gn/T/dune9d09bd.output 2> /dev/null $ /Users/emirkotan/.opam/4.08.0/bin/ocamlc.opt -config > /var/folders/vy/ly11c9b91t32x62x39rrykyc0000gn/T/dune3b0a02.output
Neither of these
.output files exist (dune cleaning them up maybe?).
That being said, if I do
dune build @@tty/all then it compiles everything, and I get a working executable in
I tried the “hello world” project we get with
dune init proj, and
dune build works fine in that.
So, I’m not sure if it’s my project layout or a missing config that’s not letting me use the “default” target?
PS: I tried these on both my Mac (Catalina) and Linux (Manjaro) machines, same issue.