I cloned jbuilder, cd’ed to jbuilder/example/sample-projects/hello_world, and entered jbuilder build @install, as specified in README.org in that directory. I get this error:
No rule found for alias example/sample-projects/hello_world/install
This is with OCaml 4.05.0 after opam update and opam upgrade. I tried deleting this sexp from bin/jbuild:
(install
((section bin)
(files ((main.exe as hello_world)))))
I also tried deleting "@install" near the end of hello_world.opam… I don’t yet now what these do, but the modifications seemed worth trying, if only to see what new error was generated. Neither of those modifications made a difference: The original error remained, and was the only one.
(Not sure if this should be in the Build category, or if I should just file an issue, but since I’m just starting with jbuilder, I suspect that the problem is at my end, so it seemed appropriate for the Learn category.)
/p/t/j/e/s/hello_world$ jbuilder build bin/main.exe
Don't know how to build example/sample-projects/hello_world/bin/main.exe
/p/t/j/e/s/hello_world$ jbuilder build --root=. bin/main.exe
/p/t/j/e/s/hello_world$ ./_build/default/bin/main.exe
Hello, world!
Moving the example directory outside of the main jbuilder tree also fixes it. It’s probably related to the jbuild-ignore file. I’d suggest filing an issue anyway; it’s certainly confusing.