Not sure if this is right, but OCAML_STDLIB_DIR can be undefined in our cross-compiler. It's only used in a one place in the C code so this works around it. diff --exclude _build -urN ocaml-3.11.0+beta1.orig/byterun/dynlink.c ocaml-3.11.0+beta1.mingw/byterun/dynlink.c --- ocaml-3.11.0+beta1.orig/byterun/dynlink.c 2008-04-22 13:24:10.000000000 +0100 +++ ocaml-3.11.0+beta1.mingw/byterun/dynlink.c 2008-11-15 15:43:52.000000000 +0000 @@ -80,7 +80,12 @@ stdlib = getenv("OCAMLLIB"); if (stdlib == NULL) stdlib = getenv("CAMLLIB"); - if (stdlib == NULL) stdlib = OCAML_STDLIB_DIR; + if (stdlib == NULL) +#ifdef OCAML_STDLIB_DIR + stdlib = OCAML_STDLIB_DIR; +#else + stdlib = "."; +#endif ldconfname = caml_stat_alloc(strlen(stdlib) + 2 + sizeof(LD_CONF_NAME)); strcpy(ldconfname, stdlib); strcat(ldconfname, "/" LD_CONF_NAME);