On Jun 9, 2009, at 12:23 PM, Nathan Stott wrote:

I'm trying very hard to get a couchdb build from source running on windows.
I am using 0.9.0.  I have built the couch_erl_driver.dll with the
couch_erl_driver.c and the most recent version of ICU successfully, but when couch_util calls erl_ddll:load_driver I get error -136. I have debugged
into the erlang source to find out more about this error and it is
ERL_DE_LOAD_ERROR_INCORRECT_VERSION<http://src.opensolaris.org/source/s?defs=ERL_DE_LOAD_ERROR_INCORRECT_VERSION&project=/erlang-dtrace >

I'm a bit stumped. I don't know how this could be the wrong version.

This error comes from line 1557 of erl_bif_ddll.c in erlang 5.7.1

Anyone got any suggestions about where I go from here?


Hi Nathan, I'm confused.  How does -136 translate to

#define ERL_DE_LOAD_ERROR_INCORRECT_VERSION -5

I thought we decided on IRC that this code in erl_win32_sys_ddll.c

int erts_sys_ddll_open_noext(char *dlname, void **handle)
{
    HINSTANCE hinstance;

    if ((hinstance = LoadLibrary(dlname)) == NULL) {
        return ERL_DE_DYNAMIC_ERROR_OFFSET - GetLastError();
    } else {
        *handle = (void *) hinstance;
        return ERL_DE_NO_ERROR;
    }
}

indicated that LoadLibrary(dlname) was NULL and GetLastError() returned 126, which according to WinError.h is

//
// MessageId: ERROR_MOD_NOT_FOUND
//
// MessageText:
//
//  The specified module could not be found.
//
#define ERROR_MOD_NOT_FOUND              126L

Best, Adam

Reply via email to