corebuild "Compilation successful" ... but where's the binary?

"John Magolske [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Hi,

In the RWO book, at the end of Chapter 1 under "Compiling and Running"
it says to run the corebuild command to compile a program from source
(sum.native). But this doesn't seem to be creating a binary...

    % cat sum.native
    open Core.Std
    let rec read_and_accumulate accum =
      let line = In_channel.input_line In_channel.stdin in
      match line with
      | None -> accum
      | Some x -> read_and_accumulate (accum +. Float.of_string x)
    let () =
      printf "Total: %F\n" (read_and_accumulate 0.)

    % corebuild sum.native
    Finished, 0 targets (0 cached) in 00:00:00.

The resulting directory structure after `corebuild sum.native` :

    % tree /home/john/example/sum
    /home/john/example/sum
    ├── _build
    │   ├── _digests
    │   ├── _log
    │   └── sum.native
    └── sum.native -> /home/john/example/sum/_build/sum.native

The log file says compilation was successful:

    % cat _build/_log
    ### Starting build.
    # Compilation successful.

But I'm not seeing a compiled binary...is there supposed to be one?
(the _build/sum.native in there is identical to the original source)

I *think* everything required is installed & up-to-date:

    % corebuild -version
    ocamlbuild 4.02.1

    % opam info core
                package: core
                version: 112.24.01
                repository: default

    % ocaml -version
    The OCaml toplevel, version 4.02.1

Thanks for any clues/clarification,

John

-- 
John Magolske
http://B79.net/contact
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.