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

Patrik Nyblom pan@REDACTED
Wed Dec 5 10:37:36 CET 2012


Hi!

On 12/05/2012 09:33 AM, Dave Cottlehuber wrote:
> 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?
I'm not sure I follow you here, the installer (if you mean the self 
extracting exe built with nsis) never uses OpenSSL. If it does, you 
should report that to the NSIS developers.

As for Erlang/OTP, it can definitely be done as that's how the prebuilt 
binaries you can get from our website are built. In 
$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.

Cheers,
/Patrik
> Full configure & build logs available
> https://www.dropbox.com/sh/jeifcxpbtpo78ak/BSc0ZomTbs/tmp/R15B03_win32_static_ssl_failure.tar.gz
>
> I've previously tried under cygwin and this last run under mingw, same
> non-result in both cases.
>
> A+
> Dave
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs




More information about the erlang-bugs mailing list