[erlang-bugs] Unable to build OTP with static crypto for Win32

Dave Cottlehuber dch@REDACTED
Fri Dec 7 15:12:44 CET 2012


Hi Patrik!

Thanks for making the entire build chain work on mingw, it is
noticeably faster than cygwin for building OTP for me.

>> As far as I can tell, I'm configuring correctly with
>> `--disable-dynamic-ssl-lib` but the resulting installer doesn't
>> function without the two OpenSSL DLLs present. In fact, I've never had
>> this working, ever. Is it actually possible?

Please accept my apologies, what I should have said was "I'm not able
to create an OTP release that supports static OpenSSL"!

I'm doing almost the same as OTP, just with the assembler
optimisations using nasm instead of the MS non-optimised one..

    https://github.com/dch/glazier/blob/master/bin/build_openssl.cmd#L26-L30

> $ERL_TOP/HOWTO/INSTALL-WIN32.md, you have a huge instruction on how to build
> a static OpenSSL lib using the MSVC command prompt. You then use that static
> lib in your build of Erlang/OTP. You will never need to install any OpenSSL
> dynamic libs. Verify that you got the lib files and that the correct OpenSSL
> installation reside in the directory where configure think it  should be (in
> your case /c/OpenSSL) . You can point out the correct installation directory
> during configure (otp_build configure --with-ssl-dir=...) Then *clean the
> crypto application* (cd lib/crypto && make clean), the build logs you
> provide does not rebuild so it's hard to see if the build does the right
> thing. Then do do otp_build configure, otp_build boot -a , otp_build release
> -a  and otp_build installer_win32.

> Also, if you look at lib/crypto/c_src/win32/Makefile after configure is run
> , you should see lines looking like:
> SSL_LIBDIR = /c/OpenSSL/lib/VC/static
> SSL_CRYPTO_LIBNAME = libeay32MD
>
> etc.
> Verify that there are files named i.e.
> /c/OpenSSL/lib/VC/static/libeay32MD.lib on your system.

Aha. This appears to be the issue, I don't have MD.lib.

Reverting to following the OTP instructions verbatim, on a fresh
VS2012  & 0.9.8r still doesn't produce the required files, nor using
SDK 7.1 either.

I've been using a script to build OpenSSL, and the only difference is
that I've called `call ms\do_nasm` instead of your `ms\do_ms`. Both
have same result.

Any suggestions on what I might be missing?

A+
Dave



More information about the erlang-bugs mailing list