Package Details: ocaml-batteries 2.7.0-1

Git Clone URL: (read-only)
Package Base: ocaml-batteries
Description: A comprehensive standard library for OCaml
Upstream URL:
Licenses: LGPL
Submitter: None
Maintainer: catalin.hritcu
Last Packager: catalin.hritcu
Votes: 15
Popularity: 0.007703
First Submitted: 2008-11-16 11:42
Last Updated: 2018-02-21 07:27

Dependencies (4)

Required by (2)

Sources (1)

Latest Comments

catalin.hritcu commented on 2017-10-22 19:47

Getting the following error with OCaml 4.05.0 (the current default on Arch)
+ ocamlfind ocamlc -c -g -w -3 -package bigarray,num,str -package bytes -I src -I testsuite -I benchsuite -I build -I qtest -o src/batUnix.cmi src/batUnix.mli
File "src/batUnix.mliv", line 253, characters 0-1167:
Error: This variant or record definition does not match that of type
The field O_KEEPEXEC is only present in the original definition.

From the documentation of the batteries 2.7.0, that seems to be the first version that supports OCaml 4.05.0:

LeonidasXIV commented on 2016-11-18 19:14

Thanks thorsten, I updated it to 2.5.3 which has fixes to work with OCaml 4.04.

thorsten commented on 2016-11-18 13:23

The package is not compiling for me.
$ makepkg -cf

==> Making package: ocaml-batteries 2.5.0-1 (Fri Nov 18 14:20:01 CET 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found v2.5.0.tar.gz
==> Validating source files with sha512sums...
v2.5.0.tar.gz ... Passed
==> Extracting sources...
-> Extracting v2.5.0.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
ocamlfind: Package `qcheck' not found
Build mode: shared
ocamlbuild -no-links -no-links -use-ocamlfind src/batteries.cma src/batteriesHelp.cmo src/batteriesThread.cma META src/batteries.cmxs src/batteriesThread.cmxs
Finished, 0 targets (0 cached) in 00:00:00.
ocamlfind: Package `bisect' not found
+ ocamlfind ocamlc -c -g -annot -w -3 -w -29 -package bigarray,num,str -package bytes -I src -I benchsuite -I qtest -I build -I testsuite -o src/batBytes.cmo src/
File "src/", line 1:
Error: The implementation src/
does not match the interface src/batBytes.cmi:
Values do not match:
external length : bytes -> int = "%bytes_length"
is not included in
external length : t -> int = "%string_length"
Command exited with code 2.
Compilation unsuccessful after building 309 targets (308 cached) in 00:00:00.
make: *** [Makefile:78: all] Error 10
==> ERROR: A failure occurred in build().

$ pacman -Qs ocaml|grep ^local
local/camlp5-transitional 6.12-1
local/cppo 1.3.2-1
local/ocaml 4.04.0-1
local/ocaml-compiler-libs 4.04.0-1
local/ocaml-findlib 1.6.3-1
local/ocamlbuild 0.9.3-1

LeonidasXIV commented on 2016-10-20 19:29

Thanks Darksonn, I've updated the whole package to 2.5.0 which has some fixes for OCaml 4.03.

Darksonn commented on 2016-10-20 18:37

With the release of OCaml 4.03, the ocamlbuild executable has been split from the ocaml package, and the package "ocamlbuild" must be added to the dependencies for this to build.

The split has been mentioned in the release notes here:

LeonidasXIV commented on 2015-09-27 17:47

What is the error message on ARM? I currently don't have an ARM box to test.

orbifx commented on 2015-09-26 17:25

Any chance we can get this working for ARM? I'm willing to help.

LeonidasXIV commented on 2014-01-04 21:36

Thanks sitquietly, I updated the PKGBUILD with your suggestions.

sitquietly commented on 2014-01-04 21:22

With ocaml 4.01 you will need the batteries-2.1-ocaml-4.01.patch available here: and add to the PKGBUILD:

prepare() {
cd "batteries-$pkgver"
patch -Np1 -i ../batteries-2.1-ocaml-4.01.patch


npouillard commented on 2011-08-11 05:41

ocaml-batteries 1.4.0-1 uploaded, enjoy.

SerP commented on 2011-08-10 21:16


Anonymous comment on 2010-09-30 02:34

Hi ouroboros

This issue is the result of the following bug that was introduced in ocaml 3.12:

The 2 build issues which currently affect this package are resolved by the following 2 commits to the batteries git repo.

There should be a new release of batteries soonish with these fixes included.

Anonymous comment on 2010-09-28 16:15


I can’t build the package. My build output looks like this (I hope it’s ok to just paste it here):

==> Starting build()...
test ! -e src/ || rm src/
ocamlbuild syntax.otarget byte.otarget src/batteries_help.cmo META shared.otarget
Finished, 1 target (0 cached) in 00:00:00.
+ ocamlfind ocamldep -package camomile,num,str -package camlp4.lib -pp camlp4of -pp camlp4of -modules src/syntax/pa_strings/ > src/syntax/pa_strings/
File "src/syntax/pa_strings/", line 249, characters 19-22:
While expanding quotation "ctyp" in a position of "patt":
Parse error: EOI expected after [quotation of type] (in [quotation of type])

Preprocessing error on file src/syntax/pa_strings/
Command exited with code 2.
Compilation unsuccessful after building 9 targets (0 cached) in 00:00:01.
make: *** [all] Error 10
error: Build faile

So far, I haven’t been able to find anything related to this using Google, so some help would be appreciated.