Questions tagged [ocamlbuild]

OCamlbuild is a generic build tool, that has built-in rules for building OCaml library and programs.

OCamlbuild is a generic build tool, that has built-in rules for building library and programs.

Useful resources

160 questions
0
votes
1 answer

Why this syntax error? No given reason from the shell

I've just finished writing this piece of pattern matching (to be attached below). No matter how I tried fixing it up, there is still "Error: Syntax error" when I tried to compile it. The piece of code is here: let rec stmt (s:Ast.stmt) : X86.inst…
ZWu
  • 1
0
votes
2 answers

OCaml: simple assignment to represent a list of ints

Hello I am learning the OCaml language and working on an assignment. infinite precision natural numbers can be represented as lists of ints between 0 and 9 Write a function that takes an integer and represents it with a list of integers between 0…
Vicky
  • 25
  • 5
0
votes
1 answer

Unbounded Value OCAML

I am trying to compile Orange as part of OTAWA However I get the below Error in file wcee.ml Error: Unbound value IMap.print_ordered The reason for the error is the below snippet. let glb = common (** Least upper bound. *) let lub =…
Hazem Abaza
  • 331
  • 4
  • 21
0
votes
1 answer

ocamlbuild can't find file graphics.cma

I reviewed this thread OCaml - Cannot find graphics.cma but unfortunately wasn't able to resolve it finding the recommendation here. I'm on Catalina macos and when running ocamlbuild foo.byte, I get this error: + ocamlc.opt str.cma graphics.cma…
reactor
  • 1,722
  • 1
  • 14
  • 34
0
votes
1 answer

Unbound value List in Ocaml?

I just built a little test program to see my bigger issue, but I keep on getting an error. let test a = List.length [a;a;a] I want to build it with ocamlbuild. ocamlbuild call.byte -no-hygiene I tried add -pkgs 'core', but that didn't work as…
Tech333
  • 41
  • 3
0
votes
1 answer

Error: This variant pattern is expected to have type prim1. The constructor Id does not belong to type prim1

I don't have much experience with ocmal and the compiler error message isn't very helpful. I don't see any obvious problem with the code. I have the full code and the error message below. Thank you. Full compiler error message: File "compile.ml", …
NoMan
  • 401
  • 1
  • 4
  • 10
0
votes
2 answers

ocamlbuild produces a blank archive file rather than an executable

Working on a Debian-based Linux distro (PopOS), I have a folder of files and a Makefile containing MODULES=move score main draw setup OBJECTS=$(MODULES:=.cmo) TEST=test.byte OCAMLBUILD=ocamlbuild -use-ocamlfind MAIN=main.byte # Recipes default:…
Addem
  • 3,635
  • 3
  • 35
  • 58
0
votes
2 answers

ocamlbuild: Nothing to be done for `all'

I'm using ocamlbuild in makefile to build my code and want to recompile when there is any code change. But make returns with error message: make: Nothing to be done for `all'. My makefile code: all: test1 test2 test1: ocamlbuild $(INCLUDES)…
cstjh
  • 153
  • 1
  • 2
  • 8
0
votes
1 answer

ocamlbuild missing from path

When I run ocaml --version I get The OCaml toplevel, version 4.07.1. But when I try ocamlbuild --version I get the following error message: Command 'ocamlbuild' not found, but can be installed with: sudo apt install ocamlbuild How is that…
OrenIshShalom
  • 5,974
  • 9
  • 37
  • 87
0
votes
1 answer

(Ocaml) Error: Unbound module Ocamlbuild_pack.Ocamlbuild_Myocamlbuild_config

i am trying to compile a ocaml program (part of it shown below) open Ocamlbuild_plugin open Command (** helper functions ) ( splitting strings using a delimeter character *) let rec strsplit sep str accu len = try let idx = String.rindex_from str…
shah
  • 3
  • 2
0
votes
0 answers

OCaml: How do I compile/make a program which has file extensions .ml.x?

I have downloaded a project which contains the following…
Addem
  • 3,635
  • 3
  • 35
  • 58
0
votes
1 answer

Unable to build using Ocamlbuild

I'm trying to build an OCaml project using ocaml build command which looks similar to ocamlbuild -use-ocamlfind test.byte Following error is observed. Error: Unbound value String.lowercase_ascii. I have install Clang and i am using OCaml 4.07.0
harin04
  • 271
  • 5
  • 16
0
votes
1 answer

How to build a custom utop-based toplevel with ocamlbuild?

I want to create a utop-based toplevel for my project, which is built by ocamlbuild. However, ocamlbuild supports only mktoplevel, built from *.mltop. It doesn't mention utop anywhere in the docs. Also, the utop manual explains just toplevel…
vog
  • 23,517
  • 11
  • 59
  • 75
0
votes
0 answers

How to configure ocamlc

As this post suggests, ocaml 4.03.0 compiler or greater defaults warning 31 as an error. This makes me unable to install the camlidl package with the command opam install camidl because it contains a module with conflicting name as in stdlib.cma.…
Seves
  • 135
  • 2
  • 12
0
votes
1 answer

Using Ocamlbuild plugins with Oasis

What is the proper way to integrate Ocamlbuild plugins like Ocamlbuild-protoc into a project managed by Oasis? I know how to manually edit myocamlbuild.ml to invoke the plugin, but that's not enough, because the proper tags have not been set.…
Jon Smark
  • 2,528
  • 24
  • 31