a small error in the documentation (compilation instructions)

9 views
Skip to first unread message

Matej Kosik

unread,
Jul 1, 2011, 11:16:28 AM7/1/11
to bitstring
Hello,

I have noticed a small error in the documentation. Here:
http://people.redhat.com/~rjones/bitstring/html/Bitstring.html#2_Compiling
are instructions how to compile a stand-alone Ocaml program that takes
advantage of bitstring syntax.

One of the two suggested commands:

ocamlc -I +bitstring -pp "camlp4of bitstring.cma
bitstring_persistent.cma `ocamlc -where`/bitstring/pa_bitstring.cmo"
unix.cma bitstring.cma test.ml -o test

does not work. After some experimentation, I have found a similar
command that works:

ocamlc -I +bitstring -pp "camlp4of -I `ocamlc -where`/bitstring
bitstring.cma bitstring_persistent.cma pa_bitstring.cmo" unix.cma
bitstring.cma test.ml -o test

Richard W.M. Jones

unread,
Jul 2, 2011, 6:13:52 AM7/2/11
to bits...@googlegroups.com, ko...@fiit.stuba.sk

Thanks. Does -I +bitstring work as well?

Rich.

--
Richard Jones
Red Hat

Matej Kosik

unread,
Jul 2, 2011, 5:55:05 PM7/2/11
to bitstring
If you ask, if the command can be simplified to:

ocamlc -I +bitstring -pp "camlp4of -I +bitstring bitstring.cma
bitstring_persistent.cma pa_bitstring.cmo" unix.cma bitstring.cma
elf.ml -o elf

then, I think, the answer is no. If I tried it, I've got an error
message:

Camlp4: Uncaught exception: DynLoader.Error ("bitstring.cma", "file
not found in path")

On Jul 2, 12:13 pm, "Richard W.M. Jones" <r...@annexia.org> wrote:
> On Fri, Jul 01, 2011 at 08:16:28AM -0700, Matej Kosik wrote:
> > Hello,
>
> > I have noticed a small error in the documentation. Here:
> >http://people.redhat.com/~rjones/bitstring/html/Bitstring.html#2_Comp...

Richard W.M. Jones

unread,
Jul 4, 2011, 3:32:14 AM7/4/11
to bits...@googlegroups.com
On Sat, Jul 02, 2011 at 02:55:05PM -0700, Matej Kosik wrote:
> If you ask, if the command can be simplified to:
>
> ocamlc -I +bitstring -pp "camlp4of -I +bitstring bitstring.cma
> bitstring_persistent.cma pa_bitstring.cmo" unix.cma bitstring.cma
> elf.ml -o elf
>
> then, I think, the answer is no. If I tried it, I've got an error
> message:
>
> Camlp4: Uncaught exception: DynLoader.Error ("bitstring.cma", "file
> not found in path")

OK, thanks for trying it. That's odd ...

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

Matej Kosik

unread,
Jul 4, 2011, 3:46:16 PM7/4/11
to bitstring
It can be easily reproduced. The archive:
http://www2.fiit.stuba.sk/~kosik/tmp/elf.tar.gz
contains relevant files.

I have tried this on two Debian stable systems.
"camlp4of" options:

-I `ocamlc -where`/bitstring

cannot be replaced with saner variant:

-I +bitstring
Reply all
Reply to author
Forward
0 new messages