=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Building for ocaml-bz2-0.7.0
ocamlc.opt -ccopt "-D BZ_PREFIX -I/opt/pkg/include -I/opt/pkg/include/ncurses -pipe -Os -I/opt/pkg/include -I/opt/pkg/include/ncurses" -c c_bz.c
c_bz.c:49:7: warning: "invalid_argument" is deprecated: use "caml_invalid_argument" instead [-W#pragma-messages]
      invalid_argument(msg) ; break ;
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:112:26: note: expanded from macro 'invalid_argument'
#define invalid_argument CAML_DEPRECATED("invalid_argument", "caml_invalid_argument") caml_invalid_argument
                         ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:94:6: note: expanded from here
 GCC warning "\"invalid_argument\" is deprecated: use \"caml_invalid_argument\" instead"
     ^
c_bz.c:51:7: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
      raise_out_of_memory() ; break ;
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:98:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:54:7: warning: "raise_constant" is deprecated: use "caml_raise_constant" instead [-W#pragma-messages]
      raise_constant(*caml_named_value("mlbz_data_exn")) ; break ;
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:108:24: note: expanded from macro 'raise_constant'
#define raise_constant CAML_DEPRECATED("raise_constant", "caml_raise_constant") caml_raise_constant
                       ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:102:6: note: expanded from here
 GCC warning "\"raise_constant\" is deprecated: use \"caml_raise_constant\" instead"
     ^
c_bz.c:56:7: warning: "raise_with_string" is deprecated: use "caml_raise_with_string" instead [-W#pragma-messages]
      raise_with_string(*caml_named_value("mlbz_io_exn"), 
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:110:27: note: expanded from macro 'raise_with_string'
#define raise_with_string CAML_DEPRECATED("raise_with_string", "caml_raise_with_string") caml_raise_with_string
                          ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:106:6: note: expanded from here
 GCC warning "\"raise_with_string\" is deprecated: use \"caml_raise_with_string\" instead"
     ^
c_bz.c:59:7: warning: "raise_constant" is deprecated: use "caml_raise_constant" instead [-W#pragma-messages]
      raise_constant(*caml_named_value("mlbz_eof_exn")) ; break ;
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:108:24: note: expanded from macro 'raise_constant'
#define raise_constant CAML_DEPRECATED("raise_constant", "caml_raise_constant") caml_raise_constant
                       ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:110:6: note: expanded from here
 GCC warning "\"raise_constant\" is deprecated: use \"caml_raise_constant\" instead"
     ^
c_bz.c:61:7: warning: "failwith" is deprecated: use "caml_failwith" instead [-W#pragma-messages]
      failwith(msg) ;
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:111:18: note: expanded from macro 'failwith'
#define failwith CAML_DEPRECATED("failwith", "caml_failwith") caml_failwith
                 ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:114:6: note: expanded from here
 GCC warning "\"failwith\" is deprecated: use \"caml_failwith\" instead"
     ^
c_bz.c:74:11: warning: "alloc_small" is deprecated: use "caml_alloc_small" instead [-W#pragma-messages]
  result= alloc_small(3, Abstract_tag);
          ^
/opt/pkg/lib/ocaml/caml/compatibility.h:47:21: note: expanded from macro 'alloc_small'
#define alloc_small CAML_DEPRECATED("alloc_small", "caml_alloc_small") caml_alloc_small
                    ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:118:6: note: expanded from here
 GCC warning "\"alloc_small\" is deprecated: use \"caml_alloc_small\" instead"
     ^
c_bz.c:105:10: warning: "copy_string" is deprecated: use "caml_copy_string" instead [-W#pragma-messages]
  return copy_string(BZ_P(bzlibVersion())) ;
         ^
/opt/pkg/lib/ocaml/caml/compatibility.h:51:21: note: expanded from macro 'copy_string'
#define copy_string CAML_DEPRECATED("copy_string", "caml_copy_string") caml_copy_string
                    ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:122:6: note: expanded from here
 GCC warning "\"copy_string\" is deprecated: use \"caml_copy_string\" instead"
     ^
c_bz.c:121:15: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
    c_unused  = String_val(Field(unused, 0)) ;
              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c_bz.c:122:17: warning: "string_length" is deprecated: use "caml_string_length" instead [-W#pragma-messages]
    c_nunused = string_length(Field(unused, 0));
                ^
/opt/pkg/lib/ocaml/caml/compatibility.h:289:23: note: expanded from macro 'string_length'
#define string_length CAML_DEPRECATED("string_length", "caml_string_length") caml_string_length
                      ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:127:6: note: expanded from here
 GCC warning "\"string_length\" is deprecated: use \"caml_string_length\" instead"
     ^
c_bz.c:139:5: warning: "raise_end_of_file" is deprecated: use "caml_raise_end_of_file" instead [-W#pragma-messages]
    raise_end_of_file() ;    
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:117:27: note: expanded from macro 'raise_end_of_file'
#define raise_end_of_file CAML_DEPRECATED("raise_end_of_file", "caml_raise_end_of_file") caml_raise_end_of_file
                          ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:3:6: note: expanded from here
 GCC warning "\"raise_end_of_file\" is deprecated: use \"caml_raise_end_of_file\" instead"
     ^
c_bz.c:140:23: warning: "string_length" is deprecated: use "caml_string_length" instead [-W#pragma-messages]
  if((c_len + c_pos > string_length(buf))
                      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:289:23: note: expanded from macro 'string_length'
#define string_length CAML_DEPRECATED("string_length", "caml_string_length") caml_string_length
                      ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:7:6: note: expanded from here
 GCC warning "\"string_length\" is deprecated: use \"caml_string_length\" instead"
     ^
c_bz.c:142:5: warning: "invalid_argument" is deprecated: use "caml_invalid_argument" instead [-W#pragma-messages]
    invalid_argument("Bz.read") ;
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:112:26: note: expanded from macro 'invalid_argument'
#define invalid_argument CAML_DEPRECATED("invalid_argument", "caml_invalid_argument") caml_invalid_argument
                         ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:11:6: note: expanded from here
 GCC warning "\"invalid_argument\" is deprecated: use \"caml_invalid_argument\" instead"
     ^
c_bz.c:143:9: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  c_buf = String_val(buf) + c_pos ;
        ^ ~~~~~~~~~~~~~~~~~~~~~~~
c_bz.c:173:12: warning: "alloc_string" is deprecated: use "caml_alloc_string" instead [-W#pragma-messages]
  result = alloc_string(nunused) ;
           ^
/opt/pkg/lib/ocaml/caml/compatibility.h:49:22: note: expanded from macro 'alloc_string'
#define alloc_string CAML_DEPRECATED("alloc_string", "caml_alloc_string") caml_alloc_string
                     ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:18:6: note: expanded from here
 GCC warning "\"alloc_string\" is deprecated: use \"caml_alloc_string\" instead"
     ^
c_bz.c:174:10: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  memcpy(String_val(result), unused, nunused) ;
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/pkg/lib/ocaml/caml/mlvalues.h:290:23: note: expanded from macro 'String_val'
#define String_val(x) ((const char *) Bp_val(x))
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/secure/_string.h:63:27: note: expanded from macro 'memcpy'
                __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
                                        ^~~~
c_bz.c:201:23: warning: "string_length" is deprecated: use "caml_string_length" instead [-W#pragma-messages]
  if((c_len + c_pos > string_length(buf))
                      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:289:23: note: expanded from macro 'string_length'
#define string_length CAML_DEPRECATED("string_length", "caml_string_length") caml_string_length
                      ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:23:6: note: expanded from here
 GCC warning "\"string_length\" is deprecated: use \"caml_string_length\" instead"
     ^
c_bz.c:203:5: warning: "invalid_argument" is deprecated: use "caml_invalid_argument" instead [-W#pragma-messages]
    invalid_argument("Bz.write") ;
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:112:26: note: expanded from macro 'invalid_argument'
#define invalid_argument CAML_DEPRECATED("invalid_argument", "caml_invalid_argument") caml_invalid_argument
                         ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:27:6: note: expanded from here
 GCC warning "\"invalid_argument\" is deprecated: use \"caml_invalid_argument\" instead"
     ^
c_bz.c:204:9: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  c_buf = String_val(buf) + c_pos ;
        ^ ~~~~~~~~~~~~~~~~~~~~~~~
c_bz.c:240:25: warning: "string_length" is deprecated: use "caml_string_length" instead [-W#pragma-messages]
     || c_pos + c_len > string_length(src))
                        ^
/opt/pkg/lib/ocaml/caml/compatibility.h:289:23: note: expanded from macro 'string_length'
#define string_length CAML_DEPRECATED("string_length", "caml_string_length") caml_string_length
                      ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:33:6: note: expanded from here
 GCC warning "\"string_length\" is deprecated: use \"caml_string_length\" instead"
     ^
c_bz.c:241:5: warning: "invalid_argument" is deprecated: use "caml_invalid_argument" instead [-W#pragma-messages]
    invalid_argument("Bz.compress") ;
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:112:26: note: expanded from macro 'invalid_argument'
#define invalid_argument CAML_DEPRECATED("invalid_argument", "caml_invalid_argument") caml_invalid_argument
                         ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:37:6: note: expanded from here
 GCC warning "\"invalid_argument\" is deprecated: use \"caml_invalid_argument\" instead"
     ^
c_bz.c:242:11: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  src_buf = String_val(src) + c_pos;
          ^ ~~~~~~~~~~~~~~~~~~~~~~~
c_bz.c:246:5: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
    raise_out_of_memory();
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:41:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:258:2: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
        raise_out_of_memory();
        ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:46:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:263:7: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
      raise_out_of_memory();
      ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:50:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:266:12: warning: "alloc_string" is deprecated: use "caml_alloc_string" instead [-W#pragma-messages]
  result = alloc_string(dst_len);
           ^
/opt/pkg/lib/ocaml/caml/compatibility.h:49:22: note: expanded from macro 'alloc_string'
#define alloc_string CAML_DEPRECATED("alloc_string", "caml_alloc_string") caml_alloc_string
                     ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:54:6: note: expanded from here
 GCC warning "\"alloc_string\" is deprecated: use \"caml_alloc_string\" instead"
     ^
c_bz.c:267:10: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  memcpy(String_val(result), dst_buf, dst_len);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/pkg/lib/ocaml/caml/mlvalues.h:290:23: note: expanded from macro 'String_val'
#define String_val(x) ((const char *) Bp_val(x))
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/secure/_string.h:63:27: note: expanded from macro 'memcpy'
                __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
                                        ^~~~
c_bz.c:285:25: warning: "string_length" is deprecated: use "caml_string_length" instead [-W#pragma-messages]
     || c_pos + c_len > string_length(src))
                        ^
/opt/pkg/lib/ocaml/caml/compatibility.h:289:23: note: expanded from macro 'string_length'
#define string_length CAML_DEPRECATED("string_length", "caml_string_length") caml_string_length
                      ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:58:6: note: expanded from here
 GCC warning "\"string_length\" is deprecated: use \"caml_string_length\" instead"
     ^
c_bz.c:286:5: warning: "invalid_argument" is deprecated: use "caml_invalid_argument" instead [-W#pragma-messages]
    invalid_argument("Bz.uncompress") ;
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:112:26: note: expanded from macro 'invalid_argument'
#define invalid_argument CAML_DEPRECATED("invalid_argument", "caml_invalid_argument") caml_invalid_argument
                         ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:62:6: note: expanded from here
 GCC warning "\"invalid_argument\" is deprecated: use \"caml_invalid_argument\" instead"
     ^
c_bz.c:287:11: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  src_buf = String_val(src) + c_pos;
          ^ ~~~~~~~~~~~~~~~~~~~~~~~
c_bz.c:291:5: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
    raise_out_of_memory();
    ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:66:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:305:4: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
          raise_out_of_memory();
          ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:5:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:311:2: warning: "raise_out_of_memory" is deprecated: use "caml_raise_out_of_memory" instead [-W#pragma-messages]
        raise_out_of_memory() ;
        ^
/opt/pkg/lib/ocaml/caml/compatibility.h:114:29: note: expanded from macro 'raise_out_of_memory'
#define raise_out_of_memory CAML_DEPRECATED("raise_out_of_memory", "caml_raise_out_of_memory") caml_raise_out_of_memory
                            ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:9:6: note: expanded from here
 GCC warning "\"raise_out_of_memory\" is deprecated: use \"caml_raise_out_of_memory\" instead"
     ^
c_bz.c:314:2: warning: "raise_constant" is deprecated: use "caml_raise_constant" instead [-W#pragma-messages]
        raise_constant(*caml_named_value("mlbz_data_exn")) ; 
        ^
/opt/pkg/lib/ocaml/caml/compatibility.h:108:24: note: expanded from macro 'raise_constant'
#define raise_constant CAML_DEPRECATED("raise_constant", "caml_raise_constant") caml_raise_constant
                       ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:13:6: note: expanded from here
 GCC warning "\"raise_constant\" is deprecated: use \"caml_raise_constant\" instead"
     ^
c_bz.c:316:2: warning: "raise_constant" is deprecated: use "caml_raise_constant" instead [-W#pragma-messages]
        raise_constant(*caml_named_value("mlbz_eof_exn")) ;
        ^
/opt/pkg/lib/ocaml/caml/compatibility.h:108:24: note: expanded from macro 'raise_constant'
#define raise_constant CAML_DEPRECATED("raise_constant", "caml_raise_constant") caml_raise_constant
                       ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:17:6: note: expanded from here
 GCC warning "\"raise_constant\" is deprecated: use \"caml_raise_constant\" instead"
     ^
c_bz.c:319:12: warning: "alloc_string" is deprecated: use "caml_alloc_string" instead [-W#pragma-messages]
  result = alloc_string(dst_len);
           ^
/opt/pkg/lib/ocaml/caml/compatibility.h:49:22: note: expanded from macro 'alloc_string'
#define alloc_string CAML_DEPRECATED("alloc_string", "caml_alloc_string") caml_alloc_string
                     ^
/opt/pkg/lib/ocaml/caml/misc.h:58:3: note: expanded from macro 'CAML_DEPRECATED'
  CAML_PREPROWARNING(name1 is deprecated: use name2 instead)
  ^
/opt/pkg/lib/ocaml/caml/misc.h:56:31: note: expanded from macro 'CAML_PREPROWARNING'
#define CAML_PREPROWARNING(x) _Pragma(CAML_MAKEWARNING2(x))
                              ^
<scratch space>:21:6: note: expanded from here
 GCC warning "\"alloc_string\" is deprecated: use \"caml_alloc_string\" instead"
     ^
c_bz.c:320:10: warning: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  memcpy(String_val(result), dst_buf, dst_len);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/pkg/lib/ocaml/caml/mlvalues.h:290:23: note: expanded from macro 'String_val'
#define String_val(x) ((const char *) Bp_val(x))
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/secure/_string.h:63:27: note: expanded from macro 'memcpy'
                __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
                                        ^~~~
37 warnings generated.
ocamlmklib -oc camlbz2 c_bz.o -lbz2 
ld: warning: -undefined suppress is deprecated
ld: warning: -undefined suppress is deprecated
ocamlc.opt -c bz2.mli
File "bz2.mli", line 54, characters 46-67:
54 | val open_in : ?small:bool -> ?unused:bytes -> Pervasives.in_channel ->
                                                   ^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
File "bz2.mli", line 84, characters 29-51:
84 | val open_out : ?block:int -> Pervasives.out_channel -> out_channel
                                  ^^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
ocamlc.opt -c bz2.ml
File "bz2.ml", line 31, characters 51-72:
31 | external open_in : ?small:bool -> ?unused:bytes -> Pervasives.in_channel ->
                                                        ^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
File "bz2.ml", line 44, characters 34-56:
44 | external open_out : ?block:int -> Pervasives.out_channel -> out_channel
                                       ^^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
ocamlmklib -oc camlbz2 -o bz2 bz2.cmo -lbz2 
ocamlopt.opt -c bz2.ml
File "bz2.ml", line 31, characters 51-72:
31 | external open_in : ?small:bool -> ?unused:bytes -> Pervasives.in_channel ->
                                                        ^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
File "bz2.ml", line 44, characters 34-56:
44 | external open_out : ?block:int -> Pervasives.out_channel -> out_channel
                                       ^^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: module Stdlib.Pervasives
Use Stdlib instead.

If you need to stay compatible with OCaml < 4.07, you can use the 
stdlib-shims library: https://github.com/ocaml/stdlib-shims
ocamlmklib -oc camlbz2 -o bz2 bz2.cmx -lbz2