[erlang-questions] crypto on 64bit windows?

346 views
Skip to first unread message

Emile Joubert

unread,
Mar 29, 2011, 6:12:37 AM3/29/11
to erlang-q...@erlang.org

Hi,

Should the crypto module work on 64bit windows? It works fine on 32bit
Windows XP, but on 64bit XP and 64bit Windows7 I get the following error:

----------

Erlang R14B02 (erts-5.8.3) [smp:2:2] [rq:2] [async-threads:0]

Eshell V5.8.3 (abort with ^G)
1> crypto:start().

=ERROR REPORT==== 29-Mar-2011::11:05:13 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library
c:/PROGRA~2/ERL58~1.3/lib/crypto-2.0.2.1/priv/lib/crypto: 'The specified
module could not be found.'"
OpenSSL might not be installed on this system.

=ERROR REPORT==== 29-Mar-2011::11:05:13 ===
The on_load function for module crypto returned {error,
{load_failed,
"Failed to load NIF
library c:/PROGRA~2/ERL58~1.3/lib/crypto-2.0.2.1/priv/lib/crypto: 'The
specified module could not be found.'"}}
** exception error: undefined function crypto:start/0

----------

C:\Program Files (x86)\erl5.8.3\lib\crypto-2.0.2.1\priv\lib
does contain crypto.dll. Installing a 64bit version of OpenSSL for
Windows doesn't help.

The crypto documentation refers to Win32 - should I infer that crypto
will not work on 64bit Windows operating systems?

Regards

Emile

_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Robert Raschke

unread,
Mar 29, 2011, 1:06:16 PM3/29/11
to Emile Joubert, erlang-q...@erlang.org
On Tue, Mar 29, 2011 at 11:12 AM, Emile Joubert <em...@rabbitmq.com> wrote:

Hi,

Should the crypto module work on 64bit windows? It works fine on 32bit Windows XP, but on 64bit XP and 64bit Windows7 I get the following error:

----------

Erlang R14B02 (erts-5.8.3) [smp:2:2] [rq:2] [async-threads:0]

Eshell V5.8.3  (abort with ^G)
1> crypto:start().

=ERROR REPORT==== 29-Mar-2011::11:05:13 ===
Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library c:/PROGRA~2/ERL58~1.3/lib/crypto-2.0.2.1/priv/lib/crypto: 'The specified module could not be found.'"
OpenSSL might not be installed on this system.

=ERROR REPORT==== 29-Mar-2011::11:05:13 ===
The on_load function for module crypto returned {error,
                                                {load_failed,
                                                 "Failed to load NIF library c:/PROGRA~2/ERL58~1.3/lib/crypto-2.0.2.1/priv/lib/crypto: 'The specified module could not be found.'"}}
** exception error: undefined function crypto:start/0

----------

C:\Program Files (x86)\erl5.8.3\lib\crypto-2.0.2.1\priv\lib
does contain crypto.dll. Installing a 64bit version of OpenSSL for Windows doesn't help.

The crypto documentation refers to Win32 - should I infer that crypto will not work on 64bit Windows operating systems?



Regards

Emile


The crypto.dll needs to find libeay32.dll (on 32-bit systems at least, not sure what it is called on 64-bit) and if it finds the wrong one (an old one for example) then crypto.dll won't load.

We've had a lot of fun recently with machines where some rather annoying miscreant application plonked it's version of libeay32.dll in the \Windows\system32 folder. And due to the wonders of Windows DLL loading paths, that takes precedence before anything in your PATH.

One way of "solving" this kind of thing is to copy the OpenSSL dlls into the same folder where your erl.exe is getting started from. Cause that in turn takes precedence over the Windows one. Grrr.

Robby

Robert Raschke

unread,
Mar 29, 2011, 1:10:36 PM3/29/11
to Emile Joubert, erlang-q...@erlang.org
Apologies, the last paragraph was meant to read:

One way of "solving" this kind of thing is to copy the OpenSSL dlls into the same folder where the erl.exe (or werl.exe) that you are running lives. Cause that in turn takes precedence over the Windows one. Grrr.


Emile Joubert

unread,
Mar 31, 2011, 8:14:39 AM3/31/11
to Robert Raschke, erlang-q...@erlang.org
On 29/03/11 18:10, Robert Raschke wrote:

> The crypto.dll needs to find libeay32.dll (on 32-bit systems at
> least, not sure what it is called on 64-bit)

I can confirm that crypto works if you install the 32bit libraries on a
64bit system.

Thanks for the help.

-Emile

Reply all
Reply to author
Forward
0 new messages