OCaml 4.01.0 entering Rawhide

After using OCaml for around 10 years it is still my favourite language, and it’s amazing how far ahead of other programming languages it remains to this day.

OCaml 4.01.0 was released on Thursday and I’m putting it into Fedora Rawhide over this weekend.

Debuginfo is now (partially) enabled. The OCaml code generator has produced good quality DWARF information for a while, and now you are able to debug OCaml programs in gdb under Fedora:

$ sudo debuginfo-install ocaml ocaml-findlib
$ gdb /usr/bin/ocamlfind
Reading symbols from /usr/bin/ocamlfind...
Reading symbols from /usr/lib/debug/usr/bin/ocamlfind.debug...done.
(gdb) break frontend.ml:469
Breakpoint 1 at 0x432500: file frontend.ml, line 469.
(gdb) run query findlib -l
Starting program: /usr/bin/ocamlfind query findlib -l

Breakpoint 1, camlFrontend__query_package_1199 () at frontend.ml:469
469	let query_package () =
(gdb) bt
#0  camlFrontend__query_package_1199 () at frontend.ml:469
#1  0x000000000043a4b4 in camlFrontend__main_1670 () at frontend.ml:2231
#2  0x000000000043aa86 in camlFrontend__entry () at frontend.ml:2283
#3  0x000000000042adc9 in caml_program ()
#4  0x00000000004834be in caml_start_program ()
#5  0x000000000048365d in __libc_csu_init ()
#6  0x0000003979821b75 in __libc_start_main (main=0x42aa60 <main>, argc=4, 
    ubp_av=0x7fffffffde38, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffde28) at libc-start.c:258
#7  0x000000000042aaa9 in _start ()
(gdb) list
464	;;
467	(************************** QUERY SUBCOMMAND ***************************)
469	let query_package () =
471	  let long_format =
472	    "package:     %p\ndescription: %D\nversion:     %v\narchive(s):  %A\nlinkopts:    %O\nlocation:    %d\n" in
473	  let i_format =

GDB only understands location data at the moment, so you can’t yet query variables (although I understand OCaml generates the correct DWARF info for this, GDB just doesn’t know how to print OCaml expressions).

There will also be some limitations on the debuginfo built at first. At the moment it doesn’t include debuginfo for OCaml libraries called from an OCaml program, because of problems that need to be worked out with the toolchain. Mixed OCaml binary / C library debuginfo does work.



Filed under Uncategorized

6 responses to “OCaml 4.01.0 entering Rawhide

  1. christoph höger

    Just out of curiosity (not starting a language flame war) what puts OCaml ahead of which other languages in your opinion?

    • rich

      It’s as compact as Python, yet statically typed and compiles down to really fast native code.

      Another way to look at it would be C++ but without being insane.

  2. Are there future plans for making whenjobs available through OPAM?

    • rich

      That’s not really up to me. Anyone can package whenjobs.

      On the other hand, I do have big plans for another, better goal-oriented scheduling system which I was thinking deeply about only yesterday in fact.

  3. Pingback: Goaljobs, part 1 | Richard WM Jones

  4. Pingback: Goaljobs, part 2 | Richard WM Jones

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.