Building OMake 0.9.8.5

The OCaml build system OMake in its latest stable release 0.9.8.5 doesn’t build with recent versions of GCC (>= 4.4) and OCaml. There are two separate issues.

One is a problem in the C code that I didn’t even try to understand, as there’s a patch from the competent Debian people.

The other issue is a reference to caml_sync that’s not part of recent OCaml; it’s enough to just remove or comment that line.

Here’s the diff:

    --- a/src/exec/omake_exec.ml    2006-12-08 23:52:01.000000000 +0100
    +++ b/src/exec/omake_exec.ml    2009-10-30 23:45:49.688006630 +0100
    @@ -46,7 +46,7 @@
     open Omake_options
     open Omake_command_type
     
    -external sync : unit -> unit = "caml_sync"
    +(* external sync : unit -> unit = "caml_sync" *)
     
     module Exec =
     struct
    diff -ru a/src/libmojave-external/cutil/lm_printf.c b/src/libmojave-external/cutil/lm_printf.c
    
    
    --- a/src/libmojave-external/cutil/lm_printf.c  2007-07-15 19:55:23.000000000 +0200
    +++ b/src/libmojave-external/cutil/lm_printf.c  2009-10-30 23:45:26.600007718 +0100
    @@ -142,12 +142,12 @@
     #endif
         if(code < 0) {
             if(bufp != buffer)
    -            free(buffer);
    +            free(bufp);
             failwith("ml_print_string");
         }
         v_result = copy_string(bufp);
         if(bufp != buffer)
    -        free(buffer);
    +        free(bufp);
         return v_result;
     }
     
    @@ -190,12 +190,12 @@
     #endif
         if(code < 0) {
             if(bufp != buffer)
    -            free(buffer);
    +            free(bufp);
             failwith("ml_print_string");
         }
         v_result = copy_string(bufp);
         if(bufp != buffer)
    -        free(buffer);
    +        free(bufp);
         return v_result;
     }
Advertisements

Tags: , , ,


%d bloggers like this: