[openssl-dev] Cross-compiling 64-bit openssl for Windows under Linux

Victor Wagner vitus at wagner.pp.ru
Mon Aug 10 13:38:14 UTC 2015


Hi

I'm trying to build windows version of OpenSSL using Debian oldstable
system with GCC 4.6.3 configured for x86_64-w64-mingw32 target.
(from the package gcc-mingw32-w64-x86-64).

First, I've tried with latest stable 1.0.2d version.

./Configure --prefix=c:/openssl --openssldir=c:/openssl mingw64 shared
--cross-compile-prefix=x86_64-w64-mingw32-

(32-bit version with mingw target and i686-w64-mingw32- prefix compiles
fine)

Compilation fails when processing ecp_nistz256-x86_64.s assembler file
generated from crypto/ec/asm/ecp_nistz256-x86_64.pl

Then I've tried a latest development snapshot.  
(openssl-SNAP-20150810.tar.gz)
It seems that this bug
is fixed and there is compilable ecp_nistz256-x86_64.pl,

Both fails with same diagnostics:

...-windres

Invalid syntax: line 6

Investigation shows, that problem is with util/mkrc.pl script

It attempts to open crypto/opensslv.h which doesn't exists in snapshot.
and doesn't fail on file opening error. Instead it generates resource
script with empty version numbers in FILEVERSION (which is syntactically
incorrect).

It seems that when opensslv.h was relocated and Configure script was
fixed (and Configure script does properly check file open error) it was
forgotten to fix mkrc.pl

There is analogous problem in netware.pl script, although it does check
for file opening error. 


More information about the openssl-dev mailing list